AES-CMAC example with openssl library
make
./signtool -h
./signtool -t (Do test case)
./signtool -k (Read key[128-bits] from file and show the content)
./signtool -i file -c (Read data from file and do AES-CMAC operation)
./signtool -i file -o file -s (Read data from file and generate the signature)
./signtool -i file -k file -c (Read data/key from file and do AES-CMAC operation)
./signtool -i file -k file -o file -s (Read data/key from file and generate the signature)
hexdump -n 48 image_signed.bin (Check the content of header of the signed file)
echo -n -e \\x2b\\x7e\\x15\\x16\\x28\\xae\\xd2\\xa6\\xab\\xf7\\x15\\x88\\x09\\xcf\\x4f\\x3c > key.bin(Write key to file)
- RFC 4493: The AES-CMAC Algorithm
- PyCryptodome
- Compute AES CMAC using OpenSSL/libcrypto
- ecerulm/mac_example.c
gcc mac_example.c -lcrypto
- CryptoJS extension: AES-CMAC and AES-SIV in JavaScript in the Browser
- 可用來驗証,與 mac_example.c 的結果相同
- megrxu/AES-CMAC
- 除了 AES-CMAC,還包含了對 message 的 encryption/decryptopn.