Upload
nicholas-thornton
View
218
Download
1
Tags:
Embed Size (px)
Citation preview
Asymmetric Cryptography
• Symmetric cryptography:Key for encoding same as key for decoding– Shift three letters
• Asymmetric cryptography:Key for encoding different than for decoding
Simple Example
• Encryption Key : – Multiply by 6, clock size 11– Encode 5 = 5 * 6 clock 11 = 30 clock 11 = 8
Picking Keys
• Pick clock size C– Prime clock sizes work best
• Find x and y such that x * y clock C = 1
Private Key
• Any message encrypted with a private key MUST have been written by the person who signed it
• Anyone can decryptthe message– Encryption for
authenticationnot secrecy
Authenticating a Key
• Browsers come with public keys of known banks called Certification Authorities
2 Part Message
• Send two things:– Message encrypted with private key– Public key encrypted by trusted authority
Encrypting With Public Key
• Anyone can use public key to secretly send message to holder of private key
Locked with Private KeyAuthentication
Locked with Public KeySecrecy
Web Security
• HTTPS : Secure web connection– Browser asks server for public key– Browser picks shared secret,
encrypts with public key, sendsto server
RSA
• Multiplication keys too easy to break… …use exponents
• RSA (Rivest, Shamir, Adelman) invented algorithm in 1977
RSA Math
• Private key : raise to x power, clock size C• Public key : raise to y power, clock size C
Message: 443 clock 22 =64 clock 22 = 20Encrypted: 20207 clock 22 = 4
Picking Keys
• Start with two prime numbers p, q – multiply to make clock size
• Pick private key, calculate public key from private, p and q using multiplication trick
Picking Keys
• Start with two prime numbers p, q – multiply to make clock size
• Pick private key, calculate public key from private, p and q using multiplication trick
• If anyone figures out p and q they can figure out your private key
Factoring
• Factoring large numbers is hard– But we are getting faster
• Larger keys : 2048 bits (prime numbers with 100's of digits)
Factoring
• Factoring large numbers is hard– But we are getting faster
• Larger keys : 2048 bits (prime numbers with 100's of digits)
• May need to move to different kinds of math:http://arstechnica.com/security/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/2/