There are five working modes of block ciphers: 1. Electronic Codebook Book (ECB); 2. Cipher Block Chaining (CBC); 3. Counter (CTR); 4. Cipher FeedBack (CFB); 5. Output FeedBack (OFB).
The following are introduced one by one:
1. Electronic Codebook Book (ECB)
This mode divides the entire plaintext into several identical small segments and then encrypts each small segment.
2. Cipher Block Chaining (CBC)
This mode is to first divide the plaintext into several small segments, and then each small segment is XORed with the initial block or the previous ciphertext segment, and then encrypted with the key.
3. Counter (CTR)
Calculator mode is not common. In CTR mode, there is a self-incrementing operator. The output of this operator after encryption with the key and the result of XOR with the plaintext are used to obtain the ciphertext, which is equivalent to one-time pad. This encryption method is simple, fast, safe and reliable, and can be encrypted in parallel, but the key can only be used once when the calculator cannot be maintained for a long time .
4. Cipher FeedBack (CFB)
5. Output FeedBack (OFB)
AES reminds me that the 030 051M0 core does not have AES, but the L053 M0+ core does have AES.
Let's take a look at the same AES, what are the differences in registers
First look at L053
Looking at Fudan Micro
This AES feels similar to all manufacturers
Fudan Micro has an additional interrupt
Look at the S file and it does have
Look at the AES_CR register, which is mainly used to switch various processing modes
Test_AES_CBC_Decrypt
AES_EncryptionAndDecryption(keyBuf,16,ivrBuf,dataInBuf,16,dataOut,&dataOutLen);
Go to the encryption and decryption website to see the results
AES_EncryptionAndDecryption(keyBuf,16,ivrBuf,dataInBuf,16,dataOut,&dataOutLen);
Go to the AES encryption and decryption website to see the results
Basically correct
I'll just look at the results after CTR , and I won't test it again.
|