Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Prochain SlideShare
Chargement dans…5
×

# SIGNAL - Practical Cryptography

108 vues

Publié le

Introduction to Public Key Cryptography

Publié dans : Ingénierie
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Soyez le premier à commenter

• Soyez le premier à aimer ceci

### SIGNAL - Practical Cryptography

1. 1. PRACTICAL CRYPTOGRAPHY An Introduction to Public Key Cryptography @KelleyRobinson TWILIOUSER&DEVELOPERCONFERENCE
3. 3. 🔒 Practical Cryptography 🔐 Introduction to Public Key Cryptography
4. 4. @kelleyrobinson ☎ 🔐👋 %
5. 5. @kelleyrobinson Meet Alice and Bob 🔐 🔐 💬🤷
6. 6. @kelleyrobinson
7. 7. What is Public Key Crypto? Each entity has ( keys Public Key - to be shared Private Key - to be kept secret (AKA Asymmetric Crypto)
8. 8. @kelleyrobinson
9. 9. RSA algorithm (there are other algorithms, we'll get to that)
10. 10. What is Public Key Crypto? Two major use cases (for RSA): 1. Encrypting with Public Key 2. Sign with Private Key
11. 11. @kelleyrobinson Encrypting with Public Key ...only Bob can decode the cyphertext
12. 12. @kelleyrobinson Signing with Private Key ...only Alice can be the author
13. 13. @kelleyrobinson How are keys generated? TL;DR: math
14. 14. How are keys generated? @kelleyrobinson
15. 15. @kelleyrobinson Trapdoor Functions
16. 16. @kelleyrobinson Trapdoor Functions Which is easier? 1. Find the two prime factors of 4,757 2. Multiply 67 and 71
17. 17. RSA Algorithm Example# Chosen inputs p, q, e = 67, 71, 37 https://github.com/robinske/rsa-example # Calculated n = p*q x = (p - 1)*(q - 1) d = inverse_mod(e, x) # modular multiplicative inverse public_key = (e, n) private_key = (d, n) message = 123 encrypted = pow(message, e, n) decrypted = pow(encrypted, d, n) # == message 🤯 These are all trapdoor functions!
18. 18. Other Common Algorithms
19. 19. Diffie-Hellman Key Exchange @kelleyrobinson
20. 20. Elliptic-Curve Cryptography (ECC) y2 = x3 + ax + b Elliptic Curve Addition (Image By SuperManu [GFDL or CC BY-SA 3.0], via Wikimedia Commons)
21. 21. @kelleyrobinson What is Key Size? https://xkcd.com/538/
22. 22. Impacts security strength, measured in bits of security What is Key Size? RSA key size of 2048 RSA key size of 3072 ECC key size of 256 112 bits of security 128 bits of security 128 bits of security
23. 23. @kelleyrobinson What is Security Strength? - NIST Recommendation for Key Management “a number associated with the amount of work that is required to break a cryptographic algorithm or system. ”
24. 24. @kelleyrobinson PKC in Python # pip install cryptography from cryptography.hazmat.primitives.asymmetric import rsa private_key = rsa.generate_private_key( public_exponent=65537, key_size=2048, ... )
25. 25. @kelleyrobinson PKC in Python https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa/
26. 26. Everyday Uses of Public Key Cryptography Authy! PGP and GPG TLS (HTTPS) Bitcoin SSH
27. 27. @kelleyrobinson ]
28. 28. @kelleyrobinson ] @kelleyrobinson Public key on the Authy servers
29. 29. @kelleyrobinson ] @kelleyrobinson Private key on your device
30. 30. @kelleyrobinson ] @kelleyrobinson Your device signs with your private key
31. 31. Steps to Send a Request
32. 32. @kelleyrobinson
33. 33. @kelleyrobinson Algorithm
34. 34. @kelleyrobinson Key SizeAlgorithm
35. 35. @kelleyrobinson
36. 36. @kelleyrobinson
37. 37. https://xkcd.com/1181/
38. 38. @kelleyrobinson __________________ | | Don't roll your own crypto! |__________________| (__/) || (•ㅅ•) || / 　 づ @kelleyrobinson
39. 39. @kelleyrobinson twilio.com/blog/what-is-public-key-cryptography Further Reading
40. 40. @kelleyrobinson astonishinglegends.com Further Listening
41. 41. THANK YOU! TWILIOUSER&DEVELOPERCONFERENCE KELLEY ROBINSON KROBINSON@TWILIO.COM @KELLEYROBINSON