Blowfish encryption key length

Ivan Voras ivoras at
Wed May 20 09:53:56 UTC 2009

Kelly Jones wrote:
> I want to use a random Blowfish key to encrypt files, so I did this:
> dd if=/dev/random count=100 bs=100
> to create a 10K byte file. I can now encrypt foo.txt by doing:
> openssl enc -bf -pass -in foo.txt > foo.txt.encrypted
> However, "man enc" says "Blowfish and RC5 algorithms use a 128 bit key."
> Does this mean could've been just 16 bytes (128 bits) long?


> Or am I misunderstanding the word "key" here?

That's how block ciphers work, nothing special here. Keys must be of the
size(s) supported by the algorithm.

If you read the openssl manual more closely, it says it expects the
password file to be a text file, containing lines of text, and the first
line will be used for encrypting. It will most likely hash the password
thus retrieved into a suitable key for the cipher.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-questions mailing list