Calculating Discrete Logarithms John Hawley Nicolette Nicolosi Ryan Rivard.

Slides:



Advertisements
Similar presentations
Cryptography and Network Security
Advertisements

22C:19 Discrete Structures Integers and Modular Arithmetic
Session 4 Asymmetric ciphers.
Introduction to Cryptography and Security Mechanisms: Unit 5 Theoretical v Practical Security Dr Keith Martin McCrea
CNS2010handout 10 :: digital signatures1 computer and network security matt barrie.
1 Cryptosystems Based on Discrete Logarithms. 2 Outline [1] Discrete Logarithm Problem [2] Algorithms for Discrete Logarithm –A trivial algorithm –Shanks’
Tirgul 8 Universal Hashing Remarks on Programming Exercise 1 Solution to question 2 in theoretical homework 2.
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
Introduction to Signcryption November 22, /11/2004 Signcryption Public Key (PK) Cryptography Discovering Public Key (PK) cryptography has made.
Dr. Lo’ai Tawalbeh Fall 2005 Chapter 10 – Key Management; Other Public Key Cryptosystems Dr. Lo’ai Tawalbeh Computer Engineering Department Jordan University.
Csci5233 Computer Security & Integrity 1 Cryptography: Basics (2)
Tirgul 7. Find an efficient implementation of a dynamic collection of elements with unique keys Supported Operations: Insert, Search and Delete. The keys.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
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.
ELECTRONIC PAYMENT SYSTEMSFALL 2001COPYRIGHT © 2001 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
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.
Tallinn University of Technology Quantum computer impact on public key cryptography Roman Stepanenko.
CSE 597E Fall 2001 PennState University1 Digital Signature Schemes Presented By: Munaiza Matin.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
Andreas Steffen, , 4-PublicKey.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications.
Foundations of Network and Computer Security J J ohn Black Lecture #14 Oct 1 st 2007 CSCI 6268/TLEN 5831, Fall 2007.
-Anusha Uppaluri.  ECC- A set of algorithms for key generation, encryption and decryption (public key encryption technique)  ECC was introduced by Victor.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Bob can sign a message using a digital signature generation algorithm
The RSA Algorithm Rocky K. C. Chang, March
Lecture slides prepared for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 21 “Public-Key Cryptography.
Secure Embedded Processing through Hardware-assisted Run-time Monitoring Zubin Kumar.

Network and Communications Network Security Department of Computer Science Virginia Commonwealth University.
Cryptography and Network Security
Problems with symmetric (private-key) encryption 1) secure distribution of keys 2) large number of keys Solution to both problems: Public-key (asymmetric)
J. Wang. Computer Network Security Theory and Practice. Springer 2008 Chapter 3 Public-Key Cryptography and Key Management.
Prelude to Public-Key Cryptography Rocky K. C. Chang, February
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
CHAPTER 09 Compiled by: Dr. Mohammad Omar Alhawarat Sorting & Searching.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
BASIC CRYPTOGRAPHIC CONCEPTS. Public Key Cryptography  Uses two keys for every simplex logical communication link.  Public key  Private key  The use.
Chapter 21 Public-Key Cryptography and Message Authentication.
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
Information Security -- Part II Public-Key Encryption and Hash Functions Frank Yeong-Sung Lin Information Management Department National Taiwan University.
Cryptography and Network Security Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Elliptical Curve Cryptography Manish Kumar Roll No - 43 CS-A, S-7 SOE, CUSAT.
1 Public-Key Cryptography and Message Authentication.
Public key ciphers 2 Session 6.
Some Number Theory Modulo Operation: Question: What is 12 mod 9?
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Attacks on PRNGs - By Nupura Neurgaonkar CS-265 (Prof. Mark Stamp)
22C:19 Discrete Structures Integers and Modular Arithmetic Fall 2014 Sukumar Ghosh.
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
Lecture 23 Symmetric Encryption
Chapter 9 Public Key Cryptography and RSA. Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender.
Hashtables. An Abstract data type that supports the following operations: –Insert –Find –Remove Search trees can be used for the same operations but require.
Key Management Network Systems Security Mort Anvari.
Computer Security Lecture 5 Ch.9 Public-Key Cryptography And RSA Prepared by Dr. Lamiaa Elshenawy.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Lecture 3 (Chapter 9) Public-Key Cryptography and RSA Prepared by Dr. Lamiaa M. Elshenawy 1.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
RSA Pubic Key Encryption CSCI 5857: Encoding and Encryption.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Lecture 6. RSA Use in Encryption to encrypt a message M the sender: – obtains public key of recipient PU={e,n} – computes: C = M e mod n, where 0≤M
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
Attacks on Public Key Encryption Algorithms
RSA and El Gamal Cryptosystems
Number Theory (Chapter 7)
Presentation transcript:

Calculating Discrete Logarithms John Hawley Nicolette Nicolosi Ryan Rivard

Discrete Logarithms We want to find a unique integer x such that α x = β (mod n). We can find x by solving: x = log α β (mod n). But…

Logarithms are easy! Logarithms in real numbers are easy to calculate, partially because the log function is continuous and monotonically increasing. Discrete Logarithms don’t have either of these properties. For example, in a (mod 5) system, the powers of 2 are 1, 2, 4, 3. This wraparound makes the discrete log function significantly harder to compute than the ordinary log function.

Definitions Multiplicative Group – A set of congruence classes that are relatively prime to the modulus. We used the group Z p, where the modulus is a prime number and the group is cyclic (the values repeat).

Definitions Order of a Group – The number of elements in a group, which can be found using Euler’s totient function – For Z p, this is p − 1 – For Z p k, it is (p − 1) p k − 1 Generators and Primitive Elements – An element that produces the other elements of the group when raised to various powers. Primitive elements are also generators.

The Problem We have a multiplicative group (G, *), α is a generator of G having order n, and β is an element generated by α. Remember, we want to find a unique integer x such that α x = β (mod n), by solving x = log α β (mod n).

The Problem Computing α x = β for a given x is simple and efficient using the square-and- multiply algorithm for exponentiation. Computing a = log α β is difficult and can consume a large amount of time and memory for large values, such as those used in cryptography.

The Problem This property makes discrete logs ideal for cryptographic applications because one function is easy, but the inverse function is difficult. There is a class of public-key cryptosystems that use the discrete logarithm problem for key generation and encryption/decryption.

The El Gamal Cryptosystem p is a prime number chosen so that the Discrete Logarithm problem is infeasible in (Z p *, *). α is a generator in Z p *. β is computed as follows: β = α x mod p The public key consists of p, α, and β. The private key is x.

Attacking El Gamal An attacker wants to obtain the private key x so that they can encrypt and decrypt messages as the user. An attack using the Discrete Logarithm problem would attempt to compute x = log α β (mod p). Given that α, β, and p are part of the public key, this attack does not require intercepting any data other than the public key.

The Algorithm By rewriting α x = β in the form β(α −m ) i = α j, where x = im + j, we can precompute values of α j for several values of j, storing them in a hash table. The highest j computed can be used for m and values of i can be iteratively tried on the left-hand side of the equation.

The Algorithm The running time is O(m + n/m), where m is the number of entries in the hash table. Optimal running time when m = sqrt(n), but this might not be feasible based on the amount of available memory. For example, a 512-bit n would require hash table entries for optimal performance, but even at a single byte per entry (a significant underestimate), this is over Terabytes of data.

Pseudocode BABY-STEP-GIANT-STEP( α, β, m, n) FOR j IN [0, m] HASH-TABLE-PUT( α j (mod n), j) Compute α −m (mod n) γ ← β FOR i IN [0, ceil(n/m)] IF HASH-TABLE-CONTAINS-KEY( γ ) j ← HASH-TABLE-GET( γ ) RETURN (i * m) + j ELSE γ ← γ ∗ α −m (mod n)

Benefits of Parallelization Being able to compute Discrete Logarithms faster for large values could make cryptosystems that use this problem vulnerable to attack. Discovering this could result in more secure encryption of confidential data using systems that are not vulnerable to this attack.

Implementation The hash table can be distributed in order to take advantage of total memory capacity of a cluster. Each node can independently build a portion of the hash table. A barrier can be used to ensure that all nodes have completed this first stage before continuing. Once the hash table has been generated, each node can perform a subset of the collision checks independently. Thus, the only communication ever required between nodes is to handle the distributed hash table inserts/lookups.

Implementation Drawbacks Whenever a node needs to look up a hash table key that is stored on another node, network latency becomes a factor. While hash tables for very large numbers will quickly exhaust available memory, numbers that are reasonably sized for running tests on the Paranoia cluster do not even come close to this limit. Better performance may be seen on SMP machines, but the number of processors available is limited. Hybrid SMP/Cluster parallel systems might be an effective compromise.

Alternative Ideas Since the hash tables for the problems we are solving are small enough to fit on a single node, we could fill the table in a distributed manner, and all-gather the resulting hash table. Each node would then have a local copy of the table and network latency would be eliminated for hash table lookups. Each node could perform only hash-put and hash-get requests on its local table, and could simply ignore requests for other nodes. In this way, the nodes would all be testing the same values, but would still benefit from the increased memory of a cluster over a single machine.

Results Initial increase of processors from 1 to 2 showed a large slowdown. Large number of sends / receives Decent speedup from 2 to 32 processors

Results Limited time for testing does not allow us to use the algorithm’s full potential Algorithm is based on a trade off of memory and time Optimal size for hash table is sqrt(n) entries On small 32 bit numbers, memory usage is only around 256kb

Results Any recent cryptosystem will use at least 128bit numbers. To use the optimal sqrt(n) entries, this would require approximately 268,435,456 Terabytes of memory Clearly an infeasible amount to use the optimally sized hash table on a single (or multiple) machines.

Results Distributed memory allows us to use a larger hash map, thus reducing the runtime of the algorithm Results expected to surpass linear speedup, due to an improvement in the asymptotic running time.

Graph - 8-bit Input

Graph - 16-bit Input

Graph - 32-bit Input

Graph - 8-bit and 16-bit Inputs

Conclusions The speedup observed from 2 to 32 processors points towards MPI overhead as major cause for initial slowdown. On small data, shared memory would have been a better choice Still can use optimally sized hash map Small overhead, little synchronization needed

Questions?