It seems both -kfile and -pass can be used to encrypt files with a 2048 bit keyfile? I don't understand the difference between the two methods:

$ openssl enc -salt -aes-256-cbc -in inputfile.txt -kfile 2048bit_keyfile.key 

$ openssl enc -salt -aes-256-cbc -in inputfile.txt -pass file:2048bit_keyfile.key -out outputfile.txt.enc

Which method uses the full entropy of the 2048 bit keyhole?


-k and -kfile are deprecated

The OpenSSL ENC wiki page says this:

-k password, -kfile filename
Both option are used to specify a password or a file containing the password which is used for key derivation. However they are deprecated. You should use the -pass option instead. The equivalents are -pass pass:password and -pass: file:filename respectively.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.