Better to know some... than all 


RC5The RC5 block cipher has a wordoriented architecture for variable word sizes w = 16, 32, or 64 bits. It has an extremely compact description, and is suitable for hardware or software. The number of rounds r and the key bytelength b are also variable. It is successively more completely identified as RC5w, RC5w/r, and RC5w/r/b. RC532/12/16 is considered a common choice of parameters; r = 12 rounds are recommended for RC532, and r = 16 for RC564. Algorithm specifies RC5. Plaintext and ciphertext are blocks of bitlength 2w. Each of r rounds updates both wbit data halves, using 2 subkeys in an input transformation and 2 more for each round. The only operations used, all on wbit words, are addition mod 2^{w} (), XOR (), and rotations (left and right ). The XOR operation is linear, while the addition may be considered nonlinear depending on the metric for linearity. The data dependent rotations featured in RC5 are the main nonlinear operation used: x y denotes cyclically shifting a wbit word left y bits; the rotationcount y may be reduced mod w (the loworder lg(w) bits of y suffice). The key schedule expands a key of b bytes into 2r + 2 subkeys K_{i} of w bits each. Regarding packing/unpacking bytes into words, the byteorder is littleendian: for w = 32, the first plaintext byte goes in the loworder end of A, the fourth in A's highorder end, the fifth in B's low order end, and so on. RC5 decryption: Decryption uses the Algorithm subkeys, operating on ciphertext C = (A,B) as follows (subtraction is mod 2^{w}, denoted ). For i from r down to 1 do: B ((B K_{2i+1}) A) A, A ((A K_{2i}) B)B. Finally M (A K_{0};B K_{1}). RC532/12/16 test vectors: For the hexadecimal plaintext M = 65C178B2 84D197CC and key K = 5269F149 D41BA015 2497574D 7F153125, RC5 with w = 32, r = 12, and b = 16 generates ciphertext C = EB44E415 DA319824. 