CAST-128 Encryption Algorithm
CAST-128 Encryption Algorithm
CAST-128 Encryption Algorithm
CAST-128
CAST is a design procedure for symmetric encryption algorithms developed by
Carlisle Adams and Stafford Tavares Feistel Network structure Operating on 64-
bit blocks of plaintext Key size which can vary from 40 bits to 128 bits
Variable Keysize
For key sizes up to and including 80 bits (i.e., 40, 48, 56, 64, 72, and 80 bits)
uses 12 rounds For key sizes greater than 80 bits, the algorithms uses the full
16 rounds For key sizes less than 128 bits, the key is padded with zero bytes (in
the rightmost, or least significant, positions)
For example
40-bit key = 01 23 45 67 12 = 01 23 45 67 12 00 00 00 00 00 00 00 00 00 00 00
Plaintext = 01 23 45 67 89 AB CD EF
CAST-128 Algorithm
CAST-128 Algorithm
Function Type 1: I = ((Kmi + D) <<< Kri) f = ((S1[Ia] ^ S2[Ib]) - S3[Ic]) + S4[Id]
Function Type 2: I = ((Kmi ^ D) <<< Kri) f = ((S1[Ia] - S2[Ib]) + S3[Ic]) ^ S4[Id]
Function Type 3: I = ((Kmi - D) <<< Kri) f = ((S1[Ia] + S2[Ib]) ^ S3[Ic]) - S4[Id]
Rounds 1, 4, 7, 10, 13, and 16 use f function Type 1. Rounds 2, 5, 8, 11, and 14
use f function Type 2. Rounds 3, 6, 9, 12, and 15 use f function Type 3.