Processing rules

You can use different types of processing rules for block chaining.

Ciphering methods describes the cipher processing rules in detail.

CCA handles chaining for each block of data, from the first block until the last complete block of data in each Encipher or Symmetric Algorithm Encipher call. There are different types of processing rules you can choose for block chaining:
ANSI X9.23
Data is not necessarily in exact multiples of the block size. This processing rule pads the plaintext so the ciphertext produced is in exact multiples of the block size.
Cipher block chaining (CBC)
Data must be an exact multiple of the block size, and output will have the same length.
Cryptographic Unit Support Program (CUSP)
CBC mode (cipher block chaining) that is compatible with IBM®’s CUSP and PCF products. The data need not be in exact multiples of the block size. The ciphertext is the same length as the plaintext.
Electronic Code Book (ECB)
The data length must be a multiple of the block size. See Electronic Code Book (ECB) mode.
Information Protection System (IPS)
CBC mode that is compatible with IBM’s IPS product. The data need not be in exact multiples of the block size. The ciphertext is the same length as the plaintext.
PKCS-PAD
The data is padded on the right with between one and 16 bytes of pad characters, making ciphertext a multiple of the block size.

The resulting chaining value (except for ECB mode), after an Encipher or Symmetric Algorithm Encipher call, is known as an output chaining vector (OCV). When there are multiple cipher requests, the application can pass the OCV from the previous Encipher or Symmetric Algorithm Encipher call, as the input chaining vector (ICV) in the next Encipher or Symmetric Algorithm Encipher call. This produces chaining between successive calls, which is known as record chaining. CCA provides the ICV selection keyword CONTINUE in the rule_array parameter used to select record chaining with the CBC processing rule.