Chapter2 Classical Encryption Techniques Symmetric Cipher Model Basic
Chapter-2 Classical Encryption Techniques
Symmetric Cipher Model Basic terminology: Plaintext: Cipher original message to be encrypted text: the encrypted message Enciphering or encryption Algorithm: The process of converting plaintext into cipher text. Deciphering or decryption Algorithm: The process of converting cipher text to plain text. ◦ Two inputs: a plaintext and a secret key
Symmetric Cipher Model
Cipher or cryptographic system : a scheme for encryption and decryption Cryptography: ciphers science of studying Cryptanalysis: science of studying attacks against cryptographic systems Cryptology: cryptography + cryptanalysis
Ciphers Symmetric cipher: same key used for encryption and decryption ◦ Block cipher: encrypts a block of plaintext at a time (typically 64 or 128 bits) ◦ Stream cipher: encrypts data one bit or one byte at a time Asymmetric cipher: different keys used for encryption and decryption
Symmetric Encryption Mathematically: Y = EK(X) X = DK(Y) X or or Y = E(K, X) X = D(K, Y) = plaintext Y = cipher text K = secret key E = encryption algorithm D = decryption algorithm Both E and D are known to public
Asymmetric Cipher Like Symmetric cipher in Asymmetric cipher technique also we are generating plain text to a cipher but different keys used for encryption and decryption Asymmetric cipher having two types of Encryption techniques
1. Encryption using Public key of the receiver (Ub) and Decryption using Private key (Rb) of receiver. Encryption: Decryption: 2. E k Ub (X) = Y Dk Rb (Y) = X Encryption using Private key of the sender (Ra) and Decryption using Public key (Ua) of sender. Encryption : Ek Ra (X) = Y Decryption : Ek Ua (Y) = X Here Public = U Private = R Sender = a Receiver = b
Classical Ciphers Plaintext is viewed as a sequence of elements (e. g. , bits or characters) Substitution cipher: replacing each element of the plaintext with another element. Transposition (or permutation) cipher: rearranging the order of the elements of the plaintext. Product cipher: using multiple stages of substitutions and transpositions
Substitution Algorithm Earliest known substitution cipher Invented by Julius Caesar Each letter is replaced by the letter three positions further down the alphabet. • Plain: a b c d e f g h i j k l m n o p q r s t u v w x y z Cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A BC Example: Key= +3 Saudi Arabia VDWGL DUDELD
Transposition Algorithm Transposition cipher techniques basically depend on the given text. It is nothing but rearranging the characters in the given form. Simple Example for transposition: Step-1: Plain text: WELCOME TO WORLD Step-2: Remove all space characters WELCOMETOWORLD
Step-3: Arrange them in a row as alternate characters each are in subsequent rows. W L E O C E M O T O W L R D Step-4: Now write n each row one by one to get cipher text Step-5: Cipher text: WLOEOOLECMTWRD
Transposition with Key Step-1: Plain text: WELCOMETOTHEWORLDOFCRYPTOGR APHY Step-2: Count number of characters in the plain text. Here it is 28 Step-3: You can arrange them in 4 rows and 7 columns. If there are not exactly use filter characters for unfilled cells.
Step-4: Generate the key depends on number of columns, here key length is 7 characters. Example key: 3615472 Step-5: Now write a plain text in matrix form Key Plain text 3 W T O O 6 E O F G 1 L W C R 5 C O R A 4 O R Y P 7 M L P H 2 E D T Y
Step-6: According to ascending order of key write column wise characters. Here 1 in a key is 3 rd column so write 3 rd column characters first (LWCR), 2 in a key is 7 th column so write 7 th column characters next (EDTY) and so on…… Finally the formed cipher text will be as follows LWCREDTYWTOOORYPCORAEOFGM LPH
Product Cipher Combination of two or more cipher techniques is called product cipher. The product cipher definitely increase security aspect. Example: First we apply substitution technique on the plain text. On that cipher text we apply the Transposition technique or wise versa.
AES(Advanced Encryption Standard) AES is developed by two Joan Daemen and Vincent Rijmen AES is based on a design principle known as a substitutionpermutation network, combination of both substitution and permutation, and is fast in both software and hardware.
AES(Advanced Encryption Standard) Rounds ◦ Sub. Bytes—a non-linear substitution step where each byte is replaced with another according to a lookup table. ◦ Shift. Rows—a transposition step where the last three rows of the state are shifted cyclically a certain number of steps. ◦ Mix. Columns—a mixing operation which operates on the columns of the state, combining the four bytes in each column. ◦ Add. Round. Key
AES(Advanced Encryption Standard)
- Slides: 19