Someone please straighten me out about 128 bits versus 256 bits etc....
Don M
Posts: 1,652
On my Mac I request an AES 128 bit key and this is what I get:
Mac-mini:~ Don$ openssl enc -aes-128-ecb -k secret -P -md sha1
salt=CB4965AB825F439A
key=4CE5696CBAA93AB93945829B4322BE78
It looks to me that the key is 256 bits (32 HEX bytes) long if I'm looking at it this way 16 bytes * 8 bits == 256 bits:
4C E5 69 6C BA A9 3A B9 39 45 82 9B 43 22 BE 78
Do I only use half of it for a 128 bit key?
Also what does "salt" mean?
Mac-mini:~ Don$ openssl enc -aes-128-ecb -k secret -P -md sha1
salt=CB4965AB825F439A
key=4CE5696CBAA93AB93945829B4322BE78
It looks to me that the key is 256 bits (32 HEX bytes) long if I'm looking at it this way 16 bytes * 8 bits == 256 bits:
4C E5 69 6C BA A9 3A B9 39 45 82 9B 43 22 BE 78
Do I only use half of it for a 128 bit key?
Also what does "salt" mean?
Comments
A hex digit is 4 bits, not 8... So, 16 bytes * 8 bits == 256 bits 128 bits
And from the ssl manual:
"Note the -salt option. The salt is a set of random characters that OpenSSL combines with the password to create the encryption and authentication keys. This makes dictionary and brute force attacks considerably more difficult. Always use the -salt option. "
Read about Salt here:
http://en.wikipedia.org/wiki/Salt_(cryptography)