Skip to main content

B.2.4. RC5-CBC-Pad

B.2.4. RC5-CBC-Pad

RC5-CBC-Pad is the RC5 encryption algorithm [RC5] in CBC mode with the padding operation specified in RFC 5652 [RFC5652], which is a generalization of the padding operation specified in RFC 1423 [RFC1423]. The scheme is fully specified in [RFC2040]. RC5-CBC-Pad has a variable key length, from 0 to 256 octets, and supports both a 64-bit block size and a 128-bit block size. For the former, it has an eight-octet initialization vector, and for the latter, a 16-octet initialization vector. RC5-CBC-Pad also has a variable number of "rounds" in the encryption operation, from 8 to 127.

Note: For RC5 with a 64-bit block size, the padding string is as defined in RFC 1423 [RFC1423]. For RC5 with a 128-bit block size, the padding string consists of 16-(||M|| mod 16) octets each with value 16-(||M|| mod 16).

The object identifier rc5-CBC-PAD [RFC2040] identifies the RC5-CBC-Pad encryption scheme:

rc5-CBC-PAD OBJECT IDENTIFIER ::= {encryptionAlgorithm 9}

The parameters field associated with this OID in an AlgorithmIdentifier shall have type RC5-CBC-Parameters:

RC5-CBC-Parameters ::= SEQUENCE {
version INTEGER {v1-0(16)} (v1-0),
rounds INTEGER (8..127),
blockSizeInBits INTEGER (64 | 128),
iv OCTET STRING OPTIONAL }

The fields of type RC5-CBC-Parameters have the following meanings:

  • version is the version of the algorithm, which shall be v1-0.

  • rounds is the number of rounds in the encryption operation, which shall be between 8 and 127.

  • blockSizeInBits is the block size in bits, which shall be 64 or 128.

  • iv is the initialization vector, an eight-octet string for 64-bit RC5 and a 16-octet string for 128-bit RC5. The default is a string of the appropriate length consisting of zero octets.