33. Cryp_sm4_cbc
33.1. Function description:
This demo shows the operation of cryptographic processor, algorithm is SM4, algorithm mode including CBC, appending data using the CPU in polling mode.
Configure SM4 algorithm and prepare the plaintext data firstly, then start the encryption to get ciphertext data.
Compare the encryption result with the standard to verify the function of encryption.
Configure & prepare the key for decryption.
Configure SM4 algorithm firstly, then start the decryption, the ciphertext data is comming from encryption result.
Compare the decryption result with the plaintext to verify the function of decryption.
Note
For SM4_CBC mode decryption, the key has to be prepared firstly.
33.2. Test result:
After the operation of encryption and decryption, if the encryption data is same as the standard & the decryption result is same as the plaintext data, then print pass, if not print fail.
33.3. IO connection:
None