Diffie-Hellman Key Exchange

Slides:



Advertisements
Similar presentations
The Diffie-Hellman Algorithm
Advertisements

Public Key Cryptography Nick Feamster CS 6262 Spring 2009.
Great Theoretical Ideas in Computer Science.
Public Key Algorithms …….. RAIT M. Chatterjee.
1 Authenticated key agreement without using one-way hash functions Harn, L.; Lin, H.-Y. Electronics Letters, Volume: 37 Issue: 10, 10 May 2001 Presented.
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
CSE331: Introduction to Networks and Security Lecture 20 Fall 2002.
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender and receiver if this key is disclosed communications.
Dr.Saleem Al_Zoubi1 Cryptography and Network Security Third Edition by William Stallings Public Key Cryptography and RSA.
1 Pertemuan 08 Public Key Cryptography Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
[[ NET-CENTRIC CAPABILITIES TURBULENCE TECHNICAL OVERVIEW : AUGUST 2007 ]] MATH CAREERS AT NATIONAL SECURITY AGENCY Jill Calhoun May 2010.
Cryptography and Network Security Chapter 10. Chapter 10 – Key Management; Other Public Key Cryptosystems No Singhalese, whether man or woman, would venture.
CSCI 172/283 Fall 2010 Public Key Cryptography. New paradigm introduced by Diffie and Hellman The mailbox analogy: Bob has a locked mailbox Alice can.
Lecture 6: Public Key Cryptography
Chapter 12 Cryptography (slides edited by Erin Chambers)
Lecture 7b: The Diffie-Hellman Secret Sharing Scheme Wayne Patterson SYCS 653 Fall 2009.
Great Theoretical Ideas in Computer Science.
RSA Ramki Thurimella.
Chapter 21 Public-Key Cryptography and Message Authentication.
Private-Key Cryptography  traditional private/secret/single key cryptography uses one key  shared by both sender and receiver  if this key is disclosed.
Cryptography and Network Security (CS435) Part Eight (Key Management)
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
Cryptography and Network Security Chapter 9 - Public-Key Cryptography
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
CRYPTOGRAPHY. WHAT IS PUBLIC-KEY ENCRYPTION? Encryption is the key to information security The main idea- by using only public information, a sender can.
Cryptography and Network Security Public Key Cryptography and RSA.
What use are prime numbers? ?. o All the primes, apart from 2, are odd numbers. o 1 is not a prime number. Why? o There are infinitely many prime numbers!
Key Management Network Systems Security Mort Anvari.
Week 4 - Wednesday.  What did we talk about last time?  Finished DES  AES.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
CSEN 1001 Computer and Network Security Amr El Mougy Mouaz ElAbsawi.
Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys – use of public-key.
Digital Signatures.
최신정보보호기술 경일대학교 사이버보안학과 김 현성.
Public Key Encryption Major topics The RSA scheme was devised in 1978
DTTF/NB479: Dszquphsbqiz Day 26
Privacy & Security.
COMPSCI 290.2: Computer Security
Public-Key Cryptography and RSA
RSA and El Gamal Cryptosystems
Public-key Cryptography
Public Key Encryption and the RSA Algorithm
Big Numbers: Mathematics and Internet Commerce
Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Diffie-Hellman Secure Key Exchange 1976.
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Strong Password Protocols
NET 311 Information Security
Chapter 10: Key Management (Again) and other Public Key Systems
Public Key Cryptography
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Strong Password Protocols
Key Management Network Systems Security
Homework #4 Solutions Brian A. LaMacchia
El Gamal and Diffie Hellman
Diffie-Hellman key exchange/agreement algorithm
Discrete Math for CS CMPSC 360 LECTURE 14 Last time:
Practical Aspects of Modern Cryptography
Diffie-Hellman Key Exchange
CSCE 715: Network Systems Security
Asymmetric Cryptographic Algorithms
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Security: Public Key Cryptography
Secure Diffie-Hellman Algorithm
Diffie-Hellman Algorithm
A General Introduction to Modern Cryptography
Presentation transcript:

Diffie-Hellman Key Exchange Yuen Ng

Importance Allows a secret to be made between two people Even if the whole world is listening in This secret can be used as an encryption code word. Particularly (and mainly) on the internet Whitfield Diffie Martin Hellman (Ralph Merkle)

What’s the problem? For Alan and Betty… Muahaha For Alan and Betty… Niamh is listening in on the communications Alan and Betty want to form a secret password that only they know. But, any password that Alan wants to tell Betty won’t be secret… They can use this to encrypt sensitive information Eg what city state they are going to attack, which credit card number she’s using

What’s the solution? Announced publicly in 1976 We can use gab as the new secret, the new code word So we can now send long messages to each other, in private British Signals Intelligence Agency by Malcolm J. Williamson but classified We can easily make it bigger Credit card details, Using other encryption methods that rely on a shared secret; a different system that requires one key only

Diffie-Hellman Mechanism (ga)b = (gb)a = gab For example (23)6 = 86 = 262,144 (26)3 = 643 = 262,144 gab = 262,144 Everybody is taught this in secondary school It’s easy to form powers of g It’s not necessarily easy to find which numbers you used as the power of g (in the intermediate steps)

Forming a key with Diffie-Hellman (ga)b = (gb)a = gab (mod p) For example (237)10 = 3,404,825,44710 = 209,386,425… for 96 digits in total (2310)7 = 41,426,511,213,6497 = 209,386,425… again So gab = 2.09386425… * 10^95 But (mod 9719) we have (237)10 = 3,404,825,44710 = 705310 = 1195 (2310)7 = 41,426,511,213,6497 = 48007 = 1195 again! So gab = 1195 Everybody is taught this in secondary school Since the numbers get large very very quickly, we can use mod arithmetic Where we are just looking at remainders By the way 9719 is a specially chosen prime 9719 is the largest four digit prime for which consecutive pairs and triples of digits are also prime (like 97, 19, 71, 971 and 719) http://primes.utm.edu/curios/page.php/9719.html We still get the same answer in mod arithmetic, whichever way round the powers are applied And the answer is much smaller and more manageable http://www.calculatorpro.com/calculator/modulo-calculator/

Diffie-Hellman Key Exchange (ga)b = (gb)a = gab (mod p) To everybody: We choose g = 23 and p = 9719 A to B: here’s ga = 7053 B to A: here’s gb = 4800 PRIVATE Alan: (gb )a = 4800 a = 1195 PRIVATE Betty: (g a)b = 7053 b = 1195

Diffie-Hellman Key Exchange (ga)b = (gb)a = gab (mod p) To everybody: We choose g = 23 and p = 9719 A to B: here’s ga = 7053 B to A: here’s gb = 4800 PRIVATE Alan: (gb )a = 4800 a = 1195 PRIVATE Betty: (g a)b = 7053 b = 1195

Diffie-Hellman Key Exchange (ga)b = (gb)a = gab (mod p) To everybody: We choose g = 23 and p = 9719 A to B: here’s ga = 7053 B to A: here’s gb = 4800 PRIVATE Alan: (gb )a = 4800 a = 1195 PRIVATE Betty: (g a)b = 7053 b = 1195 I can’t work out from the information what the secret key is! I’d love to know a and b.

Niamh is in difficulty It’s easy to form powers of g g35 = (((((g2) 2) 2) 2) 2) * g2 * g Suppose (like Niamh) you know the values of g, p, ga and gb. Can we work out gab ? One way to solve: we could find a from ga and then find (gb)a = gab which is the secret But, it’s not at all easy to find which numbers you used as the power of g (in the intermediate steps) Repeated squaring technique Five squarings, and three multiplications – faster than 34 operations (and memory storage) Given that 7053 and 4800 are powers of 23 in mod 9719 Multiplying together won’t work – a + b

Security Currently no known algorithms are efficient at solving the Discrete Logarithm Problem Works well if you use large primes Eg p = 2q + 1 (only 2 and q, both primes, divide the order of g) Human neglect… …and impostors 9719 is a very small prime. We use 768 and 1024 bit primes in practice – very large numbers to make it hard to guess Could write out all powers of g, but fastest method is… and has time complexity… How to impersonate (man-in-the-middle attack) picture of impersonation pictures Log Jam NSA The Impostor’s own information