RIVEST CIPHER 5 ALGORITHM RC 5 It is













- Slides: 13
RIVEST CIPHER 5 ALGORITHM
RC 5 It is Symmetric Key Block Encryption Algorithm develop by Ron Rivest It is quite fast as it uses only primitive computer operation (XOR, shift) and also allows for variable rounds and variable bit size It requires less memory for execution and is, therefore suitable not only for desktop computers but also for smartcards and other devices that have small memory capacity.
Ø HOW RC 5 WORKS: Ø In RC 5 input plain text block size , number of rounds and number of 8 -bit byte of the key is all can be of variable length PARAMETER ALLOWED NUMBERS Word size in bits 16, 32, 64 Number of rounds 0 -255 Number of 8 -bit bytes in key 0 -255 Ø The output resulting from RC 5 is the cipher text, which has the same size as input plain text. Ø Since RC 5 allows for variable values in three parameters the algorithm is denoted as RC 5 -w/r/b Ø where: Ø r = number of rounds Ø w = word size in bits Ø b = number of 8 -bit byte in the key
Let us assume that we are working on input plain text block of size 64 -bits In initial Opertaion the input plain text is divided into two 32 -bit blocks A and B The first two subkeys are added s[0] and s[1] to A and B respectively. This produces C and D Then the round begins: Bit. Wise X-OR Left circular Shift Addition with the next sub-key, for both C and D- This is the addition operation first and result of addition mod 2 w (since w= 32) here we have 2 32 is performed.
Details of Round 1 Step 1 : X or C and D In first round C and D are XORed together to form E c D XOR E Step 1 in a round
Step 2: Circular Left Shift By D positions Now E is circular left shift by d position E PERFORM CIRCULAR BIT SHIFT BY D BITS Step 2 in a Round
STEP 3: Add key and next subkey text In this step E is added to next subkey Shifted E S[2] + F Step 3 in a Round
STEP 4: XOR D AND f Here D and F are XORed to produce G D F XOR G Step 4 in a Round
STEP 5: CIRCULAR LEFT SHIFT G Here G is circular left shifted to F positions G PERFORM THE CIRCULAR SHIFT BY G BITS Step 5 in a Round
STEP 6 : ADD G AND NEXT SUBKEY Here G is added to next sub key s[3] which is in general S[2 i+1] in general for any round where i=1. SHIFTED G S[3] XOR H
Step 7: Miscellaneous Task 1. Increament I by 1 2. check to see if I < r if I is still less than r rename F as C and H as D and return back to which is shown below i=I +1 If I < r Call F as C again Call H as D again Go back to Step 1 Else Stop End If step 1
THANKYOU