Download presentation
Presentation is loading. Please wait.
Published byBasil Charles Modified over 9 years ago
1
Cryptographic Security Aveek Chakraborty CS5204 – Operating Systems1
2
Cryptographic Security CS 5204 – Operating Systems2 Goals of Cryptography The most basic problem : ensure security of communication over in-secure medium Security Goals: - privacy (secrecy, confidentiality) only the intended recipient can see the communication - authenticity (integrity) the communication is generated by the intended sender information is not altered or destroyed - non-repudiation party in a dispute cannot repudiate, or refute the validity of a statement
3
Cryptographic Security Basic terminology in Cryptography Plaintexts Cipher texts Keys Encryption Decryption Cryptography Cryptanalysis Cryptology
4
Cryptographic Security CS 5204 – Operating Systems4 Cryptography Encryption key Decryption key public information E CA M D C M’ KeKe M KdKd Forms of attack: ciphertextonly knownplaintext chosenplaintext
5
Cryptographic Security Forms of Cryptosystems Secret-key cryptography (a.k.a. symmetric cryptography) – encryption & decryption use the same key – key must be kept secret – key distribution is very difficult Public-key cryptography (a.k.a. asymmetric cryptography) – encryption key different from decryption key – cannot derive decryption key from encryption key
6
Cryptographic Security CS 5204 – Operating Systems6 Combining Public/Private Key Systems (1) (2) A B Public key encryption is more expensive than symmetric key encryption For efficiency, combine the two approaches (1)Use public key encryption for authentication; once authenticated, transfer a shared secret symmetric key (2) Use symmetric key for encrypting subsequent data transmissions
7
Cryptographic Security CS 5204 – Operating Systems7 Secure Communication - Public Key System M M ? Alice Bob Eve D bob (C) E bob (M) C E bob is the public key for Bob D bob is the private key for Bob
8
Cryptographic Security CS 5204 – Operating Systems8 RivestShamirAdelman (RSA) Method M M Alice Bob M e mod n C d mod n Encryption Key for BobDecryption Key for Bob C (e, n) (d, n)
9
Cryptographic Security CS 5204 – Operating Systems9 RSA Method 1. Choose two large (100 digit) prime numbers, p and q, and set n = p x q 2. Choose any large integer, d, so that: GCD( d, ((p1)x(q1)) = 1 3. Find e so that: e x d = 1 (modulo (p1)x(q1)) Example: 1. p = 5, q = 11 and n = 55. (p1)x(q1) = 4 x 10 = 40 2. A valid d is 23 since GCD(40, 23) = 1 3. Then e = 7 since: 23 x 7 = 161 modulo 40 = 1
10
Cryptographic Security Encryption and Decryption using RSA method Encryption - Alice does the following:- i) Obtains Bob’s public key (e, n). ii) Represents the plaintext message as a positive integer m. iii) Computes the ciphertext c = m^e mod n. iv) Sends the ciphertext c to Bob. Decryption - Bob does the following:- i) Uses his private key (d, n) to compute m = c^d mod n. ii) Extracts the plaintext from the message representative m.
11
Cryptographic Security CS 5204 – Operating Systems11 (Large) Document Integrity File/ message hash process digest Digest properties: fixed-length, condensation of the source efficient to compute irreversible - computationally infeasible for the original source to be reconstructed from the digest unique - difficult to find two different sources that map to the same digest (collision resistance) Also know as: fingerprint Examples: MD5 (128 bits), SHA-1 (160 bits)
12
Cryptographic Security CS 5204 – Operating Systems12 (Large) Document Integrity Note that small differences in the input result in very different digests
13
Cryptographic Security CS 5204 – Operating Systems13 Guaranteeing Integrity hash process file digest decrypt with sender’s public key file digital envelope digest compare
14
Cryptographic Security CS 5204 – Operating Systems14 Digital Signatures (Public Key) Requirements: cannot be forged and unique receiver: knows that a message came from the sender (authenticity) sender: cannot deny authorship( non-repudiation) message integrity sender & receiver: message contents preserved (integrity) (e.g., cannot cutandpaste a signature into a message) Public Key System: sender, Alice: (E Alice : public, D Alice : private) receiver, Bob: (E Bob : public, D Bob : private) sender(Alice) C= E Bob (D Alice (M)) > receiver(Bob) receiver(Bob) M = E Alice (D Bob (C)) > M
15
Cryptographic Security Digital Signature using RSA Method Digital Signing Bob does the following:- i) Creates a message digest of the information to be sent. ii) Represents this digest as an integer m between 0 and n-1. iii) Uses her private key (d, n) to compute the signature s = m^d mod n. iv) Sends this signature s to Bob. Signature verification:- Alice does the following:- i) Uses Bob’s public key (e, n) to compute integer v = s^e mod n. ii) Extracts the message digest from this integer. iii) Independently computes the message digest of the information that has been signed. iv) If both message digests are identical, the signature is valid.
16
Cryptographic Security Secure Communication (Public Key) Handshaking B A E PKA (I A, I B ) E PKB, (I A, A) E PKB (I B ) IA, IB are “nonces” nonces can be included in each subsequent message PKB: public key of B; PKA: public key of A;
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.