RC2: Rivest Cipher 2, is a symmetric key encryption algorithm designed by Ron Rivest in 1987. It is a block encryption algorithm that processes a fixed-length data block each time.
The key length of the RC2 algorithm is variable, typically ranging from 8 to 128 bytes.
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.