Académique Documents
Professionnel Documents
Culture Documents
Sequence
Feistel
Cryptography
Block Ciphers
Secret key
It is a block Cipher
plain Text 64 bit blocks N Blocks Cipher Encryption Algorithm 16 cycles Cipher Text 64 bit blocks N Blocks
56 bits used
Block Division
Divides the Data into N blocks of 64 bit length
Block _size = 64 bit Assuming that each location in an array stores 1 bit Input>> input_data [any length ]
Loop: (count bits: 0 to data end) Initialize: N=0, until all data stored { Loop: (count bits: 0 to 63), initialize: i=0, until : i=63 { Input_data_block N [ i ]= Input_ data[ i ] Increment : i } Increment: N a number of blocks }
128 bit
64 bit
64 bit
Encryption Algorithm
32bit 32bit
32bit 32bit
Data is processed as 32 bit half-blocks Takes 16 rounds to complete In each round, a new subkey from the key scheduler is utilized Data is swapped after each round except the last Initial and final permutations are Inverses of each other
XOR
Encryption Algorithm
Initial Permutation
Half_block_2 [32bits]
Such that output is swapped each time before next round except the last round Final Permutation
Feistel function
Expansion 48 bit data XOR The S-Boxes Non Linear Transformation 4-bit output Enables Swap 6-bit input
Feistel function
Expansion:
Loop(until data expansion is complete) { halfblock_expnaded[48 bits] << EXPANSION<<half_block_N [32 bits] }
Key Mixing:
Array [48 bits ] << halfblock_expanded [48 bits] subkey [48 bits]
4 bit 1 bit Original data Expansion 6 bits 6 bits 6 bits 6 bits ... 6 bits
1 bit
Feistel function
Input to S-boxes:
the input for each s-box can be stored in a separate array of 6 locations Loop: (counts 8 cycles) { Loop : (counts 6 bits: 0 to 5) Initialize: i=0, until i=5 {
S input S input2 S input 8
increment: i
} }
Feistel function
Substitution (S-Boxes):
Feistal_output [32 bit array] %will store the output of the s-boxes Loop: (counts : 8 cycles) %the eight boxes { Loop: (counts 4 bits) %Each box gives output of 4 bits { Look_up_table : non linear transformation executed S-box_input_N [i] > transformed > SN- box output [4 bit] Feistal_output [ i ] << SN- box output [4 bit] %output being stored } Feistel_output [32 bit] } So a 32 bit output is obtained S output i.e. Feistal_output [32 bit array]
S1 S2
S8
Look up table
Non Linear Transformation
Middle 4 bits of input
S5 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 00 0010 1100 0100 0001 0111 1010 1011 0110 1000 0101 0011 1111 1101 0000 1110 1001
Outer bits
01
10 11
1110 1011 0010 1100 0100 0111 1101 0001 0101 0000 1111 1010 0011 1001 1000 0110
0100 0010 0001 1011 1010 1101 0111 1000 1111 1001 1100 0101 0110 0011 0000 1110 1011 1000 1100 0111 0001 1110 0010 1101 0110 1111 0000 1001 1010 0100 0101 0011
Input: 011011
Output: 1001
Feistel function
Output Permutation:
Such that in the next round a Swap occurs Loop: ( ) { Output fixed Permutation on Feistel_output [32 bit] }
Encryption
Cipher Encryption Algorithm 16 cycles
56 bits used
Thank You
Questions