Openssl hmac using aes-256-cbc

I am trying to take an AES HMAC file using the command line opensslon Linux. I looked at the manual pages, but cannot figure out how to successfully make HMAC. I can encrypt the file using the encc command openssl, but I cannot create HMAC. Encryption is as follows:

openssl enc -aes-256-cbc -in plaintext -out ciphertext

Any tips or tutorials would be great

+5
source share
2 answers

CBC-MAC. , , IV 0, (16 AES256-cbc). , , OpenSSL:

openssl enc -e -aes-256-cbc -K 0123456789ABCDEF -iv 0000000000000000 < file | tail -c 16 | od -A n
  • -K - , , , -, , , .
  • -iv, , - IV, CBC-MAC.
  • tail -c 16 - AES256-cbc, 16 .
  • od - , -. od -A n base64, , , .

AES HMAC , AES256-cbc - -, . AES256-cbc . HMAC - , SHA-1 MD5.

? , OpenSSL dgst HMAC, MD5 SHA-1, DSS/.

, , MAC EMAC, OpenSSL EMAC . EMAC MAC.

+9

HMAC , AES HMAC.

AES, ( - aes-256-cbc); AES ( "" ) -p, , iv, .

openssl enc -e -k password -p -aes-256-cbc -in plaintext -out ciphertext
salt=A2402067B9BFD4A1
key=EB3A88115C30F26C3987F1AB2577DF5B58C80EBEEA623506517FAD843C64E1FC
iv =B382453BCBF579CE14C0726D343F40E2

HMAC /, AES, :

openssl dgst -hmac EB3A88115C30F26C3987F1AB2577DF5B58C80EBEEA623506517FAD843C64E1FC -sha256 ciphertext
HMAC-SHA256(ciphertext)= fa3fb9c9c743f35ba81793e2704c3fc9737cd2675011110cb1655ea7ceed2914

AES , HMAC. , , , , , , , HMAC.

+2

All Articles