Unit - 1
Unit - 1
MEFGI , RAJKOT
Studying Scheme
edition , willion stallings , pearson. Cryptography and n/w security , Forouzan. Cryptography and n/w security , Atul Kahate,TMH.
Communication of DATA between sender and receiver over insecure channel.. How to transfer data securely over insecure channel???????
OSI Security Architecture Provides the frame work for defining security attacks, mechanisms and services. Security Attacks : Passive attack : Unauthorized reading of message or traffic analysis Active attack : Modification of message or files and DoS. Security mechanism: Process that is designed to detect, prevent , or recover from security attack. Security services : Includes authentication, access control , data confidentiality , data integrity , nonrepudiation , and availability
Integrity
Confidentiality : Hiding the information from unauthorized access. Integrity : Preventing information from unauthorized modification. Availability : Easily available to authorized user
Confidentiality : Information should remain secret , related with both storage and also transit. Loss of confidentiality is unauthorized disclosure of information. Integrity : Change should be made by authorized user. 1) Preventing the modification 2) Detecting the modification Availability : Confidentiality and integrity should not hinder the availability
1. Release of message content : A telephone conversation and email and transferred file may contain sensitive or confidentiality information. Prevent attacker from reading this content.
2. Traffic Analysis : Observing Identity of sender and receiver. Observing pattern or type of file which is transferred.
1. Masquerade : when one entity pretend as a different entity. A masquerade attack is an attack that uses a fake identity, such as a network identity, to gain unauthorized access to personal computer information. Stolen user id and password
3. Modification of message: Some portion of message is altered or reordered to produce an unauthorized effect. Ex. : Original message : Allow john to read confidential files is altered as Allow brown to read confidential files. 4. Denial of service. Slow down with multiple request. Prevent the normal use or management of comm. Facility. Ex. Direct all messages to only one destination , disable the n/w or overload n/w.
Employee of company and project Manager can have different access control even though both are authorized user.
1. Encipherment : Use of mathematical algorithm to transform the data that is not readily intelligible.
Example : encryption , Steganography .. May be used for authentication , non repudiation..
2. Digital signature :
Sign digitally piece of information Later in details Ex. Hash funcation
Data integrity : A small checksum value for a massage is appended and sent to receiver. Authentication : Mechanism intended to ensure the identity of an entity by means of information exchange. Traffic padding : The insertion of bits into gaps in a data stream to frustrate analysis attempts. Routing control : enables security of particular physically secure routes for certain data and allow routing changes. Notarization : the use of trusted third party to assure certain properties of a data exchange.
Topics to be covered
Symmetric cipher mode Substitution techniques Transposition techniques Rotor Machine Steganography
A cipher or cryptosystem(Can be Encryption Algorithm) is used to encrypt the plain text. Encryption : Plain text to cipher text Decryption : Cipher text to plain text KEY : used for mapping between plain text to cipher text A symmetric key cryptosystem : Same key to encrypt as well as decrypt.
Ek(m) = c ,
Dk(c) = m
A public key cryptography : Use public key to encrypt but secret key to decrypt. Epk(m) = c , Dsk(c) = m where pk is public and sk is secret key
A symmetric encryption key is 5 topple (p ,c ,k ,E , D). Plain text(p) : original understandable message or data that is fed in to algorithm as input. Cipher text(c): Random stream of not understandable data generated from plain text using key. Secret Key(k) : Also input to encryption and decryption algorithms. independent of plain text and algorithm . Exact operation performed by algorithm will depend on key. Encryption : Algorithm which transformation on plain text. perform various substitution and
Cipher or cryptographic system : a scheme or algorithm for encryption and decryption Cryptography: science of studying ciphers
Mathematically:
Y = EK(X) or X = DK(Y) or Y = E(K, X) X = D(K, Y)
X = plaintext Y = ciphertext K = secret key E = encryption algorithm D = decryption algorithm Both E and D are known to public
There are two requirements for secure use of conventional encryption: 1. We need a strong encryption algorithm. At a minimum, we would like the algorithm to be such that an opponent who knows the algorithm and has access to one or more cipher texts would be unable to decipher the cipher text or figure out the key. 2. Sender and receiver must have obtained copies of the secret key in a secure fashion and must keep the key secure.
The type of operation used for transforming plain text into cipher text : Substitution , or transposition(permutation), product. The number of key is used Symmetric cryptosystem or Asymmetric.
The way in which the plain text is processed. Block cipher : process one block of elements at a time. Stream cipher : process input elements continuously.
Objective: to recover the plaintext of a ciphertext or, more typically, to recover the secret key. Kerkhoffs principle: the adversary knows all details about a cryptosystem except the secret key. Two general approaches:
brute-force attack non-brute-force attack (cryptanalytic attack)
Brute-force attack: The attacker tries every possible key Average, half of all possible keys must be tried to achieve success.
Number of Alternative Keys 232 = 4.3 109 256 = 7.2 1016 2128 = 3.4 1038 231 s 255 s 2127 s Time required at 1 decryption/s = 35.8 minutes = 1142 years = 5.4 1024 years Time required at 106 decryptions/s 2.15 milliseconds 10.01 hours 5.4 1018 years
32 56 128
168
2167 s
26 characters (permutation)
26! = 4 1026
Unconditionally secure : cipher text does not contain enough information to convert it into plain text. Except OTP algo , not a single encryption algorithm is unconditionally secure. Computationally secure : If encryption algorithm. is following any of below criteria : The cost of breaking the cipher exceeds the value of encrypted information. The time required to break the cipher exceeds the useful lifetime of the information
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
Ceaser cipher Monoalphabetic cipher Playfair cipher Hill cipher Polyalphabetic ciphers OTP(One time pad)
To remember : (Chief Ministers Officer is learning PHP for applying replacement technique )
Developed By julius ceaser. Replacing Each letter of alphabet with the letter standing three places further down the alphabet. 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 B C
Note : Plain text(p) is always lowercase and cipher text(C) is always upper case (only to distinguish).
If its know that Ceaser cipher is used, then brute force cryptanalysis is easily performed : Encryption algorithm and decryption algorithms are known. Only 25 keys to try. Language of plain text is easily recognizable. Sol. : Compress using ZIP algo. And encrypt it.
How much possible permutation are there for letters a,b,c ??? Permutation : is a finite set of elements S is an ordered sequence of all the elements of S,with each appearing once
In ceaser cipher only 25 possible keys..but here 26! = 4 * 1026 With so many keys, it is secure against brute-force attacks. But not secure against some cryptanalytic attacks. Problem is language characteristics.
Two types :
Provides autokey system ,also called as running key cipher Simplest polyalphabetic substitution cipher Consider the set of all Caesar ciphers: { Ca, Cb, Cc, ..., Cz } Key: e.g. security Encrypt each letter using Cs, Ce, Cc, Cu, Cr, Ci, Ct, Cy in turn. Repeat from start after Cy. Decryption simply works in reverse.
There are multiple (how many?) cipher text letters corresponding to each plaintext letter.
So, letter frequencies are obscured but not totally lost. To break Vigenere cipher:
1. 2.
Try to guess the key length. How? If key length is N, the cipher consists of N Caesar ciphers. Plaintext letters at positions k, N+k, 2N+k, 3N+k, etc., are encoded by the same cipher. Attack each individual cipher as before.
3.
Developed by AT&T engineer , Gillbert vernam in 1918. System works on binary data System is Ci = pi XOR ki pi = ith binary digit of plaintext ki = ith binary digit of key Ci = ith binary digit of ciphertext exclusive-or (XOR) operation
pi = Ci XOR ki
Not even the large number of keys in a monoalphabetic cipher provides security. One approach to improving security is to encrypt multiple letters at a time. The Playfair Cipher is the best known such cipher. Invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair.
Use a 5 x 5 matrix. Fill in letters of the key (w/o duplicates). Fill the rest of matrix with other letters. E.g., key = MONARCHY.
M
C E L U
O
H F P V
N
Y G Q W
A
B I/J S X
R
D K T Z
If a pair is a repeated letter, insert filler like 'X. If both letters fall in the same row, replace each with the letter to its right (circularly). If both letters fall in the same column, replace each with the the letter below it (circularly). Otherwise, each letter is replaced by the letter in the same row but in the column of the other letter of the pair.
Equivalent to a monoalphabetic cipher with an alphabet of 26 x 26 = 676 characters. Security is much improved over the simple monoalphabetic cipher. Was widely used for many decades
Once thought to be unbreakable. Actually, it can be broken, because it still leaves some structure of plaintext intact.
One-time pad. Idea is to Choose random key. Each new message requires new key. For same cipher text ,based on key , multiple plain text can be generated. One time key as long as message. Only crypto system that is referred as a perfect secrecy
Rail fence cipher : plaintext is written down as a sequence of diagonals and then read off sequence of rows.
Example : encrypt meet me after toga party using rail fence of depth 2. mematrhtgpry etefeteoaat So cipher text : MEMATRHTGPRYETEFETEOAAT
TTNAAPTMTSUOAODWCOIXKNLYPETZ
Combine Substitution and Transposition Methods produce ciphers that are very difficult to break Rotor Machines in World War II: German Enigma and Japanese Purple Used a series of rotating cylinders. Implemented a poly alphabetic substitution cipher of period K.
Enigma was a portable cipher machine used to encrypt and decrypt secret messages.
A few here
Sigaba (United States) Typex (Britain) Lorenz cipher (Germany) Geheimfernschreiber (Germany) http://w1tp.com/enigma/