Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Des

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 31

Course : ECS51531 – Cryptocurrency and Cyber Security

Module : Symmetric Ciphers


Faculty : Dr. P. Mohan Kumar, Professor / CSE
Topics : Rotor Machines- Steganography - Data
Encryption Standard- Advanced Encryption
Standard-Multiple Encryption and Triple DES
Rotor Machines
• multiple stages of encryption can produce an algorithm that is
significantly more difficult to cryptanalyze.
• The machine consists of a set of independently rotating cylinders
through which electrical pulses can flow.
• Each cylinder has 26 input pins and 26 output pins, with internal
wiring that connects each input pin to a unique output pin.
Steganography
• conceal the existence of the message.
• Eg:
• Character marking
• Invisible ink
• Pin punctures
• Typewriter correction ribbon
• LSB Steganography
Block Cipher Vs Stream Cipher
Block Cipher Vs Stream Cipher
(Contd.)
The Feistel Cipher

• Feistel proposed the use of a cipher that alternates substitutions and


permutations.
• Substitution: Each plaintext element or group of elements is uniquely
replaced by a corresponding ciphertext element or group of elements.
• Permutation: A sequence of plaintext elements is replaced by a
permutation of that sequence.
Data Encryption Standard
• 1977 by the National Bureau of Standards.
• 16 Rounds
• plaintext must be 64 bits in length and the key is 56 bits in length.
• The Avalanche Effect
• A small change in either the plaintext or the key should produce a significant
change in the ciphertext.
Advanced Encryption Standard
• AES is a Symmetric Block Cipher.
• To replace DES.
• Plain Text Block Size – 128 bits (16B)
• Key Length – 16/24/32B
• AES-128 / AES-192 / AES-256 (Based on Key length)
General structure of AES
• Input – 128 bit Block
• Represented as 4*4 square matrix of bytes.
• State Array.
• Block is copied into State Array.
• Modified at each stage of encryption or decryption.
• After the final stage, State is copied to an output matrix.
• Key – square matrix of bytes.
• expanded into an array of key schedule words. (44 words for a 128 bit key)
• Each word is four bytes.
• in matrix – First 4 bytes, first column and so on.
• w matrix - First 4 bytes of expanded key, first column and so on.
General structure of AES(Contd.)
• Consists of N rounds.
• Depends on key length.
• The first N - 1 rounds consist of four distinct transformation functions:
• SubBytes
• ShiftRows
• MixColumns
• AddRoundKey
• Final round contains only three transformations.
• Initial single transformation - AddRoundKey (Before first round –
Round 0)
• Each round takes one or more 4*4 matrices and produce a 4*4
matrix.
Detailed Structure of AES
• Not a Feistel Structure. (Half Block swapping is not done)
• Key - expanded into an array of forty-four 32-bit words, w[i].
• Four distinct words (128 bits) serve as a round key for each round.
• Four different stages are used, one of permutation and three of
substitution:
• Substitute bytes: Uses an S-box to perform a byte-by-byte substitution of the block.
• ShiftRows: A simple permutation.
• MixColumns: A substitution that makes use of arithmetic over GF(28).
(Multiplication)
• AddRoundKey: A simple bitwise XOR of the current block with a portion of the
expanded key (Vernam Cipher)
Substitute Bytes Transformation
Substitute Bytes Transformation

• Simple Table lookup.


• AES defines a 16 * 16 matrix of byte values, called an S-box.
• Each individual byte of State is mapped into a new byte.
• The leftmost 4 bits of the byte are used as a row value and the rightmost 4
bits are used as a column value.
• Serve as indexes into the S-box to select a unique 8-bit output value.
Shift Rows Transformation
• The first row of State is not altered.
• For the second row, a 1-byte circular left shift is performed.
• For the third row, a 2-byte circular left shift is performed.
• For the fourth row, a 3-byte circular left shift is performed.
MixColumns Transformation

• operates on each column individually.


• Each byte of a column is mapped into a new value that is a function of
all four bytes in that column.
AddRoundKey Transformation
Key Expansion
• Input - a four-word (16-byte) key
• Output - a linear array of 44 words (176 bytes)
Multiple Encryption and Triple DES
(3DES)
• DES – Vulnerable to Brute Force attack.
• Design a new algorithm to withstand attacks.
• Use multiple encryption with DES and multiple keys.
• Double DES
• two encryption stages and two keys
• Given a plaintext P and two encryption keys K and K , ciphertext C is
1 2

generated as
• C = E(K2, E(K1, P))
• Decryption requires that the keys be applied in reverse order:
• P = D(K1, D(K2, C))
Double Encryption
Double Encryption (Contd.)
• Consider, E(K2, E(K1, P)) = E(K3, P)
• 264 possible inputs = (264)! = 10347380000000000000000 > ()
• But, DES defines one mapping for each different key, for a total
number of mappings:
256 < 1017
• Meet-in-the middle attack
• The use of double DES results in a mapping that is not equivalent to a single
DES encryption.
• C = E(K2, E(K1, P)) , So X = E(K1, P) = D(K2, C)
Triple DES with Two keys
• 3DES or TDEA (Triple Data Encryption Algorithm)
• Two Keys and Three Keys versions
Triple Encryption
Triple DES
• C = E(K1, D(K2, E(K1, P))) P = D(K1, E(K2, D(K1, C))) – Two Keys
• C = E(K3, D(K2, E(K1, P))) – Three Keys

You might also like