Generally, encryption is block encryption. to encrypt data that exceeds the block size, the padding and link encryption modes are required. The ECB and CBC mentioned in this Article refer to the link encryption mode. This document compares several modes in the AES encryption algorithm. Note that a CTR mode is missing.
At the end of the article, several pairs of bitstream strings obtained using the ECB and CBC model are posted.
Four modes of symmetric encryption and group encryption (ECB, CBC, CFB, ofB)
I. AESSymmetric encryption:
AES Encryption
Group
II.Group password Filling
Group password Filling E.g .:
PKCS #5 filling mode
3..Flow Password:
Thu.Four modes in group password encryption:3.1 ECBModeAdvantages:1. Simple;2. conducive to parallel computing;3. The error will not be transmitted;Disadvantages:1. the plaintext mode cannot be hidden;2. Attackers may take the initiative to attack plaintext;
3.2 CBCMode:Advantages:1. It is not easy to take the initiative to attack, and the security is better than that of ECB. It is suitable for transmitting long packets and is the standard of SSL and IPSec.Disadvantages:1. It is not conducive to parallel computing;2. error transfer;3. Vector IV needs to be initialized 3.3 CFBMode:
Advantages:1. the plaintext mode is hidden;2. The group password is converted to the stream mode;3. Data smaller than the group can be encrypted and transmitted in a timely manner;Disadvantages:1. It is not conducive to parallel computing;2. error transfer: Damage to one plaintext unit affects multiple units;3. Unique IV; 3.4 ofBMode:
Advantages:1. the plaintext mode is hidden;2. The group password is converted to the stream mode;3. Data smaller than the group can be encrypted and transmitted in a timely manner;Disadvantages:1. It is not conducive to parallel computing;2. Active attacks against plaintext are possible;3. error transfer: Damage to one plaintext unit affects multiple units;Several code streams, tested by the hardware encryption and decryption unit of a chip
ECB 1key encrypt 0x3ad77bb40d7a3660a89ecaf32466ef97 2key encrypt 0xea24274e ea6c2a7d f78e3345 467f171d after encrypt Encrypt
Cbckey 0x000102030405060708090a0b0c0d0e0fbefore encrypt 0x7649abac8119b246cee98e9b12e9197d