Download presentation
Presentation is loading. Please wait.
1
Asymmetric Cryptography
CS 5323 Asymmetric Cryptography Prof. Ravi Sandhu Executive Director and Endowed Chair Lecture 8 © Ravi Sandhu World-Leading Research with Real-World Impact!
2
Asymmetric Encryption
© Ravi Sandhu World-Leading Research with Real-World Impact!
3
Public-Key Encryption
INSECURE CHANNEL Plain- text Plain- text Ciphertext Encryption Algorithm E Decryption Algorithm D A B B's Public Key B's Private Key SECURE CHANNEL Confidentiality Integrity © Ravi Sandhu World-Leading Research with Real-World Impact! 3
4
Secret-Key Encryption
INSECURE CHANNEL Plain- text Plain- text Ciphertext Encryption Algorithm E Decryption Algorithm D A B Secret Key shared by A and B K K SECURE CHANNEL Confidentiality Integrity © Ravi Sandhu World-Leading Research with Real-World Impact! 4
5
Public-Key Encryption
reduces the key distribution problem to a secure channel for authentic communication of public keys requires authentic dissemination of 1 public key/party scales well for large-scale systems with N parties we need to generate and distribute N public keys © Ravi Sandhu World-Leading Research with Real-World Impact! 5
6
Known Public-Key Attack
confidentiality based on infeasibility of computing B's private key from B's public key key sizes are large (2048 bits and above) to make this computation infeasible © Ravi Sandhu World-Leading Research with Real-World Impact! 6
7
Speed public key runs 1000 times slower than secret key
think 2g versus 4g on smartphone This large difference in speed is likely to remain Maybe reduce to 100 times Use public keys to distribute secret keys, use secret keys to protect data © Ravi Sandhu World-Leading Research with Real-World Impact! 7
8
RSA Cryptosystem public key is (n,e) private key is d
encrypt: C = Me mod n decrypt: M = Cd mod n © Ravi Sandhu World-Leading Research with Real-World Impact! 8
9
This naïve use of RSA is not secure but will suffice for our purposes
RSA Cryptosystem public key is (n,e) private key is d encrypt: C = Me mod n decrypt: M = Cd mod n This naïve use of RSA is not secure but will suffice for our purposes © Ravi Sandhu World-Leading Research with Real-World Impact! 9
10
RSA Key Generation choose 2 large prime numbers p and q
compute n = p * q pick e relatively prime to (p-1)*(q-1) compute d, e*d = 1 mod (p-1)*(q-1) publish (n,e) keep d private (and discard p, q) © Ravi Sandhu World-Leading Research with Real-World Impact! 10
11
RSA Key Protection compute d, e*d = 1 mod (p-1)*(q-1)
if factorization of n into p*q is known, this is easy to do security of RSA is no better than the difficulty of factoring n into p, q © Ravi Sandhu World-Leading Research with Real-World Impact! 11
12
Asymmetric Digital Signatures
© Ravi Sandhu World-Leading Research with Real-World Impact!
13
Public-Key Digital Signature
INSECURE CHANNEL Plain- text Plaintext + Signature Yes/No Signature Algorithm S Verification Algorithm V A B A's Private Key A's Public Key SECURE CHANNEL Confidentiality Integrity © Ravi Sandhu World-Leading Research with Real-World Impact! 13
14
Compare Public-Key Encryption
INSECURE CHANNEL Plain- text Plain- text Ciphertext Encryption Algorithm E Decryption Algorithm D A B B's Public Key B's Private Key SECURE CHANNEL Confidentiality Integrity © Ravi Sandhu World-Leading Research with Real-World Impact! 14
15
Compare Symmetric Key MAC
INSECURE CHANNEL Plaintext + MAC Plain- text Yes/No MAC Algorithm M Verification Algorithm V A B K K © Ravi Sandhu World-Leading Research with Real-World Impact! 15
16
Digital Signatures in RSA
RSA has a unique property, not shared by other public key systems Encryption and decryption commute (Me mod n)d mod n = M encryption (Md mod n)e mod n = M signature Same public key can be use for encryption and signature But not recommended © Ravi Sandhu World-Leading Research with Real-World Impact! 16
17
Message Digest World-Leading Research with Real-World Impact!
© Ravi Sandhu World-Leading Research with Real-World Impact!
18
Encryption Speed Revisited
public key runs 1000 times slower than secret key think 2g versus 4g on smartphone This large difference in speed is likely to remain Maybe reduce to 100 times Use public keys to distribute secret keys, use secret keys to protect data © Ravi Sandhu World-Leading Research with Real-World Impact! 18
19
Digital Signature Speed
public key runs 1000 times slower than secret key think 2g versus 4g on smartphone This large difference in speed is likely to remain Maybe reduce to 100 times Sign the message digest (or hash) not the message © Ravi Sandhu World-Leading Research with Real-World Impact! 19
20
no practical limit to size message digest algorithm
Message Digest (Hash) M=H-1(m) original message no practical limit to size M message digest algorithm H message digest 256 bit m easy hard m=H(M) © Ravi Sandhu World-Leading Research with Real-World Impact! 20
21
Desired Characteristics
weak hash function difficult to find M' such that H(M')=H(M) given M, m=H(M) try messages at random to find M’ with H(M’)=m 2k trials on average, k=128 to be safe © Ravi Sandhu World-Leading Research with Real-World Impact! 21
22
Desired Characteristics
strong hash function difficult to find any two M and M' such that H(M')=H(M) try pairs of messages at random to find M and M’ such that H(M’)=H(M) 2k/2 trials on average, k=256 to be safe Birthday paradox © Ravi Sandhu World-Leading Research with Real-World Impact! 22
23
Message Authentication Code
Symmetric Encryption Based CBC-MAC MAC has same size as block size of underlying cryptosystem CCM mode Provides confidentiality and integrity Message-Digest Based HMAC Hash the message and a secret key MAC has same size as underlying hash function or can truncate Revisiting after discussing message digests © Ravi Sandhu World-Leading Research with Real-World Impact! 23
24
Asymmetric Key Exchange
© Ravi Sandhu World-Leading Research with Real-World Impact!
25
Diffie-Hellman Key Agreement
yA=axA mod p public key yB=axB mod p public key A B private key xA private key xB k = yBxA mod p = yAxB mod p = axA*xB mod p system constants: p: prime number, a: integer © Ravi Sandhu World-Leading Research with Real-World Impact! 25
26
Diffie-Hellman Key Agreement
security depends on difficulty of computing x given y=ax mod p called the discrete logarithm problem © Ravi Sandhu World-Leading Research with Real-World Impact! 26
27
Public keys need to be authenticated
Diffie-Hellman Man-in-the-Middle Attack A B C Public keys need to be authenticated © Ravi Sandhu World-Leading Research with Real-World Impact! 27
28
Public-Key Certificates
© Ravi Sandhu World-Leading Research with Real-World Impact!
29
Public-Key Certificates
authenticated distribution of public-keys public-key encryption sender needs public key of receiver public-key digital signatures receiver needs public key of sender public-key key agreement both need each other’s public keys © Ravi Sandhu World-Leading Research with Real-World Impact! 29
30
ISSUER (Certificate Authority) SUBJECT PUBLIC KEY INFO
X.509v1 Certificate VERSION SERIAL NUMBER SIGNATURE ALGORITHM ISSUER (Certificate Authority) VALIDITY SUBJECT SUBJECT PUBLIC KEY INFO SIGNATURE © Ravi Sandhu World-Leading Research with Real-World Impact! 30
31
X.509v1 Certificate 1 1234567891011121314 RSA+SHA-3, 2048
C=US, S=TX, O=UTSA, OU=CS 1/1/17-12/31/18 C=US, S=TX, O=UTSA, OU=CS, CN=Ravi Sandhu RSA, 2048, xxxxxxxxxxxxxxxxxxxxxxxxx SIGNATURE © Ravi Sandhu World-Leading Research with Real-World Impact! 31
32
Certificate Trust how to acquire public key of the issuer to verify signature whether or not to trust certificates signed by the issuer for this subject prefix rule is not universally applicable © Ravi Sandhu World-Leading Research with Real-World Impact! 32
33
X.509v1 Certificate 1 1234567891011121314 RSA+SHA-3, 2048
C=US, S=VA, O=GMU, OU=ISE 1/1/17-12/31/18 C=US, S=TX, O=UTSA, OU=CS, CN=Ravi Sandhu RSA, 2048, xxxxxxxxxxxxxxxxxxxxxxxxx SIGNATURE © Ravi Sandhu World-Leading Research with Real-World Impact! 33
34
SET CA Hierarchy Root Brand Brand Brand Geo-Political Bank Acquirer
Customer Merchant © Ravi Sandhu World-Leading Research with Real-World Impact! 34
35
Certificate Revocation Lists (CRLs)
SIGNATURE ALGORITHM ISSUER LAST UPDATE NEXT UPDATE REVOKED CERTIFICATES SIGNATURE SERIAL NUMBER REVOCATION DATE © Ravi Sandhu World-Leading Research with Real-World Impact! 35
36
X.509 Certificates X.509v1 X.509v2 X.509v3 very basic
adds unique identifiers to prevent against reuse of X.500 names X.509v3 adds many extensions can be further extended © Ravi Sandhu World-Leading Research with Real-World Impact! 36
37
X.509v3 Innovations distinguish various certificates
signature, encryption, key-agreement identification info in addition to X.500 name internet names: addresses, host names, URLs issuer can state policy and usage ok for casual but not for signing checks extensible proprietary extensions can be defined and registered attribute certificates to enable attribute-based authorization © Ravi Sandhu World-Leading Research with Real-World Impact! 37
38
X.509v2 CRL Innovations CRL distribution points indirect CRLs
delta CRLs revocation reason push CRLs © Ravi Sandhu World-Leading Research with Real-World Impact! 38
39
General Hierarchical Structure
Z X Y Q R S T A C E G I K M O a b c d e f g h i j k l m n o p © Ravi Sandhu World-Leading Research with Real-World Impact!
40
General Hierarchical Structure with Added Links
Z X Y Q R S T A C E G I K M O a b c d e f g h i j k l m n o p © Ravi Sandhu World-Leading Research with Real-World Impact!
41
Top-Down Hierarchical Structure
Z X Y Q R S T A C E G I K M O a b c d e f g h i j k l m n o p © Ravi Sandhu World-Leading Research with Real-World Impact!
42
Forest of Hierarchies World-Leading Research with Real-World Impact!
© Ravi Sandhu World-Leading Research with Real-World Impact!
43
Multiple Root CA’s Plus Intermediate CA’s
X S T Q R A C E G I K M O a b c d e f g h i j k l m n o p Model on the web today © Ravi Sandhu World-Leading Research with Real-World Impact!
44
Certificate Triangle Revisit from L5 on ABAC User (Identity)
Attributes Public-keys + Secured secrets Revisit from L5 on ABAC © Ravi Sandhu World-Leading Research with Real-World Impact!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.