RC6 (Rivest Cipher 6) is a symmetric key encryption algorithm designed by Ron Rivest in 1998.
It is an improved version of the RC5 algorithm, aiming to provide higher security and better performance.
The RC6 algorithm is a block encryption algorithm that can handle variable-length data blocks.
It adopts the structure of block ciphers, processing a fixed-length data block at a time.
The core idea of the RC6 algorithm is to achieve encryption and decryption operations through round functions and key expansion.
It uses a variable-length round key, transforming the user-provided key into round keys through a key expansion algorithm. Then, the data is encrypted through multiple rounds of round functions. The round function of the RC6 algorithm includes operations such as substitution, confusion, and diffusion of data to increase the strength of encryption.
It also introduces an operation called "Mixing" to increase the non-linearity of the algorithm.
Padding Modes
- None: No padding
- PKCS7: Padding consists of a byte sequence, with each byte padded to the length of the byte sequence
- Zeros: Padding consists of bytes set to zero
- ANSIX923: Padding consists of a byte sequence, where the last byte of the sequence indicates the length and other bytes are filled with zeros
- ISO10126: Padding consists of a byte sequence, where the last byte of the sequence indicates the length and other bytes are filled with random data
For block symmetric encryption algorithms, some operation modes require the byte length of plaintext data to be a multiple of the block size, so we must pad the plaintext data before encrypting it.