N we then need to calculate the s boxes where s 1

• 7

This preview shows page 3 - 4 out of 7 pages.

n . We then need to calculate the S-boxes where S 1 (011011) = 0101 Permute using Then XOR with L n-1 Final permutation on R 16 L 16 This is the ECB mode. The number of rotations is 4* + 12*2 =28 -> D 0 = D 16 and C 0 = C 16 MODES OF OPERATION: Electronic Code Book (ECB): each block is encrypted separately Cipher Block Chaining Mode (CBC): Encryption of all blocks are chained together. Ciphertext y i depends not only on block x i but on all previous plaintext blocks as well. Encryption is randomized using an initialization vector (IV) For the first plaintext block x i , there is no previous ciphertext. First ciphertext y i depends on the plaintext x 1 and the IV. The second ciphertext y 2 depends on the IV, x 1 , and x 2 . So on and so forth Output Feedback Mode (OFB): Used to build a synchronous stream cipher. Key stream is not generated bitwise but instead in a blockwise fashion. Output of the cipher gives us key stream bits S i which we can encrypt plaintext bits using the XOR operation Cipher Feedback Mode (CFB): Uses a block cipher as a building block for an asynchronous stream cipher. Key stream S i is generated in a blockwise fashion and is also a function of the ciphertext Counter Mode (CTR): Uses block cipher as a stream cipher. Key steam is computed in a blockwise fashion. Input to the block cipher is a counter which assumes a different value every time the block cipher computes a new key stream block PERFECT SECRECY: Consider the block cipher encryption an decryption functions C = E k (M) and M = D k © such that for any key K, the functions E(.) and D(.) are one-to-one, and D k (E k (.)) is the identity transformation. Let {M 1 ,M 2 ,…,M m } where the probability p(M i ) of each message is known a priori, which are not necessarily equal. Let {K 1 ,K 2 ,…,K k } be the key space, where probability of each key is known as p(k i ) which are usually equal: p(K i ) = 1/k for i=1,2,…,k (keys are uniformly distributed) VERNAM CIPHER: A generalization of the Vigenere cipher, where the key is as long as the message. Assuming k=m and the keys are selected randomly, we have p(K)=1/k=1/m, and thus P(C|M) =p(K=C-m)=1/m=1/k since p(C|M)=1/m for any pair (M,C) therefore, p(C|M)=p(C) ONE-TIME PAD: Vernam cipher is called one-time pad where M,C,K are single bits, and r i is randomly generated with uniform probability p(r i )=1/2 ADVANCED ENCRYPTION STANDARD: Fixed at 128 bits only. The state matrix is formed from the input data as a 4x4 data. Given the 128-bit data A 0 A 4 A 8 A 12 A 1 A 5 A 9 A 13 A 2 A 6 A 10 A 14 A 3 A 7 A 11 A 15 The 8-bit binary data is usually represented in hex (a3) = (1010 0011) 128 bit has 10 rounds ADD ROUND KEY -> BYTE SUB -> SHIFT ROW ->MIX COLUMN ADD ROUND KEY: Each of the 16 bytes of the state is XORed against each of the 16 bytes of a portion of the expanded key for the current round. After MixColumn XOR BYTE SUB TABLE : SHIFT ROW: 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 16 = 1 5 9 13 6 10 14 2 11 15 3 7 16 4 8 12 Row1(0), Row2(1), Row 3(2), Row4(2) MIX COLUMN: b1=(b1*2) XOR (b2*3) XOR(b3*1) XOR(b4*1) b2=(b1*1) XOR (b2*2) XOR(b2*3) XOR(b4*1) b3=(b1*1) XOR (b2*1) XOR (b3*2) XOR(b4*3) b4=(b1*3) XOR (b2*1) XOR (b3*1) XOR(b4*2) b5 = (b5 * 2) XOR (b6*3) XOR (b7*1) XOR (b8*1)