CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.

Slides:



Advertisements
Similar presentations
Public Key Cryptography Nick Feamster CS 6262 Spring 2009.
Advertisements

Asymmetric-Key Cryptography
CSE331: Introduction to Networks and Security Lecture 19 Fall 2002.
Public Key Encryption Algorithm
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Computer Science CSC 405By Dr. Peng Ning1 CSC 405 Introduction to Computer Security Topic 2. Basic Cryptography (Part II)
Public Key Algorithms …….. RAIT M. Chatterjee.
Announcement Homework 1 out, due 1/18 11:59pm If you purchased the textbooks, but it hasn’t arrived, please see TA for copies of the questions, Project.
Review Overview of Cryptography Classical Symmetric Cipher
RSA ( Rivest, Shamir, Adleman) Public Key Cryptosystem
Public Encryption: RSA
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
Cryptography & Number Theory
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
The School of Electrical Engineering and Computer Science (EECS) CS/ECE Network Security Dr. Attila Altay Yavuz Topic 5 Essential Public Key Crypto Methods.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Dr.Saleem Al_Zoubi1 Cryptography and Network Security Third Edition by William Stallings Public Key Cryptography and RSA.
Public Key Algorithms 4/17/2017 M. Chatterjee.
1 Pertemuan 08 Public Key Cryptography Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
Public Key Cryptography RSA Diffie Hellman Key Management Based on slides by Dr. Lawrie Brown of the Australian Defence Force Academy, University College,
Diffie-Hellman Key Exchange
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.
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.5 Public Key Algorithms.
“RSA”. RSA  by Rivest, Shamir & Adleman of MIT in 1977  best known & widely used public-key scheme  RSA is a block cipher, plain & cipher text are.
Lecture 6: Public Key Cryptography
Introduction to Public Key Cryptography
Public Key Model 8. Cryptography part 2.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
Andreas Steffen, , 4-PublicKey.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications.
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Network and Communications Network Security Department of Computer Science Virginia Commonwealth University.
RSA Ramki Thurimella.
Cryptography: RSA & DES Marcia Noel Ken Roe Jaime Buccheri.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
Fall 2008CS 334: Computer Security1 Public Key Cryptography.
Cryptography Dec 29. This Lecture In this last lecture for number theory, we will see probably the most important application of number theory in computer.
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.
Improving Encryption Algorithms Betty Huang Computer Systems Lab
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 Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Darci Miyashiro Math 480 April 29, 2013
Public-Key Encryption
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 Public-Key Cryptography and Message Authentication.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
The RSA Algorithm. Content Review of Encryption RSA An RSA example.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
PUBLIC KEY CRYPTOGRAPHY ALGORITHM Concept and Example 1IT352 | Network Security |Najwa AlGhamdi.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
Chapter 3 – Public Key Cryptography and RSA (A). Private-Key Cryptography traditional private/secret/single-key cryptography uses one key shared by both.
Public Key Cryptosystems RSA Diffie-Hellman Department of Computer Engineering Sharif University of Technology 3/8/2006.
Chapter 9 Public Key Cryptography and RSA. Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender.
Fall 2002CS 395: Computer Security1 Chapter 9: Public Key Cryptography.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Cryptographic Security Identity-Based Encryption.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
RSA Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Elgamal Public Key Encryption CSCI 5857: Encoding and Encryption.
ECE454/599 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2012.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Public Key Cryptography
Presentation transcript:

CS 4803 Fall 04 Public Key Algorithms

Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication. n Modular exponentiation.

Modular Addition n Addition modulo (mod) K u Poor cipher with (d k +d m ) mod K, e.g., if K=10 and d k is the key. n Additive inverse: addition mod K yields 0. n “Decrypt” by adding inverse.

Modular Multiplication n Multiplication modulo K n Multiplicative inverse: multiplication mod K yields 1 n Only some numbers have inverse n Use Euclid’s algorithm to find inverse u Given x, n, it finds y such that x  y mod n = 1 n Only the numbers relatively prime to n will have mod n multiplicative inverse

Totient Function n x, m relative prime: no other common factor than 1 n Totient function ø(n): number of integers less than n relatively prime to n u if n is prime, ø(n)=n-1 u if n=p  q, and p, q are primes, ø(n)=(p-1)(q-1)

Modular Exponentiation n x y mod n = x y mod ø(n) mod n n if y = 1 mod ø(n) then x y mod n = x mod n

RSA (Rivest, Shamir, Adleman) n The most popular one. n Support both public key encryption and digital signature. n Assumption/theoretical basis: u Factoring a big number is hard. n Variable key length (usually 512 bits). n Variable plaintext block size. u Plaintext must be “smaller” than the key. u Ciphertext block size is the same as the key length.

What Is RSA? n To generate key pair: u Pick large primes (>= 256 bits each) p and q u Let n = p*q, keep your p and q to yourself! u For public key, choose e that is relatively prime to ø(n) =(p-1)(q-1), let pub = u For public key, choose e that is relatively prime to ø(n) =(p-1)(q-1), let pub = u For private key, find d that is the multiplicative inverse of e mod ø(n), i.e., e*d = 1 mod ø(n), let priv = u For private key, find d that is the multiplicative inverse of e mod ø(n), i.e., e*d = 1 mod ø(n), let priv =

How Does RSA Work? n Given pub = and priv = n Given pub = and priv = u encryption: c = m e mod n, m < n u decryption: m = c d mod n u signature: s = m d mod n, m < n u verification: m = s e mod n

Why Does RSA Work? n Given pub = and priv = n Given pub = and priv = u n =p*q, ø(n) =(p-1)(q-1) u e*d = 1 mod ø(n) u x e  d = x mod n u encryption: c = m e mod n u decryption: m = c d mod n = m e  d mod n = m mod n = m (since m < n) u digital signature (similar)

Why Is RSA Secure? n Factoring 512-bit number is very hard! n But if you can factor big number n then given public key, you can find d, hence the private key by: u Knowing factors p, q, such that, n = p*q u Then ø(n) =(p-1)(q-1) u Then d such that e*d = 1 mod ø(n)

Diffie-Hellman Key Exchange n Shared key, public communication n No authentication of partners n What’s involved? u p is a prime (about 512 bits), and g < p u p and g are publicly known

Diffie-Hellman-Merkle Key Exchange n Procedure AliceBob pick secret S a randomly pick secret S b randomly compute T A =g Sa mod pcompute T B =g Sb mod p send T A to Bobsend T B to Alice compute T B Sa mod pcompute T A Sb mod p Alice and Bob reached the same secret g SaSb mod p, which is then used as the shared key.

DH Security - Discrete Logarithm Is Hard n T = g s mod p n Conjecture: given T, g, p, it is extremely hard to compute the value of s (discrete logarithm)

Diffie-Hellman Scheme n Security factors u Discrete logarithm very difficult. u Shared key (the secret) itself never transmitted. n Disadvantages: u Expensive exponential operation F DoS possible. u The scheme itself cannot be used to encrypt anything – it is for secret key establishment. u No authentication, so you can not sign anything …

Bucket Brigade Attack...Man In The Middle AliceTrudyBob g Sa =123 g Sx =654 g Sb = > > > > <--654 <--255 <--654 < Sa =123 Sx 255 Sx =654 Sb 654 Sa =123 Sx 255 Sx =654 Sb n Trudy plays Bob to Alice and Alice to Bob

Diffie-Hellman in Phone Book Mode n DH was subject to active man-in-the-middle attack because their public key-component was intercepted and substituted n Phone book mode allows everyone to generate the public key-component in advance and publish them through other reliable means, e.g. for Bob n All communicating parties agree on their common n All communicating parties agree on their common

Encryption With Diffie-Hellman n Everyone computes and publishes n Everyone computes and publishes u T=g S mod p n Alice communicates with Bob: u Alice F Picks a random secret S a F Computes g b Sa mod p b F Use K ab = T b Sa mod p b to encrypt message F Send encrypted message along with g b Sa mod p b u Bob F (g b Sa ) Sb mod p b = (g b Sb ) Sa mod p b = T b Sa mod p b = K ab F Use K ab to decrypt