Block Cipher Principles boonritfeu ac th Stream Ciphers
Block Cipher Principles boonrit@feu. ac. th
Stream Ciphers and Block Ciphers stream cipher A symmetric encryption algorithm in which ciphertext output is produced bit-by-bit or byte-bybyte from a stream of plaintext input. block cipher A symmetric encryption algorithm in which a block of plaintext bits (typically 64 or 128) is transformed as a whole into a ciphertext block of the same length.
Stream cipher ���������� Key This is a Message Encryption EWRKLIH……. .
Block cipher ��������������������� block �������� Key This is a Message This is a Me sage Encryption EWRKLIH……. .
Secret key Encryption ������������������� Key. A Key. B Ciphertext Plaintext Encryption Plaintext Decryption Key. A=Key. B
Secret key Encryption DES(Data Encryption Standard) ������ Block Cipher ���� US Federa Standard Key size >58 Bit �����������
Secret key Encryption Triple DES ������ DES ���������� DES Key������ DES AES(Advanced Encryption Standard) ����������� ��� DES
Public key Encryption ������������������� Key. A Key. B Ciphertext Plaintext Encryption Plaintext Decryption Key. A<>Key. B
Public key Encryption RSA ���� Rivest, Shamir, Adleman Key>1028 Bit �����������
DES(Data Encryption Standard)
DES ����� 10 bit key 8 bit plaintext P 10 Shift IP 8 bit plaintext IP-1 P 8 fk f. K SW Shift P 8 SW fk f. K IP-1 IP 8 bit ciphertext
DES ����� S-DES Key Generation ����� P 10 Shift P 8
DES ����� P 10(Permutation) ������������� P 10(k 1, k 2, k 3, k 4, k 5, k 6, k 7, k 8, k 9, k 10)=(k 3, k 5, k 2, k 7, k 4, k 10, k 1, k 9, k 8, k 6) P 10 3 1101101001 5 2 7 4 P 10 10 1 9 8 6 0111111000
DES ����� Shift ��������� 5 bit Left. Shift 1 5 bit 10000 01100 Left. Shift 5 bit Left. Shift 1 5 bit 00001 11000
• The Function f. K(L, R)=(L F(R, SK), R)
E/P(Expansion/permutation) �������������� E/P 4 1001 1 2 3 E/P 2 3 4 1 11000011
S-box ����� x x P 0 P 1 P 2 P 3 0111 P 0=0, P 1=1, P 2=1, P 3=1
S-box P 0, 3 P 1, 2 S 0= 0 1 2 3 0100 0 1 2 3 1 3 0 2 2 1 3 1 1 3 2 0 3 2 S 0 P 1, 2 S 1= 11 0 1 2 3 0 2 3 2 1 0 0 1 2 1 1 0 3 3 0 3
P 4(Permutation) ��������������� P 4 2 1001 4 3 P 4 1 0101
The switch Function ������� 4 Bit ����� 4 Bit ��� 10010110 switch 01101001
IP(Initial Permutation) ��������������� IP(x) IP 2 0011 6 3 1 IP 4 8 5 7 00101101
IP-1 (Inverse Permutation) ��������� IP-1(IP(X))=X IP-1 4 00101101 1 3 5 IP-1 7 2 8 6 0110
General n-bit-n-bit Block Substitution (shown with n = 4) Plaintext 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Ciphertext 1110 0100 1101 0010 1111 1000 0011 1010 0110 1100 0101 1001 0000 0111
The Data Encryption Standard DES Encryption
DES Encryption
Single Round of DES Algorithm
Permutation Tables for DES
Calculation of F(R, K)
������ 110010 ���� S 1 10 = Row 2 1001=Column 9 ����� S 1 110010 S 1 1100 (12)
brute-force attack ����� key
- Slides: 44