Introduction to the mode of AES encryption and decryption algorithm

Source: Internet
Author: User

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 CBC
Mode: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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.