NET 311 Information Security

Slides:



Advertisements
Similar presentations
Chapter 3 Public Key Cryptography and Message authentication.
Advertisements

Public Key Cryptography Nick Feamster CS 6262 Spring 2009.
Cryptography and Network Security Chapter 9
Public Key Algorithms …….. RAIT M. Chatterjee.
Dr. Lo’ai Tawalbeh Summer 2007 Chapter 9 – Public Key Cryptography and RSA Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus INCS.
Cryptography and Network Security Chapter 9. Chapter 9 – Public Key Cryptography and RSA Every Egyptian received two names, which were known respectively.
Public Key Cryptography and the RSA Algorithm
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.
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.
1 Pertemuan 08 Public Key Cryptography Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
Chapter 9 – Public Key Cryptography and RSA Private-Key Cryptography  traditional private/secret/single key cryptography uses one key  shared by both.
Cryptography and Network Security Chapter 9 5th Edition by William Stallings Lecture slides by Lawrie Brown.
Introduction to Public Key Cryptography
Rachana Y. Patil 1 1.
Prime Numbers Prime numbers only have divisors of 1 and self
Public Key Cryptography and the RSA Algorithm Cryptography and Network Security by William Stallings Lecture slides by Lawrie Brown Edited by Dick Steflik.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Data Security and Encryption (CSE348) 1. Lecture # 15 2.
Network Security Lecture 17 Presented by: Dr. Munam Ali Shah.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Public-Key Encryption
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.
Computer and Network Security Rabie A. Ramadan Lecture 6.
Cryptography and Network Security Chapter 9 - Public-Key Cryptography
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Cryptography and Network Security Public Key Cryptography and RSA.
Chapter 3 – Public Key Cryptography and RSA (A). Private-Key Cryptography traditional private/secret/single-key cryptography uses one key shared by both.
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.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
By Marwan Al-Namari & Hafezah Ben Othman Author: William Stallings College of Computer Science at Al-Qunfudah Umm Al-Qura University, KSA, Makkah 1.
Chapter 9 – Public Key Cryptography and RSA Every Egyptian received two names, which were known respectively as the true name and the good name, or the.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
CSEN 1001 Computer and Network Security Amr El Mougy Mouaz ElAbsawi.
Public Key Cryptography. Asymmetric encryption is a form of cryptosystem in which Encryption and decryption are performed using the different keys—one.
Lecture 5 Asymmetric Cryptography. Private-Key Cryptography Traditional private/secret/single key cryptography uses one key Shared by both sender and.
CS480 Cryptography and Information Security
Asymmetric Encryption
Visit for more Learning Resources
Lecture 5 RSA DR. Nermin Hamza.
G. Pullaiah College of Engineering and Technology
Cryptography and Network Security
Chapter 9 – Public Key Cryptography and RSA
Public Key Cryptography and the RSA Algorithm
RSA Algorithm Cryptography and Network Security by William Stallings
Cryptography and Network Security
Public Key Encryption and Digital Signatures
Public-Key Cryptography and RSA
Public Key Encryption and the RSA Algorithm
CSCI-235 Micro-Computer Applications
NET 311 Information Security
The RSA Algorithm JooSeok Song Tue.
Public-Key Cryptography
Private-Key Cryptography
PART VII Security.
ICS 353: Design and Analysis of Algorithms
The RSA Algorithm JooSeok Song Tue.
Cryptography and Network Security Chapter 9
“Public Key Cryptography” & “RSA”
NET 311 Information Security
Cryptography and Network Security
Cryptography and Network Security Chapter 9
Cryptography and Network Security Chapter 9
Chapter -5 PUBLIC-KEY CRYPTOGRAPHY AND RSA
Basic of Modern Cryptography
Introduction to Cryptography
Presentation transcript:

NET 311 Information Security Networks and Communication Department Lecture 4: Asymmetric Ciphers (RSA,ElGamal)

lecture contents: Public-Key Cryptography Why Public-Key Cryptography? RSA Cryptography EIGamal Cryptography 19-Feb-19 Networks and Communication Department

Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender and receiver if this key is disclosed communications are compromised also is symmetric, parties are equal hence does not protect sender from receiver forging a message & claiming is sent by sender 19-Feb-19 Networks and Communication Department

Public-Key Cryptography probably most significant advance in the 3000 year history of cryptography uses two keys – a public & a private key asymmetric since parties are not equal uses clever application of number theoretic concepts to function 19-Feb-19 Networks and Communication Department

Why Public-Key Cryptography? Developed to address two key issues: key distribution – how to have secure communications in general without having to trust a KDC with your key digital signatures – how to verify a message comes intact from the claimed sender The concept of public-key cryptography evolved from an attempt to attack two of the most difficult problems associated with symmetric encryption: key distribution and digital signatures. The first problem is that of key distribution, which under symmetric encryption requires either (1) that two communicants already share a key, which somehow has been distributed to them; or (2) the use of a key distribution center. This seemed to negated the very essence of cryptography: the ability to maintain total secrecy over your own communication. The second was that of "digital signatures." If the use of cryptography was to become widespread, not just in military situations but for commercial and private purposes, then electronic messages and documents would need the equivalent of signatures used in paper documents. The idea of public key schemes, and the first practical scheme, which was for key distribution only, was published in 1976 by Diffie & Hellman. The concept had been previously described in a classified report in 1970 by James Ellis (UK CESG) - and subsequently declassified [ELLI99]. Its interesting to note that they discovered RSA first, then Diffie-Hellman, opposite to the order of public discovery! There is also a claim that the NSA knew of the concept in the mid-60’s [SIMM93]. 19-Feb-19 Networks and Communication Department

Public-Key Cryptography public-key/two-key/asymmetric cryptography involves the use of two keys: a public-key, which may be known by anybody, and can be used to encrypt messages, and verify signatures a related private-key, known only to the recipient, used to decrypt messages, and sign (create) signatures Is asymmetric because those who encrypt messages or verify signatures cannot decrypt messages or create signatures Asymmetric algorithms rely on one key for encryption and a different but related key for decryption. These algorithms have the following important characteristic: • It is computationally infeasible to determine the decryption key given only knowledge of the cryptographic algorithm and the encryption key. In addition, some algorithms, such as RSA, also exhibit the following characteristic: • Either of the two related keys can be used for encryption, with the other used for decryption. Anyone knowing the public key can encrypt messages or verify signatures, but cannot decrypt messages or create signatures, thanks to some clever use of number theory. 6

Public-Key Cryptography Stallings Figure 9.1a “Public-Key Cryptography”, shows that a public-key encryption scheme has six ingredients: • Plaintext: the readable message /data fed into the algorithm as input. • Encryption algorithm: performs various transformations on the plaintext. • Public and private keys: a pair of keys selected so that if one is used for encryption, the other is used for decryption. The exact transformations performed by the algorithm depend on the public or private key that is provided as input. • Ciphertext: the scrambled message produced as output. It depends on the plaintext and the key. For a given message, two different keys will produce two different ciphertexts. • Decryption algorithm: accepts the ciphertext and matching key and produces the original plaintext. Consider the following analogy using padlocked boxes: traditional schemes involve the sender putting a message in a box and locking it, sending that to the receiver, and somehow securely also sending them the key to unlock the box. The radical advance in public key schemes was to turn this around, the receiver sends an unlocked box (their public key) to the sender, who puts the message in the box and locks it (easy - and having locked it cannot get at the message), and sends the locked box to the receiver who can unlock it (also easy), having the (private) key. An attacker would have to pick the lock on the box (hard). 7

Asymmetric-Key Cryptography Asymmetric-key (public key cryptography) uses two keys: one private and one public. There are two algorithms: RSA ELGAMAL

Public-Key Applications can classify uses into 3 categories: encryption/decryption (provide secrecy) digital signatures (provide authentication) key exchange (of session keys) some algorithms are suitable for all uses, others are specific to one Public-key systems are characterized by the use of a cryptographic type of algorithm with two keys. Depending on the application, the sender uses either the sender’s private key or the receiver’s public key, or both, to perform some type of cryptographic function. In broad terms, we can classify the use of public-key cryptosystems into the three categories: • Encryption/decryption: The sender encrypts a message with the recipient’s public key. • Digital signature: The sender “signs” a message with its private key, either to the whole message or to a small block of data that is a function of the message. • Key exchange: Two sides cooperate to exchange a session key. Several different approaches are possible, involving the private key(s) of one or both parties. Some algorithms are suitable for all three applications, whereas others can be used only for one or two of these applications. Stallings Table 9.3 (shown here) indicates the applications supported by the algorithms discussed in this book. 9

Modular arithmetic This example is modulo 7 The numbers allowed are 0 to 6 After 6, numbers “wrap around” 0 = 7 (mod 7) 3+3 = 6 (mod 7) 4+4 = 1 (mod 7) 5 6 1 2 3 4

RSA The most common public key algorithm is RSA, named for its inventors Rivest, Shamir, and Adelman. It uses two numbers: e  public key d private The two keys, e and d, have a special relationship to each other.

RSA

RSA – selecting keys Bob uses the following steps to select the private and public keys: Bob chooses two very large prime numbers p and q Bob multiplies p and q to find n  n=p x q Bob calculates another number ф = (p -1) X (q -1) Bob chooses a random number e, 1< e< ф . He then calculates d so that d X e mod ф = 1 Bob announces e and n to the public; he keeps ф and d secret.

RSA – Encryption and Decryption Restriction P < n , if not, the plaintext needs to be divided into blocks to make P less than n.

RSA Exercise Encrypt the following message “NO” By Using RSA algorithm. Assume that p=17, q =11, and e= 7 Hint, each character will be encoded according to this algorithm (A - Z)  (00 – 25) Encrypt each character individually .

The solution Step1: calculate n, where n= p x q = 17 x 11 = 187 Step2: calculate ɸ where ɸ = (p-1) x (q-1) = 16 X 10 =160 Step3: calculate d, where e is given e . d mod ɸ=1 7d mod 160 =1  d=23 This is because 23 X 7 = 161 = ( 1 X 160) + 1

The solution Step5: encode the plaintext. P=“NO”= 13 14 Step6: C= pe mod n C(N)= (13 ) 7 mod 187 = 106 C(O)=(14) 7 mod 187= 108 Step7: P= Cd mod n P(106)= (106) 23 mod 187 =13 P(108)= (108) 23 mod 187 =14

RSA- Application RSA is useful for short messages but not for long messages. RSA is used in digital signature , and authentication algorithms.