Elgamal demonstration project on calculators TI-83+

Slides:



Advertisements
Similar presentations
Digital Signatures and Hash Functions. Digital Signatures.
Advertisements

Elgamal demonstration project on calculators TI-83+ Gerard Tel Utrecht University With results from Jos Roseboom and Meli Samikin.
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
Great Theoretical Ideas in Computer Science.
1 Constructing Pseudo-Random Permutations with a Prescribed Structure Moni Naor Weizmann Institute Omer Reingold AT&T Research.
Introduction to Modern Cryptography Lecture 7 1.RSA Public Key CryptoSystem 2.One way Trapdoor Functions.
Public Key Algorithms 4/17/2017 M. Chatterjee.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
ElGamal Public Key Cryptography CS 303 Alg. Number Theory & Cryptography Jeremy Johnson Taher ElGamal, "A Public-Key Cryptosystem and a Signature Scheme.
1 Network Security Lecture 6 Public Key Algorithms Waleed Ejaz
Lecture 7 Discrete Logarithms
Great Theoretical Ideas in Computer Science.
Prelude to Public-Key Cryptography Rocky K. C. Chang, February
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Midterm Review Cryptography & Network Security
Cryptography and Network Security Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
General Attacks on Elliptic Curve Based Cryptosystems Merabi Chicvashvili Ron Ryvchin Project Advisor: Barukh Ziv Spring 2014.
Discrete Logarithm(s) (DLs) Fix a prime p. Let a, b be nonzero integers (mod p). The problem of finding x such that a x ≡ b (mod p) is called the discrete.
Understanding Cryptography by Christof Paar and Jan Pelzl These slides were prepared by Christof Paar and Jan Pelzl Chapter 8 –
Cryptography issues – elliptic curves Presented by Tom Nykiel.
Introduction to Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Elgamal Public Key Encryption CSCI 5857: Encoding and Encryption.
Key Exchange in Systems VPN usually has two phases –Handshake protocol: key exchange between parties sets symmetric keys –Traffic protocol: communication.
@Yuan Xue 285: Network Security CS 285 Network Security Digital Signature Yuan Xue Fall 2012.
Lecture 5 Asymmetric Cryptography. Private-Key Cryptography Traditional private/secret/single key cryptography uses one key Shared by both sender and.
RSA cryptosystem with large key length
Public Key Cryptography
최신정보보호기술 경일대학교 사이버보안학과 김 현성.
Outline Primitive Element Theorem Diffie Hellman Key Distribution
CS480 Cryptography and Information Security
Public Key Encryption Major topics The RSA scheme was devised in 1978
Attacks on Public Key Encryption Algorithms
Network Security Design Fundamentals Lecture-13
RSA Slides by Kent Seamons and Tim van der Horst
Golden Linear Group Key Agreement Protocol
Key Exchange References: Applied Cryptography, Bruce Schneier
DTTF/NB479: Dszquphsbqiz Day 26
Network Security Unit-III
Prelude to Public-Key Cryptography
PUBLIC-KEY ENCRYPTION Focusing on RSA
B504/I538: Introduction to Cryptography
Public Key Encryption and Digital Signatures
RSA and El Gamal Cryptosystems
Homework 3 As announced: not due today 
Cryptographic Hash Functions Part I
ICS 454 Principles of Cryptography
CAS CS 538 Cryptography.
Cryptography Lecture 24.
NET 311 Information Security
Cryptography: Basics (2)
Public Key Cryptography
ICS 454 Principles of Cryptography
Key Management Network Systems Security
DTTF/NB479: Dszquphsbqiz Day 27
NET 311 Information Security
El Gamal and Diffie Hellman
El Gamal and Diffie Hellman
Practical Aspects of Modern Cryptography
Introduction to Elliptic Curve Cryptography
Discrete Log ElGamal Cryptosystem
CSCE 715: Network Systems Security
One Way Functions Motivation Complexity Theory Review, Motivation
Public – Private Key Cryptography
PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9
Cryptography Lecture 16.
Cryptology Design Fundamentals
Cryptography Lecture 18.
The RSA Public-Key Encryption Algorithm
Presentation transcript:

Elgamal demonstration project on calculators TI-83+ Gerard Tel Utrecht University With results from Jos Roseboom and Meli Samikin

Overview of the lecture History and background Elgamal (Diffie Hellman) Discrete Log: Pollard rho Experimentation results Structure of Function Graph: Cycles, Tails, Layers Conclusions Workshop Elgamal

1. History and background 2003, lecture for school teachers about Elgamal 2006, lecture with calculator demo Why Elgamal, not RSA? Functional property easy to show Security: rely on complexity Compare exponentiation and DLog Workshop Elgamal

Math: Modular arithmetic Compute modulo prime p (95917) with 0, 1, … p-2, p-1 Generator g of order q (prime) Rules of algebra are valid (ga)k = (gk)a Secure application: p has ~309 digits!! Workshop Elgamal

Calculator TI-83, 83+, 84+ Grafical, 14 digit Programmable Generally available in VWO (pre-academic school type in the Netherlands) Cost 100 euro (free for me) Workshop Elgamal

The Elgamal program Ceasar cipher (symmetric) Elgamal parameter and key generation Elgamal encryption and decryption Discrete Logarithm: Pollard Infeasible problem!! But doable for 7 digit modulus Workshop Elgamal

2. Public Key codes The problem of Key Agreement: A and B are on two sides of a river They want to have common z Oscar is in a boat on the river Oscar must not know z Workshop Elgamal

Solution: Diffie-Hellman Alice takes random a, shouts b = ga Bob takes random k, shouts u = gk Alice computes z = ua = (gk)a Bob computes z = bk = (ga)k The two numbers are the same The difference in complexity for A&B and O is relevant Workshop Elgamal

What does Oscar hear? Oscar sees the communication, but not the secrets Seen: Public b = ga Public u = gk Not computable: Secret a, k Common z This needs discrete logarithm Workshop Elgamal

The Elgamal program In class use Program, explanation, slides on website Program extendible Booklet with ideas for experimenting, papers (All in Dutch!) http://people.cs.uu.nl/gerard/Cryptografie/Elgamal/ Workshop Elgamal

3. Pollard Rho Algorithm Fixed p (modulus), g, q (order of g); G is set of powers of g Discrete Logarithm problem: Given y in G Return x st gx = y Pollard Rho: randomized, √q time Workshop Elgamal

Pollard Rho: Representation Representation of z: z = ya.gb Two representations of same number reveil log y: If ya.gb = yc.gd, then y = g(b-d)/(c-a) Goal: find 2 representations of one number z (value does not matter) Workshop Elgamal

Strategy: Birthday Theorem All values z = ya.gb are in G Birthday Theorem: In a random sequence, we expect a collision after √q steps Simulate effect of random sequence by pseudorandom function: zi+1 = f (zi) (Keep representation of each zi) Workshop Elgamal

Cycle detection Detect collision by storing previous values: too expensive Floyd cycle detection method: Develop two sequences: zi and ti Relation: ti = z2i Collision: ti = zi, i.e., zi = z2i In each round, z “moves” one step and t moves two steps. Workshop Elgamal

4. Experimentation results Spring 2006, by Barbara ten Tusscher, Jesse Krijthe, Brigitte Sprenger p q x m 1 2 3 4 5 Ave 971 97 8 16 11,2 3989 997 114 10 30 60 15 39 39869 9967 117 53 104,2 1144 192 65 141,2 999611 99961 335 11 6 683 680 340 476 Workshop Elgamal

Observations Average number of iterations coincides well with √q Almost no variation within one row Is this a bug in the program?? Bad randomization in calculator? Or general property of Pollard Rho? Workshop Elgamal

5. Function graph Function f: zi -> zi+1 defines graph Out-degree 1, cycles with in-trees Length, component, size Graph is the same when algorithm is repeated with the same input Starting point differs As zi = z2i, i must be multiple of cycle length Workshop Elgamal

Layers in a component Layer of node measure distance to cycle in terms of its length l: Point z in cycle has layer 0 Point z is in layer 1 if f(l)(z) in cycle Point z is in layer c if f(c.l)(z) in cycle Lemma: z0 in layer c gives c.l iter. Is there a dominant component or layer? Workshop Elgamal

Layers 0 and 1 dominate Probability theory analysis by Meli Samikin Lemma: Pr(layer ≤ 1) = ½ Proof: Assume collision after k steps: z0 -> z1 -> … -> … -> zk-1 -> ?? Layer of z0 is 0 if zk = z0, Pr = 1/k Layer of z0 is 1 if zk = zj < k/2, Pr ≈ 1/2 Workshop Elgamal

Dominant Component Lemma: Random z0 and w0, Pr(same component) > ½. Proof: First collision after k steps: z0 -> z1 -> … -> … -> zk-1 -> ?? w0 -> w1 -> … -> … -> wk-1 -> ?? Pr ( z meets other sequence ) = ½. Then, w-sequence may collide into z. Workshop Elgamal

Experiments: dominance Jos Roseboom: count points in layers of each component Plays national korfbal team World Champion 2007, november, Brno. Workshop Elgamal

Size of largest component Workshop Elgamal

Conclusions Elgamal + handcalculators = fun Functional requirements easier to explain than for RSA Security: experiment with DLog Pollard, only randomizes at start Iterations: random variable, but takes only limited values Most often: size of heaviest cycle Workshop Elgamal

Rabbit Formula Ontsleutelen is: v delen door ua u(a1+a2) is: ua1.ua2 Deel eerst door ua1 en dan door ua2 Team 1: bereken v’ = Deca1(u, v) Team 2: bereken x = Deca2(u, v’) Workshop Elgamal

Overzicht van formules Constanten: Priemgetal p, grondtal g Sleutelpaar: Secret a en Public b = ga Encryptie: (u, v) = (gk, x.bk) met b Decryptie: x = v/ua met a Prijsvraag: b = b1b2. Ontsleutelen? Workshop Elgamal