Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Practical Cryptography : Password Hashing

Practical Cryptography : Password Hashing

Jérémy Courtial

June 16, 2015
Tweet

More Decks by Jérémy Courtial

Other Decks in Programming

Transcript

  1. Easy to compute Can’t be reverted Generate a unique hash

    for a given message Cryptographic Hash Function
  2. Should be random Should be unique Should be long enough

    (at least 16 bytes) Salt 2 1 3 Is not secret 4
  3. GPU & FPGA are the new enemies Moore’s Law is

    your Nemesis Multi-billions SHA1/s on a single machine Cracking
  4. With only 20k $ MD5 SHA1 NTLM Hash/s 150 billions

    49 billions 311 billions Crack 8 char. passwords 12h < 48h 6h https://gist.github.com/epixoip/63c2ad11baf7bbd57544
  5. Designed to be slow & hard to parallelised Slow as

    you want Also used for key stretching Key Derivation Function
  6. Password hashing function in OpenBSD More resilient to GPU Less

    configurable : fixed output length, max input length bcrypt
  7. Demo by LastPass « We are confident that our encryption

    measures are sufficient to protect the vast majority of users. LastPass strengthens the authentication hash with a random salt and 100,000 rounds of server-side PBKDF2-SHA256… » 6/15/2015 - LastPass about compromised servers
  8. On the 20k $ beast PBKDF2 with 10k iterations Hash/s

    < 10 000 Crack 8 char. passwords > 2 000 years
  9. Want other than C impl. ? Good luck… Frameworks API

    are usually terrible Find some dedicated project Impl.
  10. Remembers rules #1 & #3 Be sure to understand it

    before using it Find the best crypto tool for your needs Conclusion
  11. Bibliography Thomas Pornin on security.stackechange.com Colin Percival (scrypt author) blog

    Salted Password Hashing - Doing it Right http://crypto.stackexchange.com OWASP - Cryptographic Storage Cheat Sheet Cryptography Engineering by N. Ferguson & B. Schneier