Background: I'm working with Node's crypto library. I'm using PBKDF2 to convert a variable-length binary "passphrase" into constant-length keys for an AES cipher later on.
The underlying source of this passphrase data, for reasons out of my control, is encoded with base64. Out of habit, I decode the passphrase back to binary before supplying it to PBKDF2. But that got me thinking... Base64 encoding makes the passphrase longer, but with a more limited set of characters. In practical applications, would this make the data better or worse as an input to PBDKF2?
Put another way, if given a choice between:
key = pbkdf2(binaryPassphrase)
...versus...
key = pbkdf2(base64encode(binaryPassphrase))
...is there any difference in the security offered?