Chapter 4: Public Key Cryptography: Diffie-Hellman key-exchange protocol (Week 6)

Size: px
Start display at page:

Download "Chapter 4: Public Key Cryptography: Diffie-Hellman key-exchange protocol (Week 6)"

Transcription

1 Chapter 4: Public Key Cryptography: Diffie-Hellman key-exchange protocol (Week 6) 8 The Diffie-Hellman Key Exchange protocol This was invented by Whitfield Diffie and Martin Hellman 8 in It is a method for creating a shared secret numeric key over an open channel with potential eavesdroppers. The two protagonists don t have any (real) control over what actual number their secret key is. (The key will then be used in a symmetric key 9 algorithm such as DES and AES see next week s lectures). Let G = (Z/pZ) be the multiplicative elements mod p. It is a cyclic group of order p 1. Since it is cyclic, it has a generator g, which means (Z/pZ) = {g, g 2, g 3,..., g p 1 }. Example. A generator for (Z/11Z) is g = 2. We have {2, 2 2, 2 3, 2 4, 2 5, 2 6, 2 7, 2 8, 2 9, 2 10 } = {2, 4, 8, 5, 10, 9, 7, 3, 6, 1} which is all the invertible elements mod 11. Remark. To say a number g is a primitive root modulo p is the same as saying g is a generator for (Z/pZ). The algorithm works as follows: Fix a prime p and a primitive root g. Publish these. Alice secretly chooses an exponent a, and sends A = g a (mod p) to Bob. Bob secretly chooses an exponent b and sends B = g b (mod p) to Alice. Alice and Bob now share a secret, K = g ab (mod p), since Bob can calculate K = A b = g ab and Alice can calculate K = B a = g ab but Eve only knows g a and g b. They use this key to seed a traditional symmetric cipher, like DES or AES etc. The key to this protocol is that exponentiating numbers is easy, whereas taking discrete logarithms is (believed to be) hard at least for certain primes. Definition. Given a generator of g and a number A (Z/pZ), we say that a is the discrete log of A with respect to g modulo p, if A g a (mod p). 8 New directions in cryptography, IEEE Transactions on Information Theory 22 (1976), A symmetric key algorithm is one where the same key is used to encode and decode. Asymptotic algorithms, such as PKC, are where different keys are needed for encoding and decoding. 29

2 8 The Diffie-Hellman Key Exchange protocol Diffie-Hellman Example. Let p = 9967 (a prime) and g = 3 (a primitive root modulo 9967). Alice secretly chooses 34 = (100010) 2 = , and works out so 3 2 = 9 She send 6366 to Bob. 3 4 = 9 2 = = 81 2 = = = (mod 9967) (mod 9967) = (mod 9967) 3 34 = (mod 9967) Meanwhile, Bob secretely chooses 37 = , and, calculating the same table as Alice, works out 3 37 = (mod 9967) and he sends 2443 to Alice. Public Secret Alice Bob Alice now takes the number Bob sent her, 2443, and raises it to her secret number, 34, using the fast exponentiation method. She obtains k = (mod 9967) Bob takes the number Alice sent him, 6366, and raises it to his secret number 37, and obtains The two keys match! k = (mod 9967) Public Secret Shared Alice Bob The reason this works is because Alice knows a and g b (sent to her from Bob). She calculates (g b ) a = g ab. Whereas Bob knows b and g a (sent to him by Alice), and calculates (g a ) b = g ab. Remark. Given p = 9967 and g = 3, and knowing the number 6366, it is hard to find the x such that 3 x 6366 (mod 9967). Such an x is known as the discrete log of 6366 in base 3 modulo (In this case we know the discrete log equals 34). 30

3 Diffie-Hellman 8 The Diffie-Hellman Key Exchange protocol Remark. Currently the only way known to decrypt such secrets is to find discrete logarithms, in the sense of seeing Alice s g a find her a. However, that might not be necessary. The Diffie- Hellman-problem or DHP is as follows: If you know g and p (which is public) and you can find g a and g b (from tapping into telephone lines) can you find g ab without first finding a and b? Remark. Note that in this system Alice and Bob have no real control over what the shared key will be. Therefore, this approach cannot be used to send messages. Remark (Historical). Martin Hellman, in An Overview of Public Key Cryptography 50 th Anniversary Commemorative Issue (May 2002) of the IEEE Communications Magazine, said: The system I called the ax1x2 system in this paper has since become known as Diffie-Hellman key exchange. While that system was first described in a paper by Diffie and me, it is a public key distribution system, a concept developed by Merkle, and hence should be called Diffie-Hellman-Merkle key exchange if names are to be associated with it. I hope this small pulpit might help in that endeavor to recognize Merkles equal contribution to the invention of public key cryptography. Space does not permit an explanation of the quirk of fate that seems to have deprived Merkle of the credit he deserves, but a quirk it is. 8.1 ElGamal This was invented in 1985 by Taher Elgamal. (His surname is all lowercase after the first letter, but his cryptosystem traditionally has a capital G in the middle). It uses the same technology as Diffie-Hellman, but allows Alice and Bob to exchange messages, rather then just keys. Assume the prime p and generator g are known. Alice wishes to send a message m to Bob. We will assume that the message is numeric (else convert it to one) and satisfies 0 m < p (else break the message into smaller pieces). Bob secretly chooses an exponent b, finds B g b (mod p) and sends B to Alice. Alice chooses an a and finds A = g a. She also finds t = B a m. She sends (t, A) to Bob. Bob finds t A b g ba m (g a ) b m (mod p), and hence has Alice s message. Remark. Although not essential, it will be good if Bob s b can be chosen coprime to p 1. This is because B = g b will then also be a primitive root mod p, and so B a can then take any and every value in (Z/pZ) with equal probability, and thus all the information in m is lost in t = B a m. If Alice sends two messages m 1 and m 2, say, to Bob using the same a, and if Eve can find the plaintext m 1 somehow, then she can also decode the message to read m 2 too. This is 31

4 8 The Diffie-Hellman Key Exchange protocol Diffie-Hellman because if Eve knows m 1 then from t 1 = m 1 B a she can find B a. From that, knowing only t 2 = m 2 B a she can find m 2 = t 2 (B a ) 1. Such a scenario isn t as unlikely as it seems. For example, the first message might be a press release still under embargo. Once the embargo has passed, Eve can find out m 1 simply from reading the papers. The conclusion is that to increase the security of messages, Alice should use a different a for each message sent. Therefore a is called an ephemeral key. 8.2 Equivalence between Diffie-Hellman and ElGamal Clearly both these cryptosystems can be broken if one can find discrete logs. However, it might be that a system could still be broken without actually being able to find discrete logs in general. If one has a system that can break either ElGamal or Diffie-Hellman than one can break the other. Let M 1 be a machine that solves the ElGamal problem, in the sense that its input is all the available public data, and its output is the secret message, that is M 1 : (p, g, g a, g b, mg ab ) m then M 1 (p, g, g a, g b, 1) = g ab and inverting this mod p (possible using Euclid s algorithm, for example) solves the Diffie-Hellman problem, since K = g ab. Similarly if M 2 is a device that can solve a Diffie-Hellman problem, then it can be used to solve ElGamal. That is, let M 2 : (p, q, g a, g b ) g ab then given g b (from Bob) and (t, g a ) (from Alice), use the machine to find K = g ab, find its inverse (via Euclid s algorithm) and calculate m = tk Bit commitment with Diffie-Hellman Suppose Alice and Bob wish to bet on the outcome of a coin toss, but without actually meeting. Clearly Alice cannot toss the coin and have Bob call, for then Alice has the opportunity to lie and say coin-toss was the opposite of Bob s declaration. But equally, Alice cannot tell Bob the outcome of the coin toss before he has called what he thinks it will be, for then Bob can simply make his call be the result of the toss. There exists a Diffie-Hellman-like approach which solves this problem, and means Alice can toss the coin, and send the result to Bob in such a way that he cannot tell what the outcome was and Alice is committed to the outcome. (This assumes Bob cannot find discrete logarithms). Alice and Bob agree the following protocol. The agree on a prime p and a generator g. Alice will toss the coin, and will then choose a random a whose 7 th bit is 1 if the toss was heads and 0 if it was tails. She sends A g a (mod p) to Bob. Bob then declares to Alice his call 32

5 Diffie-Hellman 8 The Diffie-Hellman Key Exchange protocol of heads or tails. Alice can then let him know if he has won or lost, and sends him a. Bob can look at the 7 th bit of a and check it really does equal 0 or 1 (depending on the coin toss outcome Alice informed him of) and can check that g a really does equal A, so Alice cannot cheat by changing the result after hearing Bob s call. This works because once A is fixed, Alice is fixed into her choice of a, and so is fixed into the result of the coin toss. This method assumes Bob cannot deduce the 7 th bit of a from knowing g a, but this is a good assumption, because 7 is arbitrary (if you could find any arbitrary bit of a knowing only A, you could find the discrete logarithm of A with respect to g). Remark. Choosing the least-significant bit of a to be the result of the coin toss is a bad idea, because that can be found from knowing A. Note that a is even if and only if g a is the square of ±g a/2, which happens if and only if g a is a quadratic residue mod p. But checking whether A is a quadratic residue mod p can be done easily using Legendre symbols. 8.4 Finding primitive roots modulo p When p is a prime, a primitive root modulo p is a number whose powers yield every non-zero number mod p. Thus we see that g being a generator for (Z/pZ) is equivalent to g being a primitive root modulo p. Primitive roots have two very useful properties: Proposition. Let g be a primitive root mod p, and let n, j and k be integers. Then g n 1 (mod p) if and only if n 0 (mod p 1). g j g k (mod p) if and only if j k (mod p 1). Proof. This was properly covered in Introduction to Number Theory. Here s a sketch of the proof. For the first bullet point assume that n 0 (mod p 1), which means n = a(p 1). Then g n ( g p 1) a 1 a 1 (mod p). by Fermat s Little Theorem. Conversely, assume that g n 1 (mod p) and write n = a(p 1) + r with 0 r < p 1. Note that, by Fermat s Little Theorem again, 1 g n g a(p 1) g r g r (mod p). Hence if r 1 we have { g, g 2, g 3,..., g r, g r+1, g r+2,..., g p 1} = { g, g 2, g 3,..., g r, g 1, g 2,... } (here we used the fact that g r = 1). This is cyclic, repeating after every r terms, and thus the set contains only r elements. This contradicts the assumption that g is a primitive root, since its powers must yield every non-zero number mod p (of which there are p 1 terms) 33

6 8 The Diffie-Hellman Key Exchange protocol Diffie-Hellman and this set has yielded only r terms. The only way for this not to be a contradiction is if r = 0, which means (p 1) n or n 0 (mod p 1). For the second bullet point, note that g j j k = g j k 1 and by the results of the first bullet point, this happens if and only if j k 0 (mod p 1), so j k (mod p 1). Remark. Primitive roots are not unique. Proposition. If g is a primitive root modulo p, then so is g x for any x coprime to p 1. Proof. A corollary of Fermat s Little Theorem is that exponents work modulo p 1. If x is coprime to p 1 then {x, 2x, 3x,..., (p 1)x} {1, 2, 3,..., p 1} (mod p 1), which says that multiplying by x mod p 1 simply rearranges the set. (It is crucial x has an inverse mod p 1 for this statement to be true). Thus { g x, g 2x, g 3x,..., g (p 1)x} { g, g 2, g 3,..., g p 1} {1, 2, 3,..., p 1} (mod p) and so g x is also a primitive root modulo p. Corollary. For a given prime p, there are φ(p 1) primitive roots modulo p. Example. Assuming 2 is a primitive root modulo 13, find all the primitive roots mod 13. Solution. The numbers coprime to 12 are 1,5,7, and 11. Since 2 is a primitive root mod 13, and we have we see that the four primitive roots mod 13 are 2, 6, 7 and 11. Now, if the prime factorization of p 1 is known, one can quickly check a number to see if it is a primitive root. I ll demonstrate with an example of finding primitive roots modulo 13. Note that 13 1 = 12 = Now every element of (Z/13Z) has an order, which is the smallest k such that a k 1 (mod 13). This order divides the order of the group (12 in this case), so the possible orders are 1, 2, 3, 4, 6, and 12. The following tables show which values equal 1. order \ power

7 Diffie-Hellman 8 The Diffie-Hellman Key Exchange protocol Note that every element which is not a primitive root (that is, every number which does not have order 12) equals 1 when raised to a power of either 6(= 12/2) or 4(= 12/3). Hence, if you wished to check whether 2 is a primitive root modulo 13, rather than raising it to every power between 1 and 12 and ensuring they yield all possible numbers, one simply needs to show that both 2 6 and 2 4 are not congruent to 1 mod 13 to conclude that its order is 12, and hence 2 is a primitive root mod 13. We have and so 2 is is a primitive root (mod 13) (mod 13) This method also shows that 3 is not a primitive root. To see this note that (mod 13). Example. Show that 3 is a primitive root modulo 101. Solution. Note that 100 = and so we only need to check powers equal to 100/2 = 50 and 100/5 = 20. One can check that (mod 101) (mod 101) and since neither of these are 1, we conclude that 3 is a primitive root mod 101. The general algorithm is as follows: To find primitive roots modulo p, find the prime factors of p 1. Say it equals p 1 = q a 1 1 q a 2 2 q a k k with q i all primes, and a i 1. For the g you wish to test, simply evaluate g (p 1)/q 1, g (p 1)/q 2,..., g (p 1)/q k, and if they are all not equal to 1, then g is a primitive root. If one of them equals 1, then that g is not a primitive root. Simply chose another value of g to test. 35

8 8 The Diffie-Hellman Key Exchange protocol Diffie-Hellman 36

Secure Network Communication Part II II Public Key Cryptography. Public Key Cryptography

Secure Network Communication Part II II Public Key Cryptography. Public Key Cryptography Kommunikationssysteme (KSy) - Block 8 Secure Network Communication Part II II Public Key Cryptography Dr. Andreas Steffen 2000-2001 A. Steffen, 28.03.2001, KSy_RSA.ppt 1 Secure Key Distribution Problem

More information

Discrete Mathematics, Chapter 4: Number Theory and Cryptography

Discrete Mathematics, Chapter 4: Number Theory and Cryptography Discrete Mathematics, Chapter 4: Number Theory and Cryptography Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 4 1 / 35 Outline 1 Divisibility

More information

CIS 5371 Cryptography. 8. Encryption --

CIS 5371 Cryptography. 8. Encryption -- CIS 5371 Cryptography p y 8. Encryption -- Asymmetric Techniques Textbook encryption algorithms In this chapter, security (confidentiality) is considered in the following sense: All-or-nothing secrecy.

More information

Public Key Cryptography: RSA and Lots of Number Theory

Public Key Cryptography: RSA and Lots of Number Theory Public Key Cryptography: RSA and Lots of Number Theory Public vs. Private-Key Cryptography We have just discussed traditional symmetric cryptography: Uses a single key shared between sender and receiver

More information

Lecture 13 - Basic Number Theory.

Lecture 13 - Basic Number Theory. Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted

More information

Outline. Computer Science 418. Digital Signatures: Observations. Digital Signatures: Definition. Definition 1 (Digital signature) Digital Signatures

Outline. Computer Science 418. Digital Signatures: Observations. Digital Signatures: Definition. Definition 1 (Digital signature) Digital Signatures Outline Computer Science 418 Digital Signatures Mike Jacobson Department of Computer Science University of Calgary Week 12 1 Digital Signatures 2 Signatures via Public Key Cryptosystems 3 Provable 4 Mike

More information

RSA Encryption. Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles October 10, 2003

RSA Encryption. Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles October 10, 2003 RSA Encryption Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles October 10, 2003 1 Public Key Cryptography One of the biggest problems in cryptography is the distribution of keys.

More information

Advanced Cryptography

Advanced Cryptography Family Name:... First Name:... Section:... Advanced Cryptography Final Exam July 18 th, 2006 Start at 9:15, End at 12:00 This document consists of 12 pages. Instructions Electronic devices are not allowed.

More information

Public Key Cryptography. c Eli Biham - March 30, 2011 258 Public Key Cryptography

Public Key Cryptography. c Eli Biham - March 30, 2011 258 Public Key Cryptography Public Key Cryptography c Eli Biham - March 30, 2011 258 Public Key Cryptography Key Exchange All the ciphers mentioned previously require keys known a-priori to all the users, before they can encrypt

More information

Elements of Applied Cryptography Public key encryption

Elements of Applied Cryptography Public key encryption Network Security Elements of Applied Cryptography Public key encryption Public key cryptosystem RSA and the factorization problem RSA in practice Other asymmetric ciphers Asymmetric Encryption Scheme Let

More information

Lecture Note 5 PUBLIC-KEY CRYPTOGRAPHY. Sourav Mukhopadhyay

Lecture Note 5 PUBLIC-KEY CRYPTOGRAPHY. Sourav Mukhopadhyay Lecture Note 5 PUBLIC-KEY CRYPTOGRAPHY Sourav Mukhopadhyay Cryptography and Network Security - MA61027 Modern/Public-key cryptography started in 1976 with the publication of the following paper. W. Diffie

More information

The Mathematics of the RSA Public-Key Cryptosystem

The Mathematics of the RSA Public-Key Cryptosystem The Mathematics of the RSA Public-Key Cryptosystem Burt Kaliski RSA Laboratories ABOUT THE AUTHOR: Dr Burt Kaliski is a computer scientist whose involvement with the security industry has been through

More information

The application of prime numbers to RSA encryption

The application of prime numbers to RSA encryption The application of prime numbers to RSA encryption Prime number definition: Let us begin with the definition of a prime number p The number p, which is a member of the set of natural numbers N, is considered

More information

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory

More information

A short primer on cryptography

A short primer on cryptography A short primer on cryptography A. V. Atanasov April 14 2007 1 Preliminaries (This section is an introduction to the referred mathematical concepts. Feel free to skip it if you are familiar with the first

More information

Cryptography and Network Security Chapter 10

Cryptography and Network Security Chapter 10 Cryptography and Network Security Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown (with edits by RHB) Chapter 10 Other Public Key Cryptosystems Amongst the tribes of Central

More information

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m) Chapter 23 Squares Modulo p Revised Version of Chapter 23 We learned long ago how to solve linear congruences ax c (mod m) (see Chapter 8). It s now time to take the plunge and move on to quadratic equations.

More information

Shor s algorithm and secret sharing

Shor s algorithm and secret sharing Shor s algorithm and secret sharing Libor Nentvich: QC 23 April 2007: Shor s algorithm and secret sharing 1/41 Goals: 1 To explain why the factoring is important. 2 To describe the oldest and most successful

More information

Basic Algorithms In Computer Algebra

Basic Algorithms In Computer Algebra Basic Algorithms In Computer Algebra Kaiserslautern SS 2011 Prof. Dr. Wolfram Decker 2. Mai 2011 References Cohen, H.: A Course in Computational Algebraic Number Theory. Springer, 1993. Cox, D.; Little,

More information

Lecture 17: Re-encryption

Lecture 17: Re-encryption 600.641 Special Topics in Theoretical Cryptography April 2, 2007 Instructor: Susan Hohenberger Lecture 17: Re-encryption Scribe: Zachary Scott Today s lecture was given by Matt Green. 1 Motivation Proxy

More information

RSA and Primality Testing

RSA and Primality Testing and Primality Testing Joan Boyar, IMADA, University of Southern Denmark Studieretningsprojekter 2010 1 / 81 Correctness of cryptography cryptography Introduction to number theory Correctness of with 2

More information

1. The RSA algorithm In this chapter, we ll learn how the RSA algorithm works.

1. The RSA algorithm In this chapter, we ll learn how the RSA algorithm works. MATH 13150: Freshman Seminar Unit 18 1. The RSA algorithm In this chapter, we ll learn how the RSA algorithm works. 1.1. Bob and Alice. Suppose that Alice wants to send a message to Bob over the internet

More information

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Module No. # 01 Lecture No. # 05 Classic Cryptosystems (Refer Slide Time: 00:42)

More information

CSCE 465 Computer & Network Security

CSCE 465 Computer & Network Security CSCE 465 Computer & Network Security Instructor: Dr. Guofei Gu http://courses.cse.tamu.edu/guofei/csce465/ Public Key Cryptogrophy 1 Roadmap Introduction RSA Diffie-Hellman Key Exchange Public key and

More information

Factoring Algorithms

Factoring Algorithms Factoring Algorithms The p 1 Method and Quadratic Sieve November 17, 2008 () Factoring Algorithms November 17, 2008 1 / 12 Fermat s factoring method Fermat made the observation that if n has two factors

More information

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

More information

Notes on Network Security Prof. Hemant K. Soni

Notes on Network Security Prof. Hemant K. Soni 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

More information

Public Key Cryptography and RSA. Review: Number Theory Basics

Public Key Cryptography and RSA. Review: Number Theory Basics Public Key Cryptography and RSA Murat Kantarcioglu Based on Prof. Ninghui Li s Slides Review: Number Theory Basics Definition An integer n > 1 is called a prime number if its positive divisors are 1 and

More information

Lukasz Pater CMMS Administrator and Developer

Lukasz Pater CMMS Administrator and Developer Lukasz Pater CMMS Administrator and Developer EDMS 1373428 Agenda Introduction Why do we need asymmetric ciphers? One-way functions RSA Cipher Message Integrity Examples Secure Socket Layer Single Sign

More information

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may Number Theory Divisibility and Primes Definition. If a and b are integers and there is some integer c such that a = b c, then we say that b divides a or is a factor or divisor of a and write b a. Definition

More information

Public Key (asymmetric) Cryptography

Public Key (asymmetric) Cryptography Public-Key Cryptography UNIVERSITA DEGLI STUDI DI PARMA Dipartimento di Ingegneria dell Informazione Public Key (asymmetric) Cryptography Luca Veltri (mail.to: luca.veltri@unipr.it) Course of Network Security,

More information

Applications of Fermat s Little Theorem and Congruences

Applications of Fermat s Little Theorem and Congruences Applications of Fermat s Little Theorem and Congruences Definition: Let m be a positive integer. Then integers a and b are congruent modulo m, denoted by a b mod m, if m (a b). Example: 3 1 mod 2, 6 4

More information

SECURITY IMPROVMENTS TO THE DIFFIE-HELLMAN SCHEMES

SECURITY IMPROVMENTS TO THE DIFFIE-HELLMAN SCHEMES www.arpapress.com/volumes/vol8issue1/ijrras_8_1_10.pdf SECURITY IMPROVMENTS TO THE DIFFIE-HELLMAN SCHEMES Malek Jakob Kakish Amman Arab University, Department of Computer Information Systems, P.O.Box 2234,

More information

Overview of Public-Key Cryptography

Overview of Public-Key Cryptography CS 361S Overview of Public-Key Cryptography Vitaly Shmatikov slide 1 Reading Assignment Kaufman 6.1-6 slide 2 Public-Key Cryptography public key public key? private key Alice Bob Given: Everybody knows

More information

Computer Security: Principles and Practice

Computer Security: Principles and Practice Computer Security: Principles and Practice Chapter 20 Public-Key Cryptography and Message Authentication First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Public-Key Cryptography

More information

The science of encryption: prime numbers and mod n arithmetic

The science of encryption: prime numbers and mod n arithmetic The science of encryption: prime numbers and mod n arithmetic Go check your e-mail. You ll notice that the webpage address starts with https://. The s at the end stands for secure meaning that a process

More information

Principles of Public Key Cryptography. Applications of Public Key Cryptography. Security in Public Key Algorithms

Principles of Public Key Cryptography. Applications of Public Key Cryptography. Security in Public Key Algorithms Principles of Public Key Cryptography Chapter : Security Techniques Background Secret Key Cryptography Public Key Cryptography Hash Functions Authentication Chapter : Security on Network and Transport

More information

Cryptography and Network Security

Cryptography and Network Security Cryptography and Network Security Fifth Edition by William Stallings Chapter 9 Public Key Cryptography and RSA Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared

More information

Elliptic Curve Cryptography

Elliptic Curve Cryptography Elliptic Curve Cryptography Elaine Brow, December 2010 Math 189A: Algebraic Geometry 1. Introduction to Public Key Cryptography To understand the motivation for elliptic curve cryptography, we must first

More information

CSC474/574 - Information Systems Security: Homework1 Solutions Sketch

CSC474/574 - Information Systems Security: Homework1 Solutions Sketch CSC474/574 - Information Systems Security: Homework1 Solutions Sketch February 20, 2005 1. Consider slide 12 in the handout for topic 2.2. Prove that the decryption process of a one-round Feistel cipher

More information

Cryptography: Authentication, Blind Signatures, and Digital Cash

Cryptography: Authentication, Blind Signatures, and Digital Cash Cryptography: Authentication, Blind Signatures, and Digital Cash Rebecca Bellovin 1 Introduction One of the most exciting ideas in cryptography in the past few decades, with the widest array of applications,

More information

Applied Cryptography Public Key Algorithms

Applied Cryptography Public Key Algorithms Applied Cryptography Public Key Algorithms Sape J. Mullender Huygens Systems Research Laboratory Universiteit Twente Enschede 1 Public Key Cryptography Independently invented by Whitfield Diffie & Martin

More information

Cryptography and Network Security Chapter 9

Cryptography and Network Security Chapter 9 Cryptography and Network Security Chapter 9 Fifth Edition by William Stallings Lecture slides by Lawrie Brown (with edits by RHB) Chapter 9 Public Key Cryptography and RSA Every Egyptian received two names,

More information

Elements of Applied Cryptography. Key Distribution. Trusted third party: KDC, KTC Diffie-Helmann protocol The man-in-the-middle attack

Elements of Applied Cryptography. Key Distribution. Trusted third party: KDC, KTC Diffie-Helmann protocol The man-in-the-middle attack Elements of Applied Cryptography Key Distribution Trusted third party: KDC, KTC Diffie-Helmann protocol The man-in-the-middle attack Point-to-point key establishment Alice Bob Each pair of users must share

More information

ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION

ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION Aldrin W. Wanambisi 1* School of Pure and Applied Science, Mount Kenya University, P.O box 553-50100, Kakamega, Kenya. Shem Aywa 2 Department of Mathematics,

More information

A Probabilistic Quantum Key Transfer Protocol

A Probabilistic Quantum Key Transfer Protocol A Probabilistic Quantum Key Transfer Protocol Abhishek Parakh Nebraska University Center for Information Assurance University of Nebraska at Omaha Omaha, NE 6818 Email: aparakh@unomaha.edu August 9, 01

More information

Arithmetic algorithms for cryptology 5 October 2015, Paris. Sieves. Razvan Barbulescu CNRS and IMJ-PRG. R. Barbulescu Sieves 0 / 28

Arithmetic algorithms for cryptology 5 October 2015, Paris. Sieves. Razvan Barbulescu CNRS and IMJ-PRG. R. Barbulescu Sieves 0 / 28 Arithmetic algorithms for cryptology 5 October 2015, Paris Sieves Razvan Barbulescu CNRS and IMJ-PRG R. Barbulescu Sieves 0 / 28 Starting point Notations q prime g a generator of (F q ) X a (secret) integer

More information

Computer Science 308-547A Cryptography and Data Security. Claude Crépeau

Computer Science 308-547A Cryptography and Data Security. Claude Crépeau Computer Science 308-547A Cryptography and Data Security Claude Crépeau These notes are, largely, transcriptions by Anton Stiglic of class notes from the former course Cryptography and Data Security (308-647A)

More information

Hill s Cipher: Linear Algebra in Cryptography

Hill s Cipher: Linear Algebra in Cryptography Ryan Doyle Hill s Cipher: Linear Algebra in Cryptography Introduction: Since the beginning of written language, humans have wanted to share information secretly. The information could be orders from a

More information

Cryptography and Network Security Chapter 8

Cryptography and Network Security Chapter 8 Cryptography and Network Security Chapter 8 Fifth Edition by William Stallings Lecture slides by Lawrie Brown (with edits by RHB) Chapter 8 Introduction to Number Theory The Devil said to Daniel Webster:

More information

Outline. CSc 466/566. Computer Security. 8 : Cryptography Digital Signatures. Digital Signatures. Digital Signatures... Christian Collberg

Outline. CSc 466/566. Computer Security. 8 : Cryptography Digital Signatures. Digital Signatures. Digital Signatures... Christian Collberg Outline CSc 466/566 Computer Security 8 : Cryptography Digital Signatures Version: 2012/02/27 16:07:05 Department of Computer Science University of Arizona collberg@gmail.com Copyright c 2012 Christian

More information

Elliptic Curve Cryptography Methods Debbie Roser Math\CS 4890

Elliptic Curve Cryptography Methods Debbie Roser Math\CS 4890 Elliptic Curve Cryptography Methods Debbie Roser Math\CS 4890 Why are Elliptic Curves used in Cryptography? The answer to this question is the following: 1) Elliptic Curves provide security equivalent

More information

Textbook: Introduction to Cryptography 2nd ed. By J.A. Buchmann Chap 12 Digital Signatures

Textbook: Introduction to Cryptography 2nd ed. By J.A. Buchmann Chap 12 Digital Signatures Textbook: Introduction to Cryptography 2nd ed. By J.A. Buchmann Chap 12 Digital Signatures Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝 陽 科 技 大 學 資 工

More information

A Factoring and Discrete Logarithm based Cryptosystem

A Factoring and Discrete Logarithm based Cryptosystem Int. J. Contemp. Math. Sciences, Vol. 8, 2013, no. 11, 511-517 HIKARI Ltd, www.m-hikari.com A Factoring and Discrete Logarithm based Cryptosystem Abdoul Aziz Ciss and Ahmed Youssef Ecole doctorale de Mathematiques

More information

1720 - Forward Secrecy: How to Secure SSL from Attacks by Government Agencies

1720 - Forward Secrecy: How to Secure SSL from Attacks by Government Agencies 1720 - Forward Secrecy: How to Secure SSL from Attacks by Government Agencies Dave Corbett Technical Product Manager Implementing Forward Secrecy 1 Agenda Part 1: Introduction Why is Forward Secrecy important?

More information

Primality - Factorization

Primality - Factorization Primality - Factorization Christophe Ritzenthaler November 9, 2009 1 Prime and factorization Definition 1.1. An integer p > 1 is called a prime number (nombre premier) if it has only 1 and p as divisors.

More information

Network Security. Chapter 2 Basics 2.2 Public Key Cryptography. Public Key Cryptography. Public Key Cryptography

Network Security. Chapter 2 Basics 2.2 Public Key Cryptography. Public Key Cryptography. Public Key Cryptography Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle Encryption/Decryption using Public Key Cryptography Network Security Chapter 2 Basics 2.2 Public Key Cryptography

More information

ECE 842 Report Implementation of Elliptic Curve Cryptography

ECE 842 Report Implementation of Elliptic Curve Cryptography ECE 842 Report Implementation of Elliptic Curve Cryptography Wei-Yang Lin December 15, 2004 Abstract The aim of this report is to illustrate the issues in implementing a practical elliptic curve cryptographic

More information

Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and

Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and Breaking The Code Ryan Lowe Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and a minor in Applied Physics. As a sophomore, he took an independent study

More information

On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples

On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples Brian Hilley Boston College MT695 Honors Seminar March 3, 2006 1 Introduction 1.1 Mazur s Theorem Let C be a

More information

On Factoring Integers and Evaluating Discrete Logarithms

On Factoring Integers and Evaluating Discrete Logarithms On Factoring Integers and Evaluating Discrete Logarithms A thesis presented by JOHN AARON GREGG to the departments of Mathematics and Computer Science in partial fulfillment of the honors requirements

More information

How To Prove The Dirichlet Unit Theorem

How To Prove The Dirichlet Unit Theorem Chapter 6 The Dirichlet Unit Theorem As usual, we will be working in the ring B of algebraic integers of a number field L. Two factorizations of an element of B are regarded as essentially the same if

More information

Software Implementation of Gong-Harn Public-key Cryptosystem and Analysis

Software Implementation of Gong-Harn Public-key Cryptosystem and Analysis Software Implementation of Gong-Harn Public-key Cryptosystem and Analysis by Susana Sin A thesis presented to the University of Waterloo in fulfilment of the thesis requirement for the degree of Master

More information

NEW DIGITAL SIGNATURE PROTOCOL BASED ON ELLIPTIC CURVES

NEW DIGITAL SIGNATURE PROTOCOL BASED ON ELLIPTIC CURVES NEW DIGITAL SIGNATURE PROTOCOL BASED ON ELLIPTIC CURVES Ounasser Abid 1, Jaouad Ettanfouhi 2 and Omar Khadir 3 1,2,3 Laboratory of Mathematics, Cryptography and Mechanics, Department of Mathematics, Fstm,

More information

8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

More information

Lecture 13: Factoring Integers

Lecture 13: Factoring Integers CS 880: Quantum Information Processing 0/4/0 Lecture 3: Factoring Integers Instructor: Dieter van Melkebeek Scribe: Mark Wellons In this lecture, we review order finding and use this to develop a method

More information

CIS 6930 Emerging Topics in Network Security. Topic 2. Network Security Primitives

CIS 6930 Emerging Topics in Network Security. Topic 2. Network Security Primitives CIS 6930 Emerging Topics in Network Security Topic 2. Network Security Primitives 1 Outline Absolute basics Encryption/Decryption; Digital signatures; D-H key exchange; Hash functions; Application of hash

More information

MATH 168: FINAL PROJECT Troels Eriksen. 1 Introduction

MATH 168: FINAL PROJECT Troels Eriksen. 1 Introduction MATH 168: FINAL PROJECT Troels Eriksen 1 Introduction In the later years cryptosystems using elliptic curves have shown up and are claimed to be just as secure as a system like RSA with much smaller key

More information

Chapter 2 Homework 2-5, 7, 9-11, 13-18, 24. (9x + 2)(mod 26) y 1 1 (x 2)(mod 26) 3(x 2)(mod 26) U : y 1 = 3(20 2)(mod 26) 54(mod 26) 2(mod 26) c

Chapter 2 Homework 2-5, 7, 9-11, 13-18, 24. (9x + 2)(mod 26) y 1 1 (x 2)(mod 26) 3(x 2)(mod 26) U : y 1 = 3(20 2)(mod 26) 54(mod 26) 2(mod 26) c Chapter 2 Homework 2-5, 7, 9-11, 13-18, 24 2. The ciphertext UCR was encrypted using the affine function (9x + 2)(mod 26) Find the plaintext. First, we find the numerical values corresponding to UCR. U

More information

7! Cryptographic Techniques! A Brief Introduction

7! Cryptographic Techniques! A Brief Introduction 7! Cryptographic Techniques! A Brief Introduction 7.1! Introduction to Cryptography! 7.2! Symmetric Encryption! 7.3! Asymmetric (Public-Key) Encryption! 7.4! Digital Signatures! 7.5! Public Key Infrastructures

More information

Math 319 Problem Set #3 Solution 21 February 2002

Math 319 Problem Set #3 Solution 21 February 2002 Math 319 Problem Set #3 Solution 21 February 2002 1. ( 2.1, problem 15) Find integers a 1, a 2, a 3, a 4, a 5 such that every integer x satisfies at least one of the congruences x a 1 (mod 2), x a 2 (mod

More information

Mathematics of Internet Security. Keeping Eve The Eavesdropper Away From Your Credit Card Information

Mathematics of Internet Security. Keeping Eve The Eavesdropper Away From Your Credit Card Information The : Keeping Eve The Eavesdropper Away From Your Credit Card Information Department of Mathematics North Dakota State University 16 September 2010 Science Cafe Introduction Disclaimer: is not an internet

More information

CUNSHENG DING HKUST, Hong Kong. Computer Security. Computer Security. Cunsheng DING, HKUST COMP4631

CUNSHENG DING HKUST, Hong Kong. Computer Security. Computer Security. Cunsheng DING, HKUST COMP4631 Cunsheng DING, HKUST Lecture 08: Key Management for One-key Ciphers Topics of this Lecture 1. The generation and distribution of secret keys. 2. A key distribution protocol with a key distribution center.

More information

Cryptography and Network Security

Cryptography and Network Security Cryptography and Network Security Spring 2012 http://users.abo.fi/ipetre/crypto/ Lecture 7: Public-key cryptography and RSA Ion Petre Department of IT, Åbo Akademi University 1 Some unanswered questions

More information

A SOFTWARE COMPARISON OF RSA AND ECC

A SOFTWARE COMPARISON OF RSA AND ECC International Journal Of Computer Science And Applications Vol. 2, No. 1, April / May 29 ISSN: 974-13 A SOFTWARE COMPARISON OF RSA AND ECC Vivek B. Kute Lecturer. CSE Department, SVPCET, Nagpur 9975549138

More information

CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 Solutions CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

More information

Cryptographic hash functions and MACs Solved Exercises for Cryptographic Hash Functions and MACs

Cryptographic hash functions and MACs Solved Exercises for Cryptographic Hash Functions and MACs Cryptographic hash functions and MACs Solved Exercises for Cryptographic Hash Functions and MACs Enes Pasalic University of Primorska Koper, 2014 Contents 1 Preface 3 2 Problems 4 2 1 Preface This is a

More information

International Journal of Information Technology, Modeling and Computing (IJITMC) Vol.1, No.3,August 2013

International Journal of Information Technology, Modeling and Computing (IJITMC) Vol.1, No.3,August 2013 FACTORING CRYPTOSYSTEM MODULI WHEN THE CO-FACTORS DIFFERENCE IS BOUNDED Omar Akchiche 1 and Omar Khadir 2 1,2 Laboratory of Mathematics, Cryptography and Mechanics, Fstm, University of Hassan II Mohammedia-Casablanca,

More information

Cryptography and Network Security. Prof. D. Mukhopadhyay. Department of Computer Science and Engineering. Indian Institute of Technology, Kharagpur

Cryptography and Network Security. Prof. D. Mukhopadhyay. Department of Computer Science and Engineering. Indian Institute of Technology, Kharagpur Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Module No. # 01 Lecture No. # 12 Block Cipher Standards

More information

LUC: A New Public Key System

LUC: A New Public Key System LUC: A New Public Key System Peter J. Smith a and Michael J. J. Lennon b a LUC Partners, Auckland UniServices Ltd, The University of Auckland, Private Bag 92019, Auckland, New Zealand. b Department of

More information

Notes on Factoring. MA 206 Kurt Bryan

Notes on Factoring. MA 206 Kurt Bryan The General Approach Notes on Factoring MA 26 Kurt Bryan Suppose I hand you n, a 2 digit integer and tell you that n is composite, with smallest prime factor around 5 digits. Finding a nontrivial factor

More information

Network Security. HIT Shimrit Tzur-David

Network Security. HIT Shimrit Tzur-David Network Security HIT Shimrit Tzur-David 1 Goals: 2 Network Security Understand principles of network security: cryptography and its many uses beyond confidentiality authentication message integrity key

More information

Ch.9 Cryptography. The Graduate Center, CUNY.! CSc 75010 Theoretical Computer Science Konstantinos Vamvourellis

Ch.9 Cryptography. The Graduate Center, CUNY.! CSc 75010 Theoretical Computer Science Konstantinos Vamvourellis Ch.9 Cryptography The Graduate Center, CUNY! CSc 75010 Theoretical Computer Science Konstantinos Vamvourellis Why is Modern Cryptography part of a Complexity course? Short answer:! Because Modern Cryptography

More information

1 Message Authentication

1 Message Authentication Theoretical Foundations of Cryptography Lecture Georgia Tech, Spring 200 Message Authentication Message Authentication Instructor: Chris Peikert Scribe: Daniel Dadush We start with some simple questions

More information

Groups in Cryptography

Groups in Cryptography Groups in Cryptography Çetin Kaya Koç http://cs.ucsb.edu/~koc/cs178 koc@cs.ucsb.edu Koç (http://cs.ucsb.edu/~koc) ucsb cs 178 intro to crypto winter 2013 1 / 13 Groups in Cryptography A set S and a binary

More information

CS3235 - Computer Security Third topic: Crypto Support Sys

CS3235 - Computer Security Third topic: Crypto Support Sys Systems used with cryptography CS3235 - Computer Security Third topic: Crypto Support Systems National University of Singapore School of Computing (Some slides drawn from Lawrie Brown s, with permission)

More information

CRYPTOGRAPHY IN NETWORK SECURITY

CRYPTOGRAPHY IN NETWORK SECURITY ELE548 Research Essays CRYPTOGRAPHY IN NETWORK SECURITY AUTHOR: SHENGLI LI INSTRUCTOR: DR. JIEN-CHUNG LO Date: March 5, 1999 Computer network brings lots of great benefits and convenience to us. We can

More information

Lecture 3: One-Way Encryption, RSA Example

Lecture 3: One-Way Encryption, RSA Example ICS 180: Introduction to Cryptography April 13, 2004 Lecturer: Stanislaw Jarecki Lecture 3: One-Way Encryption, RSA Example 1 LECTURE SUMMARY We look at a different security property one might require

More information

CS 758: Cryptography / Network Security

CS 758: Cryptography / Network Security CS 758: Cryptography / Network Security offered in the Fall Semester, 2003, by Doug Stinson my office: DC 3122 my email address: dstinson@uwaterloo.ca my web page: http://cacr.math.uwaterloo.ca/~dstinson/index.html

More information

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Module No. #01 Lecture No. #10 Symmetric Key Ciphers (Refer

More information

Analysis on Secure Data sharing using ELGamal s Cryptosystem in Cloud

Analysis on Secure Data sharing using ELGamal s Cryptosystem in Cloud Analysis on Secure Data sharing using ELGamal s Cryptosystem in Cloud M.Jayanthi, Assistant Professor, Hod of MCA.E mail: badini_jayanthi@yahoo.co.in MahatmaGandhi University,Nalgonda, INDIA. B.Ranganatha

More information

Chapter. Number Theory and Cryptography. Contents

Chapter. Number Theory and Cryptography. Contents Chapter 10 Number Theory and Cryptography Contents 10.1 Fundamental Algorithms Involving Numbers..... 453 10.1.1 Some Facts from Elementary Number Theory.... 453 10.1.2 Euclid s GCD Algorithm................

More information

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1 Network Security Abusayeed Saifullah CS 5600 Computer Networks These slides are adapted from Kurose and Ross 8-1 Goals v understand principles of network security: cryptography and its many uses beyond

More information

Computing exponents modulo a number: Repeated squaring

Computing exponents modulo a number: Repeated squaring Computing exponents modulo a number: Repeated squaring How do you compute (1415) 13 mod 2537 = 2182 using just a calculator? Or how do you check that 2 340 mod 341 = 1? You can do this using the method

More information

Cryptography and Network Security Number Theory

Cryptography and Network Security Number Theory Cryptography and Network Security Number Theory Xiang-Yang Li Introduction to Number Theory Divisors b a if a=mb for an integer m b a and c b then c a b g and b h then b (mg+nh) for any int. m,n Prime

More information

An Overview of Integer Factoring Algorithms. The Problem

An Overview of Integer Factoring Algorithms. The Problem An Overview of Integer Factoring Algorithms Manindra Agrawal IITK / NUS The Problem Given an integer n, find all its prime divisors as efficiently as possible. 1 A Difficult Problem No efficient algorithm

More information

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

WRITING PROOFS. Christopher Heil Georgia Institute of Technology WRITING PROOFS Christopher Heil Georgia Institute of Technology A theorem is just a statement of fact A proof of the theorem is a logical explanation of why the theorem is true Many theorems have this

More information

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1 Network Security Abusayeed Saifullah CS 5600 Computer Networks These slides are adapted from Kurose and Ross 8-1 Public Key Cryptography symmetric key crypto v requires sender, receiver know shared secret

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

Quotient Rings and Field Extensions

Quotient Rings and Field Extensions Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.

More information