Network Security Unit-III

Slides:



Advertisements
Similar presentations
Chapter 3 Public Key Cryptography and Message authentication.
Advertisements

Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
Elliptic Curve Cryptography (ECC) Mustafa Demirhan Bhaskar Anepu Ajit Kunjal.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
CSE331: Introduction to Networks and Security Lecture 21 Fall 2002.
Kemal AkkayaWireless & Network Security 1 Department of Computer Science Southern Illinois University Carbondale CS 591 – Wireless & Network Security Lecture.
Henric Johnson1 Chapter3 Public-Key Cryptography and Message Authentication Henric Johnson Blekinge Institute of Technology, Sweden
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
ELECTRONIC PAYMENT SYSTEMSFALL 2001COPYRIGHT © 2001 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Public Key Model 8. Cryptography part 2.
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
1 Public-Key Cryptography and Message Authentication Ola Flygt Växjö University, Sweden
Lecture slides prepared for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 21 “Public-Key Cryptography.
Elliptic Curve Cryptography
Digital Signatures: Mathematics Zdeněk Říha. Data authentication Data integrity + data origin Digital signature Asymmetric cryptography public and private.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Public Key Encryption CS432 – Security in Computing Copyright © 2005, 2008 by Scott Orr and the Trustees of Indiana University.
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Chapter 21 Public-Key Cryptography and Message Authentication.
1 Chapter 4 Key Topics Asymmetric Key Cryptography –RSA –ElGamal Schnorr DSS Message Digest –MD5 –SHA-1 Message Authentication Code (MAC)
Lecture 8 Overview. Secure Hash Algorithm (SHA) SHA SHA SHA – SHA-224, SHA-256, SHA-384, SHA-512 SHA-1 A message composed of b bits.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
Public Key Cryptosystem Introduced in 1976 by Diffie and Hellman [2] In PKC different keys are used for encryption and decryption 1978: First Two Implementations.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 11 September 23, 2004.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Cryptographic Security Aveek Chakraborty CS5204 – Operating Systems1.
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
1 Public Key Cryptography. 2 Public Key Cryptography Agenda: Message authentication – authentication codes and hash functions Public key encryption –
Public Key Cryptography. Asymmetric encryption is a form of cryptosystem in which Encryption and decryption are performed using the different keys—one.
@Yuan Xue 285: Network Security CS 285 Network Security Hash Algorithm Yuan Xue Fall 2012.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 14. Digital signature.
Chapter 12 – Hash Algorithms
Asymmetric-Key Cryptography
ASymmetric Key Algorithms
Public Key Cryptosystem
Asymmetric-Key Cryptography
Key Exchange References: Applied Cryptography, Bruce Schneier
Public-Key Cryptography and Message Authentication
Computer Communication & Networks
Cryptographic Hash Function
Public Key Encryption and Digital Signatures
Chapters 14,15 Security.
Introduction to Security
Basic Network Encryption
NET 311 Information Security
Elliptic Curve Cryptography (ECC)
Public Key Cryptography Diffie-Hellman, Discrete Log, RSA
PART VII Security.
Practical Aspects of Modern Cryptography
NET 311 Information Security
Cryptography: Basics (2)
Enabling Technology1: Cryptography
Intro to Cryptography Some slides have been taken from:
NET 311 Information Security
Chapters 14,15 Security.
Chapter -7 CRYPTOGRAPHIC HASH FUNCTIONS
Introduction to Elliptic Curve Cryptography
Chapter 3 - Public-Key Cryptography & Authentication
Chapter 29 Cryptography and Network Security
Basic Network Encryption
Symmetric-Key Cryptography
Fluency with Information Technology Lawrence Snyder
Diffie-Hellman Key Exchange
Presentation transcript:

Network Security Unit-III ASymmetric Key Algorithms www.educlash.com

Overview of asymmetric –key cryptography Receiver B Sender A Encrypt the message with B public key Decrypt the message with B private key One key is used for locking. Other is used for unlocking. Public key is used for locking. Private key is used for unlocking. www.educlash.com

RSA Algorithm Invented by Rivest, Shamir & Adleman of MIT in 1977 Choose two large prime numbers P and Q Calculate N=PxQ Select Public key E as not a factor of (P-1)x(Q-1) Select Private key D as (DxE) mod (P-1)x(Q-1)=1 For Encryption, CT=PTE mod N Send CT to the receiver For Decryption, PT=CTD mod N www.educlash.com

Example: P=7 and Q=17 Calculate N=7x17=119 Select Public key E as not a factor of (P-1)x(Q-1) i.e. (7-1)x(17-1) = 6x16 = 96. The factors of 96 are: 2,3,4,15,6. So, let us say, we keep E = 5 Select Private key D as (DxE) mod (P-1)x(Q-1)=1 (Dx5) mod (7-1)x(17-1)=1 (Dx5) mod 6x16=1. After some calculations, we say D=77 For Encryption, CT=PTE mod N. let us say PT=10 CT=105 mod 119 = 40 Send CT to the receiver For Decryption, PT=CTD mod N PT= 4077 mod 119 = 10 www.educlash.com

Elgamal Cryptography The ElGamal encryption system is an asymmetric key encryption algorithm for public-key cryptography which is based on the Diffie-Hellman Exchange Agreement. The system parameters consist of a prime p and an integer g, whose powers modulo p generate a large number of elements, as in Diffie-Hellman. A has a private key a and a public key y, where y = ga (mod p). Suppose B wishes to send a message m to A. B first generates a random number k less than p. He then computes :- y1 = gk (mod p) and y2 = m xor yk, B sends (y1 ,y2) to A. Upon receiving the ciphertext, A computes :- m = (y1a mod p) xor y2 . www.educlash.com

Elliptic curve algorithm Elliptical curve cryptography (ECC) is a public key encryption technique based on elliptic curve theory that can be used to create faster, smaller, and more efficient cryptographic keys. ECC generates keys through the properties of the elliptic curve equation instead of the traditional method of generation as the product of very large prime numbers. www.educlash.com

– ECC was introduced by Victor Miller and Neal Koblitz in 1985. – It’s new approach to Public key cryptography. – ECC requires significantly smaller key size with same level of security. – Benefits of having smaller key sizes : faster computations, need less storage space. – ECC ideal for : Pagers ; PDAs ; Cellular Phones ; Smart Cards. www.educlash.com

Elliptic Curves Standard Form Equation y2 = x3 + a.x + b where x, y, a and b are real numbers. x,y,a form the public key whereas b forms a private key. Graph from An intro to Elliptical Curve Cryptography at http://www.deviceforge.com/articles/AT4234154468.html, which is a reproduction of An Elliptic Curve Cryptography (ECC) Primer by Certicom. www.educlash.com

KNAPSACK ALGORITHM That is, if M1, M2, ..., Mn are the given values and S is the sum, find out bi so that: S = b1M1 + b2M2 + ... + bnMn Each bi can be 0 or 1. 1 indicates that the item is in the knapsack 0 indicates that it is not www.educlash.com

Message Digest A message digest is a fingerprint or the summary of a message. It is used to verify the integrity of data to ensure that the data is not altered in any way. www.educlash.com

MD5 Steps: 1.) Padding (64 bits less than a multiple of 512) 2.) Append Length (of length 64 bits) 3.) Divide the input into 512-bit blocks 4.) Initialize chaining variables 5.) Process Blocks 5.1> copying chaining variables into temporary variables 5.2> Divide current 512 block into 16 subblocks of 32-bit 5.3> perform 4 rounds www.educlash.com

Each of A, B, C, D is a 32-bit register. Chaining variables :- word A: 01 23 45 67 word B: 89 ab cd ef word C: fe dc ba 98 word D: 76 54 32 10 Each of A, B, C, D is a 32-bit register. www.educlash.com

Functions used in 4 rounds:- F(X,Y,Z) = (X & Y) | (~(X) & Z) G(X,Y,Z) = (X & Z) | (Y & ~(Z)) H(X,Y,Z) = X ^ Y ^ Z I(X,Y,Z) = Y ^ (X | ~(Z)) Four functions will be defined such that each function takes an input of three 32-bit words and produces a 32-bit word output. www.educlash.com

A mathematical expression of a single MD5 operation: a = b + ((a + F (b, c, d) + X [k] + T [i]) <<< s). www.educlash.com

Secure Hash Algorithm (SHA) SHA works with any input message that is less than 264 bits in length. The output of SHA is a message digest, which is 160 bits in length (32 bits more than the message digest produced by MD5). The word Secure in SHA was decided based on two features. SHA is designed to be computationally infeasible to obtain the original message, given its message digest, and find two messages producing the same message digest. www.educlash.com

The Working of SHA Step 1: Padding : such a way that the length of the message is 64 bits short of a multiple of 512 Step 2: Append Length: appended to the end of the padding as a 64-bit block Step 3: Divide the Input into 512-bit Blocks: each of length 512 bits Step 4: Initialize Chaining Variables: five chaining variables A through E are initialized Step 5: Process Blocks: Step 5.1 Copy the chaining variables A-E into variables a-e. Step 5.2 Now, divide the current 5 12-bit block into 16 sub- blocks, each consisting of 32 bits. Step 5.3 SHA has four rounds, each round consisting of 20 steps. Each round takes the current 512-bit block, the register abcde and a constant K[t] (where t = 0 to 79) as the three inputs. www.educlash.com

Single SHA-1 iteration www.educlash.com

Mathematically, an iteration consists of the following operations: abcde = (e + Process P + s5 (a) + W[t] + K[t]), a, s30 (b), c, d where, abcde = The register made up of the five variables a, b, c, and e Process P = st = Circular-left shift of the 32-bit sub-block by t bits W[t] = A 32-bit derived from the current 32-bit sub-block, first 16 words of W (i.e. t = 0 to 15), the contents of the input message sub-block M[t] become the contents of W[t] straightaway W[t] = s1 (W [t- 16] XOR W[t - 14] XOR W[t - 8] XOR W[t - 3]) s1 indicates a circular-left shift BY 1 bit K[t] = One of the five additive constants. www.educlash.com

SHA-512 The SHA-512 algorithm takes a message of length 2128 bits, and produces a message digest of size 512 bits. The input is divided into blocks of size 1024 bits each. Step 1: Padding : Like MD5 and SHA-1, the first step in SHA is to add padding to the end of the original message Step 2: Append Length : length of the message is exactly a multiple of 1024 bits Step 3: Divide the Input into 1024-bit Blocks Step 4: Initialize Chaining Variables :Now, eight chaining variables, a through h, are initialized. Step 5: Process Blocks Step 5.1 Copy the chaining variables A-H into variables a-h. The combination of a-h, called abcdefgh Step 5.2 Now, divide the current 1024-bit block into 16 sub-blocks, each consisting of 64 bits. Step 5.3 SHA-512 has 80 rounds. Each round takes the current 1024-bit block, the register abcdefgh and a constant K[t] (where t = 0 to 79) as the three inputs. www.educlash.com

Message Authentication Code (MAC ) The concept of Message Authentication Code (MAC) is quite similar to that of a message digest. However, there is one difference. As we have seen, a message digest is simply a fingerprint of a message. There is no cryptographic process involved in the case of message digests. In contrast, a MAC requires that the sender and the receiver should know a shared symmetric (secret) key, which is used in the preparation of the MAC. Thus, MAC involves cryptographic processing. www.educlash.com

Digital Signature To provide Authenticity, Integrity and Non -repudiation to electronic documents A digital signature is an electronic signature that can be used to authenticate the identity of the sender of a message or the signer of a document, and possibly to ensure that the original content of the message or document that has been sent is unchanged. Digital signatures are easily transportable, cannot be imitated by someone else, and can be automatically time-stamped www.educlash.com

www.educlash.com

Symmetry and Asymmetry key together In practice, symmetric & asymmetric key cryptography are combined to have a very efficient security solution. www.educlash.com

1.) Sender’s side 2.) 3.) This process is called as “Key Wrapping” Symmetric Key (K1) Cipher Plain This process is called as “Key Wrapping” 2.) Asymmetric Public Key (K2) 3.) This is called as Digital Envelope Cipher www.educlash.com

Receiver’s side Asymmetric private key (K3) Cipher Symmetric key (K1) Plain www.educlash.com

Problems with public key exchange www.educlash.com

Tom Bob Alice Public key =17 A=20, B=13 Public key=17 Public key=20 Public key=17 Intercept Public key=13 Public key=17 Intercept www.educlash.com

Thank You www.educlash.com