RSA Keys with Common Factors



Similar documents
FactHacks: RSA factorization in the real world

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

Overview of Public-Key Cryptography

Primality Testing and Factorization Methods

A deeper understanding of SSH: Results from Internet-wide scans

Final Exam. IT 4823 Information Security Administration. Rescheduling Final Exams. Kerberos. Idea. Ticket

A Novel Approach to combine Public-key encryption with Symmetric-key encryption

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

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

An Introduction to the RSA Encryption Method

ANALYSIS OF RSA ALGORITHM USING GPU PROGRAMMING

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

The Mathematics of the RSA Public-Key Cryptosystem

CRYPTOGRAPHY IN NETWORK SECURITY

Network Security. Gaurav Naik Gus Anderson. College of Engineering. Drexel University, Philadelphia, PA. Drexel University. College of Engineering

Algorithms and Parameters for Secure Electronic Signatures V.1.44 DRAFT May 4 th., 2001

Elements of Applied Cryptography Public key encryption

Public Key Cryptography and RSA. Review: Number Theory Basics

Cryptography and Network Security

CSCE 465 Computer & Network Security

Applied Cryptography Public Key Algorithms

Table of Contents. Bibliografische Informationen digitalisiert durch

Fully homomorphic encryption equating to cloud security: An approach

The Case of the RSA FUCK-A-DUCK certificate. Nadia Heninger Zakir Durumeric Eric Wustrow J. Alex Halderman. N=pq

Notes on Network Security Prof. Hemant K. Soni

Separable & Secure Data Hiding & Image Encryption Using Hybrid Cryptography

Public-Key Cryptanalysis 1: Introduction and Factoring

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

A Security Flaw in the X.509 Standard Santosh Chokhani CygnaCom Solutions, Inc. Abstract

Fast Internet-wide scanning and its security applications

Cryptography and Network Security Chapter 9

SECURITY IMPROVMENTS TO THE DIFFIE-HELLMAN SCHEMES

Public Key (asymmetric) Cryptography

A Factoring and Discrete Logarithm based Cryptosystem

CIS 5371 Cryptography. 8. Encryption --

Computer Security: Principles and Practice

Software Tool for Implementing RSA Algorithm

Digital Signatures. Meka N.L.Sneha. Indiana State University. October 2015

A SOFTWARE COMPARISON OF RSA AND ECC

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

The application of prime numbers to RSA encryption

MANAGING OF AUTHENTICATING PASSWORD BY MEANS OF NUMEROUS SERVERS

Lukasz Pater CMMS Administrator and Developer

Security Strength of RSA and Attribute Based Encryption for Data Security in Cloud Computing

Digital Signature. Raj Jain. Washington University in St. Louis

Public Key Cryptography of Digital Signatures

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

Public Key Cryptography Overview

Evaluation of Digital Signature Process

Lecture 6 - Cryptography

NEW DIGITAL SIGNATURE PROTOCOL BASED ON ELLIPTIC CURVES

MATH 168: FINAL PROJECT Troels Eriksen. 1 Introduction

Cryptographic Algorithms and Key Size Issues. Çetin Kaya Koç Oregon State University, Professor

How To Factor In Rsa With A Prime Factor

The science of encryption: prime numbers and mod n arithmetic

Bundesnetzagentur für Elektrizität, Gas, Telekommunikation, Post und Eisenbahnen

CMSS An Improved Merkle Signature Scheme

Factoring integers, Producing primes and the RSA cryptosystem Harish-Chandra Research Institute

Digital Signatures. Murat Kantarcioglu. Based on Prof. Li s Slides. Digital Signatures: The Problem

Cryptanalysis and security enhancement on the generation of Mu-Varadharajan electronic voting protocol. Vahid Jahandideh and Amir S.

Mathematical Model Based Total Security System with Qualitative and Quantitative Data of Human

Introduction to Cryptography CS 355

Public Key Cryptography: RSA and Lots of Number Theory

Cryptography and Network Security Chapter 10

An Introduction to Identity-based Cryptography CSEP 590TU March 2005 Carl Youngblood

A blind digital signature scheme using elliptic curve digital signature algorithm

Two Integer Factorization Methods

Secure File Transfer Using USB

ZMap. Fast Internet-Wide Scanning and its Security Applications. Zakir Durumeric Eric Wustrow J. Alex Halderman. University of Michigan

RSA Attacks. By Abdulaziz Alrasheed and Fatima

Discrete logarithms within computer and network security Prof Bill Buchanan, Edinburgh Napier

Capture Resilient ElGamal Signature Protocols

Factoring integers and Producing primes

An Introduction to digital signatures

Identity Based Encryption. Terence Spies VP Engineering

Elliptic Curve Cryptography in Practice

Multi-Layered Cryptographic Processor for Network Security

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

A New Efficient Digital Signature Scheme Algorithm based on Block cipher

How To Factoring

Number Theory and Cryptography using PARI/GP

Information & Communication Security (SS 15)

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

Data Grid Privacy and Secure Storage Service in Cloud Computing

1 Digital Signatures. 1.1 The RSA Function: The eth Power Map on Z n. Crypto: Primitives and Protocols Lecture 6.

2. Cryptography 2.4 Digital Signatures

How To Encrypt Data With Encryption

Number Theory and the RSA Public Key Cryptosystem

A Secure Intrusion Avoidance System Using Hybrid Cryptography

An Efficient and Provably-secure Digital signature Scheme based on Elliptic Curve Bilinear Pairings

THE ADVANTAGES OF ELLIPTIC CURVE CRYPTOGRAPHY FOR WIRELESS SECURITY KRISTIN LAUTER, MICROSOFT CORPORATION

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

Digital Signature Standard (DSS)

Index Calculation Attacks on RSA Signature and Encryption

Transcription:

RSA Keys with Common Factors Joppe W. Bos Cryptography group extreme Computing Group, Microsoft Research 1 / 19

Outline 2 / 19

Public-Key Cryptography 3 / 19

Cryptanalysis of Public-Key Cryptography Popular Public-Key Cryptography RSA (EC)DSA / ElGamal Mathematical problem Integer factorization (EC) Discrete Logarithm n = p q g = b k G Find p or q, given n Find log b (g) = k, given b, g and G 4 / 19

Sanity check I There have been many sanity checks of certificates and PKI Analyzing RSA Standards D. Loebenberger and M. Nüsken. Analyzing standards for RSA integers. In Africacrypt, 2011 Analyzing X.509 R. Holz, L. Braun, N. Kammenhuber, and G. Carle. The SSL landscape: a thorough analysis of the X.509 PKI using active and passive measurements. In ACM SIGCOMM, 2011 N. Vratonjic, J. Freudiger, V. Bindschaedler, and J.-P. Hubaux. The inconvenient truth about web certificates. In The Workshop on Economics of Information Security, 2011 Debian OpenSSL vulnerability S. Yilek, E. Rescorla, H. Shacham, B. Enright, and S. Savage. When private keys are public: results from the 2008 Debian OpenSSL vulnerability. In Internet Measurement Conference, 2009 5 / 19

Sanity check I There have been many sanity checks of certificates and PKI Analyzing RSA Standards D. Loebenberger and M. Nüsken. Analyzing standards for RSA integers. In Africacrypt, 2011 The entropy of the output distribution [of standardized RSA key generation] is always almost maximal,... and the outputs are hard to factor if factoring in general is hard. Analyzing X.509 R. Holz, L. Braun, N. Kammenhuber, and G. Carle. The SSL landscape: a thorough analysis of the X.509 PKI using active and passive measurements. In ACM SIGCOMM, 2011 N. Vratonjic, J. Freudiger, V. Bindschaedler, and J.-P. Hubaux. The inconvenient truth about web certificates. In The Workshop on Economics of Information Security, 2011 Debian OpenSSL vulnerability S. Yilek, E. Rescorla, H. Shacham, B. Enright, and S. Savage. When private keys are public: results from the 2008 Debian OpenSSL vulnerability. In Internet Measurement Conference, 2009 5 / 19

Sanity check II We look at things from a computational crypto point of view... Our work A. K. Lenstra, J. P. Hughes, M. Augier, J. W. Bos, T. Kleinjung, and C. Wachter. Public-Keys. In CRYPTO 2012, LNCS vol. 7417, pp 626-642. Full-version: Ron was wrong, Whit is right. In Cryptology eprint Archive At the same time... N. Heninger, Z. Durumeric, E. Wustrow, J. A. Halderman. Mining Your Ps and Qs: Detection of Widespread Weak Keys in Network Devices. USENIX Security Symposium 2012 6 / 19

Sanity check II We look at things from a computational crypto point of view... Our work A. K. Lenstra, J. P. Hughes, M. Augier, J. W. Bos, T. Kleinjung, and C. Wachter. Public-Keys. In CRYPTO 2012, LNCS vol. 7417, pp 626-642. Full-version: Ron was wrong, Whit is right. In Cryptology eprint Archive At the same time... N. Heninger, Z. Durumeric, E. Wustrow, J. A. Halderman. Mining Your Ps and Qs: Detection of Widespread Weak Keys in Network Devices. USENIX Security Symposium 2012 6 / 19

Data collection Summer 2009 - November 2011 Aug. 10: Download all publicly-visible SSL certificates on the IPv4 Internet 6 185 372 X.509 certificates 5 481 332 PGP keys 11 666 704 public keys 7 / 19

Data collection Summer 2009 - November 2011 Aug. 10: Download all publicly-visible SSL certificates on the IPv4 Internet X.509 6 185 230 RSA 141 DSA 1 ECDSA 47.6%: expiration date > 2011 77.7%: use SHA-1 33.4%: satisfy both requirements 6 185 372 X.509 certificates 5 481 332 PGP keys 11 666 704 public keys 2 546 752 ElGamal PGP keys 2 536 959 DSA 397 621 RSA 7 / 19

Ron Rivest, Adi Shamir and Leonard Adleman RSA is the most widely used approach to achieve public-key cryptography Keys Secret information: exponent d, prime factors p, q Public information: modulus n and the exponent e n = p q with p q gcd(e, (p 1)(q 1)) = 1 and d e 1 mod (p 1)(q 1) Encryption: c = m e mod n Decryption: m = c d mod n 8 / 19

Check the public exponent X.509 PGP Combined e % e % e % 65537 98.4921 65537 48.8501 65537 95.4933 17 0.7633 17 39.5027 17 3.1035 3 0.3772 41 7.5727 41 0.4574 35 0.1410 19 2.4774 3 0.3578 5 0.1176 257 0.3872 19 0.1506 7 0.0631 23 0.2212 35 0.1339 11 0.0220 11 0.1755 5 0.1111 47 0.0101 3 0.0565 7 0.0596 13 0.0042 21 0.0512 11 0.0313 65535 0.0011 2 127 + 3 0.0248 257 0.0241 other 0.0083 other 0.6807 other 0.0774 Note: 8 times e = 1 was used! 9 / 19

Check moduli sizes Moduli sizes % bits % bits 0.01 384 0.04 3072 1.6 512 1.5 4096 0.8 768 0.01 8192 73.9 1024 0.003 16384 21.7 2048 Primality and small factors 2 moduli are prime 171 have a factor < 2 24 (68 are even) Debian moduli 30 097 (21 459 distinct) blacklisted keys These RSA keys were discarded. 10 / 19

Identical keys I n 1 = n 2 Implications User 1 can decrypt all messages from user 2 (and vice versa) Most of the time harmless: renewal of key Possible explenation: Low-entropy when generating keys seed(initial_randomness); do { p=random(); } while( isprime(p)!= true ); do { q=random(); } while( isprime(q)!= true ); n = p*q; 11 / 19

Identical keys II Cluster: certs/keys with the same modulus Note: One cluster of size 16 489 4.3% of the RSA moduli are shared 12 / 19

Moduli with shared factors K 1 : a b K 2 : c d User 1 and user 2 have secure keys 13 / 19

Moduli with shared factors K 1 : a b K 2 : c d K 3 : b c User 1 and user 3 share a factor and User 2 and 3 share a factor 13 / 19

Moduli with shared factors K 1 : a b K 2 : c d K 3 : b c User 1 and user 3 share a factor and User 2 and 3 share a factor Greatest common divisor: everyone can break these keys! 13 / 19

Moduli with shared factors Given two RSA moduli n 1 and n 2, n 1 n 2 gcd(n 1, n 2 ) 1, results in a complete loss of security for these moduli. Checking all RSA keys for shared factors Straight-forward approach: ten core-years Smarter approach: ten core-hours 14 / 19

Moduli with shared factors Given two RSA moduli n 1 and n 2, n 1 n 2 gcd(n 1, n 2 ) 1, results in a complete loss of security for these moduli. Checking all RSA keys for shared factors Straight-forward approach: ten core-years Smarter approach: ten core-hours 14 / 19

RSA keys V - K9 15 / 19

RSA keys VI Affected keys We found 14 901 distinct primes factoring 12 934 distinct moduli 21 419 X.509 certs and PGP keys are affected None of these are blacklisted Primes # bits 307 256 2 257 14 592 512 Moduli # bits 214 512 12 720 1024 3 201 1024-bit RSA moduli occur in 5 250 certificates which are not-expired and use SHA-1 16 / 19

RSA keys VII - Discussion RSA requires generating two random prime numbers These primes must not be selected by anyone else before NIST recommends: size(random seed) = 2 size(security level) Possible explanations: Poor random initial seeding duplicate keys Using local entropy after each guess poor initial guess p 1, with prob 1/ log(p 1 ) this is prime next guesses use the local entropy seed(initial_randomness); do { p=random(); } while( isprime(p)!= true ); do { q=random(); } while( isprime(q)!= true ); n = p*q; 17 / 19

February 2012, new scan by EFF 7.2M distinct X.509 certs (up from 6.2M) 18 / 19

February 2012, new scan by EFF RSA-1024 4.7M 3.7M keys 7.2M distinct X.509 certs (up from 6.2M) > 5000 affected keys are no longer present 13 019 new keys affected New: 10 RSA-2048 keys are affected, two have not expired and use SHA-1 18 / 19

Conclusions Multi-secret systems (RSA) vs. single-secret systems (ElGamal, (EC)DSA) 19 / 19

Conclusions Multi-secret systems (RSA) vs. single-secret systems (ElGamal, (EC)DSA) Possible remedy Moduli [ pq for k-bit primes p chosen such that 2 2k 1 + p (2 2k 1 ] mod p) q = is prime p A. Lenstra. Generating RSA Moduli with a Predetermined Portion. In Asiacrypt 1998 19 / 19

Conclusions Multi-secret systems (RSA) vs. single-secret systems (ElGamal, (EC)DSA) Possible remedy Moduli [ pq for k-bit primes p chosen such that 2 2k 1 + p (2 2k 1 ] mod p) q = is prime p A. Lenstra. Generating RSA Moduli with a Predetermined Portion. In Asiacrypt 1998 Misinterpretations in the Media This is simply the Debian PRNG bug All our results exclude the blacklisted Debian keys. RSA is insecure When properly generating random primes then RSA is still secure. Only embedded devices are affected We have multiple examples of affected keys between users. 19 / 19