applied cryptography
play

APPLIED CRYPTOGRAPHY: FROM ALGORITHMS TO LIBRARIES @ABSTRACTJ - PowerPoint PPT Presentation

APPLIED CRYPTOGRAPHY: FROM ALGORITHMS TO LIBRARIES @ABSTRACTJ GOAL OF THIS PRESENTATION ALGORITHMS An algorithm must be seen to be believed. Donald E. Knuth THIS TALK IS NOT ABOUT ALGORITHMS, ONLY SECURITY the state of being


  1. APPLIED CRYPTOGRAPHY: FROM ALGORITHMS TO LIBRARIES

  2. @ABSTRACTJ

  3. GOAL OF THIS PRESENTATION

  4. ALGORITHMS

  5. “ An algorithm must be seen to be believed. ― Donald E. Knuth

  6. THIS TALK IS NOT ABOUT ALGORITHMS, ONLY

  7. SECURITY “ the state of being free from danger or threat

  8. FEELING VS REALITY

  9. “ Cryptography is the art and science of encryption ― Cryptography Engineering

  10. “ The study of codes, or the art of writing and solving them. ― Oxford dictionaries

  11. HISTORICALLY FOCUSED ON SECRET COMMUNICATIONS

  12. VIGENÈRE CIPHER ~ 1553, Rome

  13. ENIGMA (1920)

  14. DES (1974) Key size 2 ⁵⁶ , block size 64 bits Short key sizes can be subject of brute force Should be avoided Broken in 22 hours

  15. DES (1974)

  16. LIMITED PROCESSING POWER

  17. TODAY

  18. TODAY

  19. TODAY

  20. BROADER SCOPE File integrity Random IDs API authentication Password storage JWTs Software updates Bank transactions

  21. ALGORITHMS Hashes Block ciphers Stream ciphers Digital signatures Message authentication codes Private key encryption Public key encryption

  22. CRYPTO WON'T SOLVE ALL OF YOUR PROBLEMS

  23. IT'S COMPLETELY TRICKY

  24. MOST PART OF THE TIME IS LIKE

  25. Source: Veracode

  26. Source: Stackover fl ow

  27. DON'T ROLL YOUR OWN CRYPTO

  28. “ A cryptosystem should be secure even if everything about the system, except the key, is public knowledge ― Kerckhoffs's principle

  29. HOW CRYPTO IS DONE TODAY?

  30. LIBRARIES Java Node.js & Web Ruby javax.crypto OpenSSL WebCrypto BouncyCastle libsodium sjcl Keyczar crypto-js Jasypt

  31. LET'S GET OUR HANDS DIRTY

  32. THE BADLY DESIGNED APP

  33. Hmmm, I wish I had an app to share my notes ALICE

  34. Why not? Count me in BOB

  35. I like it! EVE

  36. #1 STORY AS A USER OF THIS APP, ALICE WANTS TO CREATE AND SHARE NEW NOTES

  37. Barbecue tomorrow? Yes, please!

  38. Barbecue tomorrow 12 pm? Yes! Barbecue on Monday 9 am?

  39. #2 STORY AS A USER OF THIS APP, BOB WANTS TO VERIFY THE INTEGRITY OF ALICE'S FILES

  40. CWE-327 USE OF A BROKEN OR RISKY CRYPTOGRAPHIC ALGORITHM

  41. MD5 white.jpg e06723d4961a0a3f950e7786f3 766338 brown.jpg e06723d4961a0a3f950e7786f3 766338

  42. SHA-224 SHA-256 SHA-384 SHA-512 ARE ALL GOOD CHOICES

  43. BUT WHAT ABOUT INCLUDING A SALT?

  44. CWE-916 PASSWORD HASH WITH INSUFFICIENT COMPUTATIONAL EFFORT

  45. #3 STORY AS A PARANOID, I WOULD LIKE NOT ONLY INTEGRITY, BUT ALSO AUTHENTICITY

  46. #4 STORY AS A USER OF THIS APP, I WANT TO ADD INTEGRITY, AUTHENTICITY, SECRECY AND PROTECT MY DATA

  47. Alice Bob

  48. MODES OF OPERATION

  49. ECB IS NOT SECURE Text Text Text Text Source: Wikipedia

  50. CBC Source: Wikipedia

  51. CTR Source: Wikipedia

  52. #5 STORY AS A USER I WANT TO HAVE PASSWORD PROTECTED ENTRIES

  53. #6 STORY AS SOMEONE VERY SOCIAL, I WANT TO SHARE MY ENTRIES WITH A FRIEND WITHOUT EXPOSING MY KEYS

  54. sK pK sK pK Bob Alice

  55. “ Privacy is an inherent human right, and a requirement for maintaining the human condition with dignity and respect. It is about choice, and having the power to control how you present yourself to the world. Bruce Schneier

  56. THANK YOU! http://abstractj.org https://keycloak.org https://github.com/abstractj/krypto-playground

Recommend


More recommend