encryption - Using SHA1 as a message digest when generating an aes256 cbc key with open ssl -



encryption - Using SHA1 as a message digest when generating an aes256 cbc key with open ssl -

i have lab computer security class utilize gpg , openssl secure communication. confused step:

use openssl enc command line symmetric cipher routine generate 256bit aes key in cbc mode. should utilize sha1 message digest function generating key. save generated secret key, iv, , salt file named aes.key. (use –p opting print out key, salt , iv used exit, don’t encryption @ step.)

but looking through the man pages openssl enc , see no options digests. know there openssl dgst command computes hash of input. there flaw question? "you should utilize sha1 message digest function generating key" mean? generate key , sha1(key.aes)?

any help appreciated.

thank you,

zero_dev

from usage info openssl enc when giving unknown argument such -h:

-md next argument md utilize create key passphrase. 1 of md2, md5, sha or sha1

so should utilize -md sha1 specify sha1 hash function used in key derivation. finish solution step be:

openssl enc -aes-256-cbc -md sha1 -p

they seem have forgotten explain -md in manual page.

encryption openssl aes sha1

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -