ASYMMETRIC CRYPTOGRAPHY

Similar documents
Key Exchange. References: Applied Cryptography, Bruce Schneier Cryptography and Network Securiy, Willian Stallings

Number Theory and RSA Public-Key Encryption

CSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography

Public Key Algorithms

CS669 Network Security

Outline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA

Public Key Algorithms

Other Uses of Cryptography. Cryptography Goals. Basic Problem and Terminology. Other Uses of Cryptography. What Can Go Wrong? Why Do We Need a Key?

Chapter 9 Public Key Cryptography. WANG YANG

Outline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d)

Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010

Lecture 2 Applied Cryptography (Part 2)

Distributed Systems. 26. Cryptographic Systems: An Introduction. Paul Krzyzanowski. Rutgers University. Fall 2015

Topics. Number Theory Review. Public Key Cryptography

Digital Signatures. Luke Anderson. 7 th April University Of Sydney.

Introduction to Cryptography and Security Mechanisms. Abdul Hameed

Introduction to Cryptography and Security Mechanisms: Unit 5. Public-Key Encryption

Chapter 3 Public Key Cryptography

Public Key Cryptography

Key Exchange. Secure Software Systems

CS Network Security. Nasir Memon Polytechnic University Module 7 Public Key Cryptography. RSA.

Kurose & Ross, Chapters (5 th ed.)

Cryptography Symmetric Cryptography Asymmetric Cryptography Internet Communication. Telling Secrets. Secret Writing Through the Ages.

RSA (algorithm) History

Overview. Public Key Algorithms I

Applied Cryptography and Computer Security CSE 664 Spring 2018

ISA 662 Internet Security Protocols. Outline. Prime Numbers (I) Beauty of Mathematics. Division (II) Division (I)

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 6 Introduction to Public-Key Cryptography

Chapter 9. Public Key Cryptography, RSA And Key Management

10.1 Introduction 10.2 Asymmetric-Key Cryptography Asymmetric-Key Cryptography 10.3 RSA Cryptosystem

Cryptography and Network Security. Sixth Edition by William Stallings

Lecture 6: Overview of Public-Key Cryptography and RSA

Cryptography III. Public-Key Cryptography Digital Signatures. 2/1/18 Cryptography III

Network Security. Chapter 4 Public Key Cryptography. Public Key Cryptography (4) Public Key Cryptography

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018

RSA (material drawn from Avi Kak Lecture 12, Lecture Notes on "Computer and Network Security" Used in asymmetric crypto.

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security

Applied Cryptography and Network Security

A nice outline of the RSA algorithm and implementation can be found at:

Other Topics in Cryptography. Truong Tuan Anh

ח'/סיון/תשע "א. RSA: getting ready. Public Key Cryptography. Public key cryptography. Public key encryption algorithms

Public Key Cryptography

Introduction. CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell

Public-Key Cryptography. Professor Yanmin Gong Week 3: Sep. 7

CSE 127: Computer Security Cryptography. Kirill Levchenko

Public Key Cryptography and the RSA Cryptosystem

Public Key Encryption. Modified by: Dr. Ramzi Saifan

CSC 474/574 Information Systems Security

1.264 Lecture 28. Cryptography: Asymmetric keys

Public-key encipherment concept

Channel Coding and Cryptography Part II: Introduction to Cryptography

Davenport University ITS Lunch and Learn February 2, 2012 Sneden Center Meeting Hall Presented by: Scott Radtke

What did we talk about last time? Public key cryptography A little number theory

Computer Security 3/23/18

Cryptography (DES+RSA) by Amit Konar Dept. of Math and CS, UMSL

Part VI. Public-key cryptography

Some Stuff About Crypto

Encryption. INST 346, Section 0201 April 3, 2018

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security

S. Erfani, ECE Dept., University of Windsor Network Security

RSA Cryptography in the Textbook and in the Field. Gregory Quenell

Assignment 9 / Cryptography

CS 161 Computer Security

Enhanced Asymmetric Public Key Cryptography based on Diffie-Hellman and RSA Algorithm

Chapter 11 : Private-Key Encryption

RSA. Public Key CryptoSystem

Public Key (asymmetric) Cryptography

RSA: PUBLIC KEY ALGORITHMS

Lecture 9a: Secure Sockets Layer (SSL) March, 2004

Applied Cryptography Protocol Building Blocks

Great Theoretical Ideas in Computer Science. Lecture 27: Cryptography

Introduction. Cambridge University Press Mathematics of Public Key Cryptography Steven D. Galbraith Excerpt More information

CPSC 467b: Cryptography and Computer Security

ASYMMETRIC (PUBLIC-KEY) ENCRYPTION. Mihir Bellare UCSD 1

CS 6324: Information Security More Info on Key Establishment: RSA, DH & QKD

An overview and Cryptographic Challenges of RSA Bhawana

Lecture 6 - Cryptography

9/30/2016. Cryptography Basics. Outline. Encryption/Decryption. Cryptanalysis. Caesar Cipher. Mono-Alphabetic Ciphers

Cryptography Basics. IT443 Network Security Administration Slides courtesy of Bo Sheng

Math From Scratch Lesson 22: The RSA Encryption Algorithm

David Wetherall, with some slides from Radia Perlman s security lectures.

Elements of Cryptography and Computer and Networking Security Computer Science 134 (COMPSCI 134) Fall 2016 Instructor: Karim ElDefrawy

CSCI 454/554 Computer and Network Security. Topic 2. Introduction to Cryptography

Public-key Cryptography: Theory and Practice

Outline. Cryptography. Encryption/Decryption. Basic Concepts and Definitions. Cryptography vs. Steganography. Cryptography: the art of secret writing

Cryptography (Overview)

ENCRYPTION USING LESTER HILL CIPHER ALGORITHM

ASYMMETRIC (PUBLIC-KEY) ENCRYPTION. Mihir Bellare UCSD 1

Basic Concepts and Definitions. CSC/ECE 574 Computer and Network Security. Outline

4 PKI Public Key Infrastructure

L13. Reviews. Rocky K. C. Chang, April 10, 2015

Cryptography & Key Exchange Protocols. Faculty of Computer Science & Engineering HCMC University of Technology

Ref:

CSC 474/574 Information Systems Security

Lecture 30. Cryptography. Symmetric Key Cryptography. Key Exchange. Advanced Encryption Standard (AES) DES. Security April 11, 2005

A Tour of Classical and Modern Cryptography

414-S17 Crypto. Shankar. April 18, 2017

UNIT III 3.1DISCRETE LOGARITHMS

6 Cryptographic Techniques A Brief Introduction

LAB: Public-Key Encryption

Transcription:

ASYMMETRIC CRYPTOGRAPHY CONTENT: 1. Number Theory 2. One Way Function 3. Hash Function 4. Digital Signature 5. RSA (Rivest-Shamir Adleman) References: 1. Applied Cryptography, Bruce Schneier 2. Cryptography and Network Security Principles and Practice, William Stallings 3. Introduction to Modern Cryptography, Jonathan Katz and Yehuda Lindell 4. Some Problems in Symmetric ans Asymmetric Cryptography, Santosh Kumar Yadav (Prof. Sunder Lal and Prof. S. C. Arora)

Protocol of Cryptography Protocol is a series of steps between two or more parties to do the task. Characteristics of protocol: It has a sequence from start to finish It involves two or more parties It achieves something 28/04/2018

Protocol for Asymmetric Cryptography (1) Alice and Bob agree on a cyptosystem. Bob sends Alice his public key. Alice encrypts plaintext using Bob s public key and sends it to Bob. Bob decrypts Alice s ciphertext using his private key. 28/04/2018

Protocol for Asymmetric Cryptography (2) Alice gets Bob s public key from database. All public keys are published on database. Alice encrypts plaintext using Bob s public key and sends it to Bob. Bob decrypts Alice s ciphertext using his private key. 28/04/2018

Number Theory

Modular Arithmetic Mira says she ll be home by 10:00, and she s 13 hours late, what time does she get home?? (10+13) mod 12 = 23 mod 12 = 11 Another way of writing this is to say that 23 and 11 are equivalent, modulo 12:

if b is called the residue of a, modulo n. a is called congruent to b, modulo n

Example : calculate a 8 mod n (a x a x a x a x a xa x a x a) mod n don t! ((a 2 2 2 mod n) mod n) mod n

Prime Number A prime number is an integer greater than 1 whose only factors are 1 and itself: No other number evenly divides it Ex: 2, 73, 2521, 2365347734339, etc.

Greatest Common Divisor Two numbers are relatively prime when they share no factors in common other than 1. In other words, if the greatest common divisor of a and n is equal to 1. This is written: gcd(a,n) = 1 The numbers 15 and 28 are relatively prime, 15 and 27 are not, and 13 and 500 are. A prime number is relatively prime to all other numbers except its multiples

Inverses Modulo The multiplicative inverse of 4 is... (?) How about modulo?

Example The inverse of 5, modulo 14, is 3. 2 has no inverse modulo 14

Calculate! Inverse 5 (modulo 7) =? Inverse 11 (modulo 8) =? Inverse 5 (modulo 2)=? Inverse 9 (modulo 3)=?

Answer (a) 3 (b) 3 (c) 1 (d) Tidak memiliki invers

Euler Totient Function(1): another methode to calculate inverse modulo n The reduced set of residues mod n is the subset of the complete set of residues that is relatively prime to n If n is prime, then the reduced set of residues mod n is the set of all numbers from 1 to n- 1. The number 0 is never part of the reduced set of residues for any n not equal to 1

Euler Totient Function(2): another methode to calculate inverse modulo n The Euler totient function, also called the Euler phi function and written as, is the number of elements in the reduced set of residues modulo n. In other words, is the number of positive integers less than n that are relatively prime to n (for any n greater than 1). (Leonhard Euler, pronounced Oiler, was a Swiss mathematician who lived from 1707 to 1783.)

Find The Reduced set of residues from the number below! 12 1, 5, 7, 11 5 4 9 7 14

Answer 12 1, 5, 7, 11 5 1, 2, 3, 4 4 1, 3 9 1, 2, 4, 5, 7, 8 7 1, 2, 3, 4, 5, 6 14 1, 3, 5, 9, 11,13

Both methods for calculating inverses can be extended to solve for x in the general problem (if gcd (a,n) = 1): (a*x) mod n = b

Calculate x! 3x mod 5 = 4 4x mod 3 = 2 7x mod 6 = 2 2x mod 3 = 1

One-Way Function

One Way Function one-way function is central to public-key cryptography One-way functions are relatively easy to compute, but significantly harder to reverse That is, given x it is easy to compute f(x), but given f(x) it is hard to compute x.

Trapdoor A trapdoor one-way function is a special type of one-way function, one with a secret trapdoor. It is easy to compute in one direction and hard to compute in the other direction. But, if you know the secret, you can easily compute the function in the other direction That is, it is easy to compute f(x) given x, and hard to compute x given f(x). However, there is some secret information, y, such that given f(x) and y it is easy to compute x

One Way Hash Function A one-way hash function has many names: compression function, contraction function, message digest, fingerprint, cryptographic checksum, message integrity check (MIC), and manipulation detection code (MDC).

One Way Hash Function A hash function is a function mathematical or otherwise, that takes a variable-length input string (called a pre-image) and converts it to a fixed-length (generally smaller) output string (called a hash value). to produce a value that indicates whether a candidate pre-image is likely to be the same as the real pre-image.

A one-way hash function is a hash function that works in one direction: It is easy to compute a hash value from preimage, but it is hard to generate a pre-image that hashes to a particular value. A good one-way hash function is also collision-free: It is hard to generate two pre-images with the same hash value.

Message Authentication Codes A message authentication code (MAC), also known as a data authentication code (DAC), is a oneway hash function with the addition of a secret key. The hash value is a function of both the pre-image and the key. The theory is exactly the same as hash functions, except only someone with the key can verify the hash value. You can create a MAC out of a hash function or a block encryption algorithm; there are also dedicated MACs

Digital Signature Why Signature? The signature is authentic. The signature is unforgeable. The signature is proof that the signer, and no one else, deliberately signed the document The signature is not reusable. The signed document is unalterable. After the document is signed, it cannot be altered. The signature cannot be repudiated.

Signing Documents with Public-Key Cryptography Basic Protocol: Alice encrypts the document with her private key, thereby signing the document. Alice sends the signed document to Bob. Bob decrypts the document with Alice s public key, thereby verifying the signature.

The Protocol Statisfies the Characteristic The signature is authentic; when Bob verifies the message with Alice s public key, he knows that she signed it. The signature is unforgeable; only Alice knows her private key. The signature is not reusable; the signature is a function of the document and cannot be transferred to any other document. The signed document is unalterable; if there is any alteration to the document, the signature can no longer be verified with Alice s public key. The signature cannot be repudiated. Bob doesn t need Alice s help to verify her signature.

Signing Documents with Public- Key Cryptography and One-Way Hash Functions Protocol: Alice produces a one-way hash of a document. Alice encrypts the hash with her private key, thereby signing the document. Alice sends the document and the signed hash to Bob. Bob produces a one-way hash of the document that Alice sent. He then, using the digital signature algorithm, decrypts the signed hash with Alice s public key. If the signed hash matches the hash he generated, the signature is valid.

The bit string attached to the document when signed (in the previous example, the one-way hash of the document encrypted with the private key) will be called the digital signature, or just the signature. The entire protocol, by which the receiver of a message is convinced of the identity of the sender and the integrity of the message, is called authentication

Public Key Algorithm Since 1976, numerous public-key cryptography algorithms have been proposed. Many of these are insecure. Of those still considered secure, many are impractical. Either they have too large a key or the ciphertext is much larger than the plaintext

Only three algorithms work well for both encryption and digital signatures: RSA, ElGamal, and Rabin. All of these algorithms are slow. They encrypt and decrypt data much more slowly than symmetric algorithms; usually that s too slow to support bulk data encryption.

Advantages Only private key must be kept secret. In large network, the number of keys may be smaller than in the symmetric algorithm. Disadvantages Key sizes are larger than the key of symmetric algorithm. No public-key scheme has been proven to be secure. The most effective public-key encryption schemes have their security based on the set of number.

RSA

RSA Named after the three inventors Ron Rivest, Adi Shamir, and Leonard Adleman. RSA gets its security from the difficulty of factoring large numbers. The public and private keys are functions of a pair of large (100 to 200 digits or even larger) prime numbers

To generate the two keys, choose two random large prime numbers, p and q. For maximum security, choose p and q of equal length. Compute the product: n = pq Then randomly choose the encryption key, e, such that e and (p - 1)(q - 1) are relatively prime.

Finally, use the extended Euclidean algorithm to compute the decryption key, d, such that Note that d and n are also relatively prime. The numbers e and n are the public key; the number d is the private key. The two primes, p and q, are no longer needed. They should be discarded, but never revealed.

Key Generation

Encryption To encrypt a message m, first divide it into numerical blocks smaller than n (with binary data, choose the largest power of 2 less than n). That is, if both p and q are 100-digit primes, then n will have just under 200 digits and each message block, mi, should be just under 200 digits long. (If you need to encrypt a fixed number of blocks, you can pad them with a few zeros on the left to ensure that they will always be less than n.) The encrypted message, c, will be made up of similarly sized message blocks, ci, of about the same length. The encryption formula is simply

Encryption

Decryption

Decryption

Example Select two prime numbers, p = 17 and q = 11. Calculate n = pq = 17 11 = 187. Euler phi function Calculate = (p - 1)(q - 1) = 16 10 = 160. Select e such that e is relatively prime to = 160 and less than ; we choose e = 7. Determine d such that d e = 1 (mod 160) and d < 160. d= e 1 mod The correct value is d = 23

The resulting keys are public key PU = {7, 187} and private key PR = {23, 187}.

Ex: Plaintext message M = 88 Encryption : C = (88^7) mod 187=11 Decryption : M = (11^23) mod 187=88

General Approach of RSA

Example

Speed of RSA about 1000 times slower than DES The fastest VLSI hardware implementation for RSA with a 512-bit modulus has a throughput of 64 kilobits per second RSA encryption goes much faster if you re smart about choosing a value of e. The three most common choices are 3, 17, and 65537 (2^(16) + 1). (The binary representation of 65537 has only two ones, so it takes only 17 multiplications to exponentiate.)

Standards RSA is a de facto standard in much of the world. The ISO almost, but not quite, created an RSA digital-signature standard; RSA is in an information annex to ISO 9796. The French banking community standardized on RSA, as have the Australians. The United States currently has no standard for public-key encryption, because of pressure from the NSA and patent issues. Many U.S. companies use PKCS, written by RSA Data Security, Inc. A draft ANSI banking standard specifies RSA.

Exploration 1. Alice want to send Bob secret message of M = (4 digit terakhir dari NIM)using RSA with p = 13 and q = 17. Bob chooses his public key of 11. Determine: the ciphertext : n, C 1, C 2 the decryption key: φ n, d 2. Explore what kind of attack able to do in RSA!

HAPPY LEARNING!!