Compute AES128 CMAC with openssl as command line
I'am looking for a tool that can comp开发者_如何学Cute a AES128 CMAC as a command line. Openssl does not seem to offer this feature with the command line. Did I miss something, or do you know a command line tool that can perform this computation?
Using newer OpenSSL (1.0.1 I think), you could do:
openssl dgst -mac cmac -macopt cipher:aes-128-cbc -macopt hexkey:11223344556677889900112233445566 -sha1 <file>
Choose the cipher with -macopt cipher:<cipher>
option and the hash with -<hash>
.
[sweep over old questions]
Looked in source of openssl, but could not find it either. There is a patch available for openssl (search for peter, ibm and openssl) but you will have to test it against the latest and rebuild. OpenSSL is a very useful but horribly maintained library/tool.
If there is another tool that does AES/CMAC, it's very good at hiding as well.
精彩评论