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

The secrets of cryptography

The secrets of cryptography

Alice and Bob have secrets they want to talk about without Eve being able to listen in. Worse yet, the mischievous Mallory delights in changing messages sent between parties. In such a hostile environment how can Alice talk to Bob without their messages being overheard and how can she be sure that it was Bob that sent the message in the first place?

This talk will take a brief look at historic codes and ciphers before taking a look at modern day Cryptography. If you want to be able to know the difference between a block cipher and a stream cipher or get a glimpse into the mathematics behind public key Cryptography this talk is for you.

Cipher challenge here: http://tiny.cc/0qq6by

carnage

June 24, 2016
Tweet

More Decks by carnage

Other Decks in Programming

Transcript

  1. Modern cryptography • Confidentiality • Key exchange • Identity •

    Authentication • Random number generation 20
  2. Stream cipher weaknesses • Keys must not be reused •

    Easy for an attacker to modify a message 24
  3. Stream cipher weaknesses • Keys must not be reused •

    Easy for an attacker to modify a message • Hard to partially decrypt messages 25
  4. AES: 1 round • Substitute Bytes • Shift Rows •

    Mix Columns • Add Round Key 26
  5. RSA • (me)d ≡ m (mod n) • c ≡

    me (mod n) • cd ≡ (me)d ≡ m (mod n) 38
  6. RSA: Message signatures • (md)e ≡ m (mod n) •

    s ≡ md (mod n) • se ≡ (md)e ≡ m (mod n) 39
  7. Implementing Cryptography in PHP • Halite + libsodium • https://github.com/paragonie/halite

    • Defuse PHP encryption • https://github.com/defuse/php-encryption 44
  8. Further reading • Simon Singh - The code book •

    http://simonsingh.net/The_Black_Chamber 45
  9. Further reading • Simon Singh - The code book •

    http://simonsingh.net/The_Black_Chamber • Bruce Schneier • https://www.schneier.com 46
  10. Further reading • Simon Singh - The code book •

    http://simonsingh.net/The_Black_Chamber • Bruce Schneier • https://www.schneier.com • https://github.com/gilfether/phpcrypt 47