CRYPTOGRAPHY Presented by: Debi Prasad Mishra Institute of Technical Education & Reaserch Electronics & Telecommunication Engineering Section - A Section.

Slides:



Advertisements
Similar presentations
6.1.2 Overview DES is a block cipher, as shown in Figure 6.1.
Advertisements

CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
1 CIS 5371 Cryptography 5b. Pseudorandom Objects in Practice Block Ciphers.
Cryptography and Network Security Chapter 3
Data Encryption Standard (DES)
1 The RSA Algorithm Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
Session 4 Asymmetric ciphers.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
Block Ciphers: Workhorses of Cryptography COMP 1721 A Winter 2004.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
1 Chapter 3 – Block Ciphers and the Data Encryption Standard Modern Block Ciphers  now look at modern block ciphers  one of the most widely used types.
1 Chapter 3 – Block Ciphers and the Data Encryption Standard Modern Block Ciphers  now look at modern block ciphers  one of the most widely used types.
Csci5233 Computer Security & Integrity 1 Cryptography: Basics (2)
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
Cryptography & Number Theory
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Lecture 23 Symmetric Encryption
8: Network Security8-1 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key: K r e.g., key is knowing substitution.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
A Cryptography Tutorial Jim Xu College of Computing Georgia Tech
Chapter 3 – Block Ciphers and the Data Encryption Standard
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
The Digital Encryption Standard CSCI 5857: Encoding and Encryption.
Public Key Model 8. Cryptography part 2.
Chapter 12 Cryptography (slides edited by Erin Chambers)
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
A Cryptography Education Tool Anna Yu Department of Computer Science College of Engineering North Carolina A&T State University June 18, 2009.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
Dr. Khalid A. Kaabneh Amman Arab University
Network Security Lecture 14 Presented by: Dr. Munam Ali Shah.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Lec. 5 : History of Cryptologic Research II
CSCE 201 Introduction to Information Security Fall 2010 Data Protection.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Network Security Lecture 11 Presented by: Dr. Munam Ali Shah.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
National Institute of Science & Technology Cryptology and Its Applications Akshat Mathur [1] Cryptology and Its Applications Presented By AKSHAT MATHUR.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
Introduction to Modern Symmetric-key Ciphers
24-Nov-15Security Cryptography Cryptography is the science and art of transforming messages to make them secure and immune to attacks. It involves plaintext,
15-499Page :Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.
NEW DIRECTIONS IN CRYPTOGRAPHY Made Harta Dwijaksara, Yi Jae Park.
Lecture 23 Symmetric Encryption
+ Security. + What is network security? confidentiality: only sender, intended receiver should “understand” message contents sender encrypts message receiver.
Lecture 3 Overview. Ciphers The intent of cryptography is to provide secrecy to messages and data Substitutions – ‘hide’ letters of plaintext Transposition.
Computer and Network Security Rabie A. Ramadan Lecture 3.
K. Salah1 Cryptography Module I. K. Salah2 Cryptographic Protocols  Messages should be transmitted to destination  Only the recipient should see it.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
5.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 5 Introduction to Modern Symmetric-key Ciphers.
Computer Security Lecture 5 Ch.9 Public-Key Cryptography And RSA Prepared by Dr. Lamiaa Elshenawy.
Lecture 3 Overview. Ciphers The intent of cryptography is to provide secrecy to messages and data Substitutions – ‘hide’ letters of plaintext Transposition.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 7 September 9, 2004.
Module :MA3036NI Symmetric Encryption -3 Lecture Week 4.
Lecture 3 (Chapter 9) Public-Key Cryptography and RSA Prepared by Dr. Lamiaa M. Elshenawy 1.
Block Ciphers and the Data Encryption Standard. Modern Block Ciphers  One of the most widely used types of cryptographic algorithms  Used in symmetric.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
Lecture 4 Data Encryption Standard (DES) Dr. Nermin Hamza
Networks and Communication Systems Department
NET 311 Information Security
PART VII Security.
NET 311 Information Security
Presentation transcript:

CRYPTOGRAPHY Presented by: Debi Prasad Mishra Institute of Technical Education & Reaserch Electronics & Telecommunication Engineering Section - A Section - A 7 th Semester Regd. No

Talk Flow  Terminology  Secret-key cryptographic system  Block cipher  Stream cipher  Requirement of secrecy  Information theoretic approach Perfect security Diffusion and confusion  Practicability of cipher  Substitution cipher  Transposition cipher  Data Encryption Standard (DES) algorithm  Public-key cryptographic system Diffie-Hellman key distribution  Rivest-Shamir-Adleman (RSA) algorithm  Digital Signature: A hybrid approach

 Cryptology is the term used to describe the science of secret communication.  Derived from Greek words kryptos (hidden) & logos (word).  Divided into two parts. Cryptography:- transforms message into coded form and recovers the original signal. Cryptanalysis:- deals in how to undo cryptographic communication by breaking coded signals tht may be accepted as genuine.

Terminology  Plaintext:- The original message to be encoded  Enciphering or Encryption:- The process of encoding  Ciphertext or Cryptogram:- The result produced by encryption  Cipher:- The set of data transmission used to do encryption  Key:- parameters of transformation

Services offered by Cryptography  Secrecy, which refers to the denial of access to information by unauthorised users  Authenticity, which refers to the validation of the source of message  Integrity, which refers to the assurance that a message was not modified by accidental or deliberate means in transit

Cryptography Secret-key (Single-key) Cryptography Public-key (Two-key) Cryptography A conventional Cryptographic system relies on use of a single piece of private and necessarily secret key. Key is known to sender & receiver, but to no others. Each user is provided with key material of one’s own with a private component & a public component The private component must be kept secret for secure communication.

Secret-key Cryptography Let X -> Plaintext message; Y -> Cryptogram; Z -> Key F ->Invertible transformation producing the cryptogram Y = F (X, Z) =F Z (X) Let F -1 ->Inverse transform of F to recover original message F -1 (Y, Z) = F z -1 (Y) = F Z -1 (F Z (X)) = X

Secret-key Cryptography continued… Here Y’ ->fraudulent message modified by an interceptor or eavesdropper

Block Ciphers Block ciphers are normally designed in such a way that a small change in an input block of plaintext produces a major change in the resulting output. This error propagation property of block ciphers is valuable in authentication in that it makes it improbable for an enemy cryptanalyst to modify encrypted data, unless knowledge of key is available.

Stream ciphers  Whereas block ciphers operate on large data on a block-by- block basis, stream ciphers operate on individual bits. Let x n -> Plaintext bit; y ->ciphertext bit; z ->keystream bit at n th instant For encryption: y n = x n z n, n=1, 2, …, N For decryption: x n = y n z n, n=1, 2, …, N

Stream ciphers continued…  A binary additive stream cipher has no error propagation; the decryption of a distorted bit in the ciphertext affects only the corresponding bits of the resulting output.  Stream ciphers are generally better suited for secure transmission of data over error – prone communication channels; they are used in application where high data rates are a requirement (as in secure video) or when a minimal transmission delay is essential.

Requirement of Secrecy ASSUMPTION:- An enemy cryptanalyst has knowledge of the entire mechanism used to perform encryption, except for the secret key.

Requirement of Secrecy continued… Attacks employed by enemy cryptanalyst: Ciphertext-only attack  Access to part or all of the ciphertext Known-plaintext attack  Knowledge of some ciphertext:-plaintext pairs formed with the actual secret key Chosen-plaintext attack  Submit any chosen plaintext message and receive in return the correct ciphertext for the actual secret key. Chosen-ciphertext attack  Choose an arbitrary ciphertext and find the correct result for its decryption.

Information theoretic approach In Shannon model of cryptography (published in Shannon’s 1949 landmark paper on information- theoretic approach to secrecy systems) ASSUMPTION:- 1.Enemy cryptanalyst has unlimited time & computing power. 2.But the enemy is presumably restricted to ciphertext- only attack. The secrecy of the system is said to be broken when decryption is performed successfully, obtaining a unique solution to the cryptogram

Information theoretic approach (continued…) Let X = {X 1, X 2, …, X N } ->N-bit plaintext message, Y = {Y 1, Y 2, …,Y N } ->N-bit cryptogram Secret key Z is assumed to be determined by some probability distribution Let H (X) ->uncertainty about x H (X | Y) ->uncertainty about X given knowledge of Y Now, mutual information between X & Y, I (X;Y) = H (X) – H(X | Y) represents a basic measure of security in the Shannon model.

Perfect Security Perfect Security Assuming that an enemy cryptanalyst can observe only the cryptogram Y, for perfect security X & Y should be statistically independent. I (X;Y)=0 =>H (X) = H (X|Y) …………… (1) Given the secret key Z; H (X|Y) ≤ H (X; Z|Y) = H (Z|Y) + H (X|Y,Z) …(2) H(X|Y,Z)=0; iff Y & Z together uniquely determine X Equation 2 can be rewritten as H(X|Y) ≤ H(Z|Y) ≤ H(Z) …………(3) With equation 3 equation 1 becomes H(Z) ≥ H(X) ……………………………..(4) Is called Shannon’s fundamental bound for perfect security. Result: The key must be at least as long as the plaintext.

Diffusion & Confusion  In diffusion, statistical nature of the plaintext is hidden by spreading out the influence of single bit in plaintext over large number of bits in ciphertext.  In confusion, the data transformations are designed to complicate the determination of the way in which the statistics of ciphertext depend on that of the plaintext. Practicability of Cipher For a cipher to be of practical value 1.It must be difficult to be broken by enemy cryptanalyst. 2.It must be easy to encrypt & decrypt with knowledge of secret key.

Substitution cipher Each letter of plaintext is replaced by a fixed substitute. For plaintext X = {x 1,x 2,x 3,x 4,…) ciphertext Y ={y 1,y 2,y 3,y 4,,…) ={f(x 1 ),f(x 2 ),f(x 3 ),f(x 4 ),….}

Transposition cipher The plaintext is divided into groups of fixed period d & the same permutation is applied to each group. The particular permutation rule being determined by the secret key.

Data Encryption Standard (DES)  It is the most widely used secret-key cryptalgorithm.  It operates on 64-bit plaintext and uses 56-bit key.  The overall procedure can be given as P -1 {F[P(X)]} where, X->plaintext P->certain permutation F->certain transposition & substitution F is obtained by cascading a certain function f, with each stage of cascade referred as around.  There are 16 rounds employed here.

How DES works?  DES operates on 64-bit of data. Each block of 64 bits is divided into two blocks of 32 bits each, a left half block L and a right half R. M = ABCDEF M = L = R =

Key Computation  The 64-bit key is permuted according to the following table & 56-bit key is calculated from it LET K = The 56-bit permutation: K+ = From the permuted key K+, we get C 0 = D 0 =

Key Computation continued…  With C 0 and D 0 defined, we now create sixteen blocks C n and D n, 1<=n<=16. Each pair of blocks C n and D n is formed from the previous pair C n-1 and D n-1, respectively, for n = 1, 2,..., 16, using the following schedule of "left shifts" of the previous block. Iteration Number Number of Left Shifts C0 = D0 = C1 = D1 = C2 = D2 = and so on upto C 16 & D 16.

Key Computation continued…  We now form the keys Kn, for 1<=n<=16, by applying the following permutation table to each of the concatenated pairs C n D n C 1 D 1 = K 1 = Similarly, K 2 = K 3 = and so on upto K 16. Thus the 16, 48-bit subkeys are obtained.

Encoding Data  There is an initial permutation, IP of the 64 bits of the message data, M. This rearranges the bits according to the following table M = IP =  Next divide the permuted block IP into a left half L 0 of 32 bits, and a right half R 0 of 32bits. L 0 = R 0 =

Encoding Data continued…  We now proceed through 16 iterations, for 1<=n<=16, using a function, f which operates on two blocks - a data block of 32 bits and a key K n of 48 bits - to produce a block of 32 bits. L n = R n-1 R n = L n-1 f(R n-1, K n ) For n = 1, we have K 1 = L 1 = R 0 = R 1 = L 0 + f(R 0, K 1 )  It remains to explain how the function f works.

Encoding Data continued…  To calculate f, we first expand each block R n-1 from 32 bits to 48 bits.  This is done by using a selection table called E-table that repeats some of the bits in R n E-table We calculate E(R 0 ) from R 0 as follows: R 0 = E(R 0 ) =

Encoding Data continued…  Next in the f calculation, we XOR the output E(R n-1 ) with the key K n : For K 1, E(R 0 ), we have K 1 = E(R 0 ) = K 1 +E(R 0 ) =  We now use each group of six bits as addresses in tables called "S boxes".  Each group of six bits will give us an address in a different S box. Located at that address will be a 4 bit number.  This 4 bit number will replace the original 6 bits.  The net result is that the eight groups of 6 bits are transformed into eight groups of 4 bits (the 4-bit outputs from the S boxes) for 32 bits total. K n E(R n-1 )

Encoding Data continued… Column number Row numberRow number S 1 Box Here S 1 (011011) = 0101 Similarly, there exists S 1, S 2,…, S 8 For the first round, we obtain as the output of the eight S boxes: K1 + E(R0) = S =

Encoding Data continued…  The final stage in the calculation of f is to do a permutation P of the S-box output to obtain the final value of f:  The permutation P is defined in the following table. P yields a 32-bit output from a 32-bit input by permuting the bits of the input block. f = P(S) P From S = f =

Encoding Data continued…  R 1 = L 0 f(R 0, K 1 )  Proceeding like this we obtain L 1 R 1, L 2 R 2,…, L 16 R 16.  At the end of the sixteenth round we have the blocks L16 and R16. We then reverse the order of the two blocks into the 64-bit block R 16 L 16 and apply a permutation IP -1. = =

Encoding Data continued… IP -1 LET R 16 L 16 = IP -1 = which in hexadecimal format is 85E813540F0AB405. Thus the encrypted form of M = ABCDEF: namely, C = 85E813540F0AB405

Decryption Decryption is simply the inverse of encryption, following the same steps as above, but reversing the order in which the subkeys are applied.

Disadvantages of Secret-key Cryptography  Use of physical secure channel Courier service or registered mail for key distribution is costly, inconvenient & slow  Requirement of large network For n user channels required n*(n-1)/2  This large network leads to use of insecure channel for key distribution & secure message transmission.

Public-key Cryptography  It contains two components. Private component, known to the authorised user only Public component, visible to everybody  Each pair of keys must have two basic properties. Whatever message encrypted with one of the keys can be decrypted by the other key. Given knowledge of the public key, it is computationally infeasible to compute the private key.  The key management here helps in development of large network.

Diffie-Hellman Public-key Distribution  It uses the concept that, it is easy to calculate the discrete exponential but difficult to calculate discrete logarithm. Discrete exponential : Y = α X mod p, for 1≤ X ≤p-1 Discrete logarithm : X = log α Y mod p, for 1≤ Y≤p-1  All users are assumed to know both α, p.  A user i, selects an independent random number X i, uniformly from the set of integers {1, 2,…, p} that is kept private.  But the discrete exponential Y i = α X i mod p is made public.

Diffie-Hellman Public-key Distribution continued…  Now, user I & j want to communicate.  To proceed, user i fetches Y j from public directory & uses the private X i to compute K ji =(Y j ) X i mod p =(α X j ) X i mod p =α X j X i mod p  In a similar way, user j computes K ij. But we have K ij = K ji  For an eavesdropper must compute K ji from Y i & Y j applying the formula K ji =(Y j ) log Y i mod p  Since it involves discrete logarithm not easy to calculate.

Rivest-Shamir-Adleman (RSA) System It is a block cipher based upon the fact that finding a random prime number of large size (e.g., 100 digit) is computationally easy, but factoring the product of two such numbers is considered computationally infeasible.

RSA algorithm 1.Key Generation 2.Generate two large prime numbers, p and q 3.Let n = p*q 4.Let m = (p-1)*(q-1) 5.Choose a small number e, coprime to m 6.Find d, such that de % m = 1 Encryption C = P e % n Decryption P = C d % n x % y means the remainder of x divided by y Publish e and n as the public key. Keep d and n as the secret key. To be secure, very large numbers must be used for p and q decimal digits at the very least.

RSA : An Illustration  Generate two large prime numbers, p and q To make the example easy to follow I am going to use small numbers, but this is not secure. Lets have: p = 7;q=19  Let n = p*q = 7 * 19 = 133  Let m = (p - 1)*(q - 1) = (7 - 1)(19 - 1) = 6 * 18 = 108  4) Choose a small number, e coprime to m e = 2 => gcd(e, 108) = 2 (no); e = 3 => gcd(e, 108) = 3 (no); e = 4 => gcd(e, 108) = 4 (no); e = 5 => gcd(e, 108) = 1 (yes!)  Find d, such that de % m = 1 n = 0 => d = 1 / 5 (no); n = 1 => d = 109 / 5 (no); n = 2 => d = 217 / 5 (no); n = 3 => d = 325 / 5 = 65 (yes!)

RSA : An Illustration continued…  Public Key: n = 133; e = 5  Secret Key: n = 133; d = 65 Encryption  lets use the message "6". C = P e % n = 6 5 % 133 = 7776 % 133 = 62 Decryption P = C d % n = % 133 = 6

Digital Signature: A hybrid approach  The most useful requirements for a digital signature is authenticity and secrecy.  RSA provide an effective method for key management, but they are inefficient for bulk encryption of data.  DES provide better throughput, but require key management.  So, a combinational approach can be considered for practical usability, e.g., RSA may be used for authentication and DES used for encryption.

Reference  Simon Haykin, Communication Systems, 4th ed. (New York: John Wiley & Sons, 2004)  Martin A. Hellman, “An overview of public key cryptography,” IEEE communications magazine, vol. 16, no. 6, November  C. E. Shannon, “A mathematical theory of communication,” Bell system technical journal, p. 623, July  Gary C. Kessler, “An overview of cryptography,” May 1998  edited version of Handbook on Local Area Networks (Auerbach, September 1998)    

QUERIES???

THANK YOU