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

Similar documents
06/02/ Local & Metropolitan Area Networks. 0. Overview. Terminology ACOE322. Lecture 8 Network Security

Public Key Algorithms

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

Ref:

Outline. Data Encryption Standard. Symmetric-Key Algorithms. Lecture 4

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

Public Key Cryptography and the RSA Cryptosystem

Cryptographic Techniques. Information Technologies for IPR Protections 2003/11/12 R107, CSIE Building

Encryption. INST 346, Section 0201 April 3, 2018

Cryptography. Submitted to:- Ms Poonam Sharma Faculty, ABS,Manesar. Submitted by:- Hardeep Gaurav Jain

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

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

Public-key encipherment concept

CRYPTOGRAPHY & DIGITAL SIGNATURE

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

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

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 11 Basic Cryptography

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

Chapter 8 Security. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

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

1.264 Lecture 28. Cryptography: Asymmetric keys

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

CSC 474/574 Information Systems Security

CSE 3461/5461: Introduction to Computer Networking and Internet Technologies. Network Security. Presentation L

Lecture III : Communication Security Mechanisms

Lecture 6: Overview of Public-Key Cryptography and RSA

EEC-484/584 Computer Networks

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

Introduction to Cryptography. Vasil Slavov William Jewell College

Kurose & Ross, Chapters (5 th ed.)

Cryptography and Network Security. Sixth Edition by William Stallings

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

Topics. Number Theory Review. Public Key Cryptography

Overview. Public Key Algorithms I

Cryptographic Concepts

Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls

Computer Security: Principles and Practice

Public Key Algorithms

Security: Cryptography

The Network Security Model. What can an adversary do? Who might Bob and Alice be? Computer Networks 12/2/2009. CSC 257/457 - Fall

Chapter 9 Public Key Cryptography. WANG YANG

Encryption Details COMP620

CS669 Network Security

Other Topics in Cryptography. Truong Tuan Anh

IS 2150 / TEL 2810 Information Security and Privacy

Introduction to Cryptography and Security Mechanisms. Abdul Hameed

Assignment 9 / Cryptography

Security. Communication security. System Security

14. Internet Security (J. Kurose)

Public Key Cryptography

Hybrid Public Key Cryptosystem Combining RSA & DES Algorithms

How many DES keys, on the average, encrypt a particular plaintext block to a particular ciphertext block?

Public Key Cryptography

Chapter 9. Public Key Cryptography, RSA And Key Management

CSC 8560 Computer Networks: Network Security

EEC-682/782 Computer Networks I

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

Math236 Discrete Maths with Applications

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

Math From Scratch Lesson 22: The RSA Encryption Algorithm

CSC 474/574 Information Systems Security

Cryptography (Overview)

Some Stuff About Crypto

Public Key Cryptography, OpenPGP, and Enigmail. 31/5/ Geek Girls Carrffots GVA

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

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

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

CRYPTOLOGY KEY MANAGEMENT CRYPTOGRAPHY CRYPTANALYSIS. Cryptanalytic. Brute-Force. Ciphertext-only Known-plaintext Chosen-plaintext Chosen-ciphertext

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

CCNA Security 1.1 Instructional Resource

Keywords Security, Cryptanalysis, RSA algorithm, Timing Attack

Applied Cryptography and Computer Security CSE 664 Spring 2018

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

Public Key Encryption. Modified by: Dr. Ramzi Saifan

ASYMMETRIC CRYPTOGRAPHY

(2½ hours) Total Marks: 75

Public Key Cryptography and RSA

SECURITY IN NETWORKS

The Application of Elliptic Curves Cryptography in Embedded Systems

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

Chapter 3 Public Key Cryptography

Cryptography Math/CprE/InfAs 533

Introduction to Network Security Missouri S&T University CPE 5420 Data Integrity Algorithms

Module 13 Network Security. Version 1 ECE, IIT Kharagpur

PASSWORDS & ENCRYPTION

Cryptography MIS

Tuesday, January 17, 17. Crypto - mini lecture 1

CS61A Lecture #39: Cryptography

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

CSE 127: Computer Security Cryptography. Kirill Levchenko

2.1 Basic Cryptography Concepts

SECURITY IN NETWORKS 1

Chapter 3 Traditional Symmetric-Key Ciphers 3.1

Secure Multiparty Computation

Number Theory and RSA Public-Key Encryption

LECTURE 4: Cryptography

Public-key Cryptography: Theory and Practice

Substitution Ciphers, continued. 3. Polyalphabetic: Use multiple maps from the plaintext alphabet to the ciphertext alphabet.

Chapter 3. Principles of Public-Key Cryptosystems

Public Key Algorithms

Transcription:

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

Transpositional Ciphers-A Review Decryption 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 Encryption 1 2 3 4 5 6 7 8 A G O O D F R I E N D I S A T R E A S U R E O O A G D E N F I R D A I S A S T E R R E U Plaintexts Cyphertexts

Digital P-box 1 0 0 0 1 1 0 1 Enciphering 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 0 0 1 0 0 1 1 A P-box (Permutation box) performs transposition at the bit level. It can be implemented by hardware or software, but hardwired realization is faster.

S-Box 3 lines to 8 lines Decoder 8 lines to 8lines P-Box 8 lines to 3 lines Encoder An S-box (substitution box) performs substitution at the bit level. Example: Suppose 2 (010) is the input. Decoder s output is 00000010. P-box s output is 01000000. Encoder output is 6 (110)

Product Block P-Box S S S S S P-Box S S S P-Box The P-boxes and S-boxes can be combined to get more complex cipher blocks, called product blocks.

Data Encryption Standard (DES) 64-bit plaintexts A complex set of cipher blocks 64-bit ciphertexts 48-bits 56-bit key Key Processor

Iteration Block Left 32-bits Right 32-bits Function of right 32 bits and key 48-bits key XOR Left 32-bits Right 32-bits

The f-function R i-1 (32 bits) E K i (48-bits) R i -1 (48-bits) XOR S1 S2 S8 P 32-bits

Public Key Cryptography In public key cryptography, we have two keys: one private key and the other public key. A public Key cryptosystem must meet the following conditions: 1. Given the keys, the enciphering and deciphering processes should be simple. 2. Deriving the private key from the public key should be computationally infeasible. 3. Determining the private key from a chosen plaintext attack should be computationally infeasible.

Defining Totients in Public Key Cryptography Totient: Let p and q be two prime numbers and n = p q. Then the totient (n) is the number less than n with no factors common with n. Example: Let p=5 and q=2. So, n=10. Then the numbers that are less than 10 are relatively prime to 10 (i.e. no factors common with 10) are 1, 3, 7 and 9. So, (10)=4. Similarly, when n=21, the nos. that are relatively prime to 21 are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19 and 20. Therefore, (21) =12.

Defining Keys in Public Key Cryptography Given n, choose an integer e <n, that is relatively prime to (n). Find a second integer d, such that e. d mod (n) =1 then the public key is (e, n), and the private key is d.

Encryption and Decryption in Public Key Cryptography The RSA Method after its inventors (Rivest, Shamir and Adleman) Let m be a message. Then ciphertext c= m e mod n, and decrypted plaintext m= c d mod n where public key is (e, n) and private key is d or (d, n), such that e. d mod (n) =1.

Example: The RSA Method ALICE (e, n) = (5, 119) (d, n)= (77, 119) Bob 6 5 mod 119 41 77 mod 119 Plaintext m =6 Ciphertext c=41 Deciphered m=6 Public key (e, n) = (5, 119) Private key (d, n)= (77, 119)

Is RSA really Effective? If an intruder knows the decryption algorithm and n= 119, the only thing missing is d= 77. Why couldn t the intruder use trial and error to find d? The answer is yes, in this trivial example, an intruder could easily guess the value of d. But a major concept of the RSA algorithm is to use very large numbers for d and e. In practice, the numbers are so large (on the scale of tens of digits) that the trial-and-error approach of breaking the code takes a long time (several years) even with the fastest computer today.

Selection of Public and Private Keys 1. Choose two large prime numbers p and q. 2. Compute n= p x q. 3. Choose e (less than n) such that e and (p -1) (q -1) are relatively prime (having no common factors other than 1). 4. Choose d such that e x d mod [(p-1) (q- 1)] is equal to 1.

Confidentiality and authentication together in RSA 1. ONLY CONFIDENTIALITY C m Enciphering with recipient s public key Deciphering with recipients private key. m 2. BOTH CONFIDENTIALITY & AUTHENTICATION Enciphering with sender s Private key Enciphering with recipient s public key Deciphering with recipient s private key Authenticat ion with sender s public key

How does RSA provide data and origin authentication? Example: Let p=7, q= 11; so, n = 77. Let e= 17; so d= 53. Suppose, Allice wishes to send Bob HELLO WORLD. The plaintext is 07 04 11 11 14 26 22 14 17 11 03. Using Allice s private key(d, n), the ciphertext is 07 53 mod 77 = 35 04 53 mod 77 = 09. or, 35 09 44 44 93 12 24 94 04 05.

Providing Confidentiality and Authentication by RSA Providing both confidentiality and authentication requires enciphering with the sender s private key and the recipent s public key. Example: Suppose, Allice wishes to send Bob HELLO WORLD in confidence and authenticated. Assume Allice s private key is 53 and Bob s public key is 37. The plaintext is 07 04 11 11 and the encipherment is (07 53 mod 77) 37 mod 77 =07 (04 53 mod 77) 37 mod 77 =37 or, 07 37 44 44 14 59 22 14 61 44 47.

Deciphering confidential and authenticated message The recipient uses recipient s private key to decipher the message and the sender s public key to authenticate it. Bob receives the ciphertext: 07 37 44 44 14 59 22 14 61 44 47. The decipherment is (07 13 mod 77) 17 mod 77 =07 (37 13 mod 77) 17 mod 77= 04 Or, 07 04 11 11 14 26 22 14 17 11 03.

What is Digital Signature? A digital signature ensures authentication (sender s identity), integrity (no changes in data) and non-repudiation (i.e. the receiver is able to prove that the received message came from a specific sender). It can be realized by RSA through enciphering by sender s private key and deciphering by sender s public key.

Signing the Digest Signing the entire message is not time-efficient. The sender prepares a digest by Hashing and then encrypts the digest. The message plus the signed digest is communicated. From Allice Message Message To Bob Signed Digest Hashing (MD 5/ SHA- 1) Digest Encrypt Allice s private key Signed Digest

Receiver Site Message Signed Digest Hashing Decrypt Allice s public key Digest Digest Error Zero?