carnage
June 11, 2016
130

# 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

June 11, 2016

## Transcript

1

27. ### Modern cryptography • Confidentiality • Key exchange • Identity •

Authentication 19
28. ### Modern cryptography • Confidentiality • Key exchange • Identity •

Authentication • Random number generation 20

35. ### Stream cipher weaknesses • Keys must not be reused •

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

Easy for an attacker to modify a message • Hard to partially decrypt messages 25

39. ### AES: 1 round • Substitute Bytes • Shift Rows •

Mix Columns • Add Round Key 26

GIMP 32

58. ### RSA • (me)d ≡ m (mod n) • c ≡

me (mod n) 37
59. ### RSA • (me)d ≡ m (mod n) • c ≡

me (mod n) • cd ≡ (me)d ≡ m (mod n) 38

61. ### RSA: Message signatures • (md)e ≡ m (mod n) •

s ≡ md (mod n) • se ≡ (md)e ≡ m (mod n) 39

65. ### Implementing Cryptography • Don’t • Use existing implementations • Bring

in an expert 42

43
68. ### Implementing Cryptography in PHP • Halite + libsodium • https://github.com/paragonie/halite

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

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

http://simonsingh.net/The_Black_Chamber • Bruce Schneier • https://www.schneier.com 46
71. ### 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

73. ### Cipher Challenge • The cipher challenge is now closed, but

if you want to have a go anyway, the main text is now here • http://tiny.cc/0qq6by • @phpyorkshire 49