learning practical cryptography - wordpress.com...2018/02/01 · grade school crypto ciphers hide...
TRANSCRIPT
![Page 1: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/1.jpg)
Learning Practical Cryptography
Cryptosmith Video Series #1
Rick Smith December, 2016
![Page 2: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/2.jpg)
Fiction, not Fact.Reality was worse
“Get Smart”© NBC Television
![Page 3: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/3.jpg)
Genuine 1960s phone security,
not including the radio,or the power.
Installed in trucks, ships.
![Page 4: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/4.jpg)
The cell phone: asmall, practical
device
![Page 5: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/5.jpg)
Modern Mobile Crypto Apps✤ Strong crypto, easy to install✤ But do they really protect your data?
??
??
???
?? ?
![Page 6: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/6.jpg)
A crypto failure on the web.But what does it mean?
Do we need to fix it?
![Page 7: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/7.jpg)
from “IOS Security” April 2016© Apple, Inc.
Learn the words and conceptsand it makes sense
![Page 8: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/8.jpg)
From the Cryptography 1 course offered on Courseraby Dan Boneh, Stanford University
![Page 9: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/9.jpg)
Makekey pair
b4cd11bcf084c19d112879d0
Shared Secret
b4cd11bcf084c19d112879d0
Shared Secret
![Page 10: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/10.jpg)
![Page 11: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/11.jpg)
![Page 12: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/12.jpg)
![Page 13: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/13.jpg)
From Authentication © 2002. Used by permission
Video = automated diagrams
![Page 14: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/14.jpg)
![Page 15: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/15.jpg)
Start/Stop the Video
} Like, Save, Sharing, etc.
Full Screen 1080p
Controls
} Notes on how to watch this video
![Page 16: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/16.jpg)
} Link to the next video, or to
related videos
Video Notes: a link to additional notes about
the video’s contents
![Page 17: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/17.jpg)
![Page 18: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/18.jpg)
Grade School Crypto
Ciphers hide the
meaning of text
Zfmebop efab qeb jbxkfkd lc
qbuq
encryption, decryption, ciphers, keys, algorithms, code cracking, cryptanalysis, letter frequency analysis
![Page 19: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/19.jpg)
Eavesdropping on a Mobile Purchase
Cryptosmith Video Series #2
Rick Smith, December, 2016
![Page 20: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/20.jpg)
Buying a Coffee Pot
![Page 21: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/21.jpg)
Buying a Coffee Pot
![Page 22: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/22.jpg)
DANGERZONE
![Page 23: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/23.jpg)
![Page 24: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/24.jpg)
Safe Zone
Safe Zone
![Page 25: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/25.jpg)
Protecting Private Data:Encrypt itKeep it in a safe zone
![Page 26: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/26.jpg)
AES
b4cd11bcf084c19d112879d0
The Key
b4cd11bcf084c19d112879d0
The Key
The datato encrypt
AES
The decrypted
data
Encrypt
Decrypt
![Page 27: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/27.jpg)
b4cd11bcf084c19d112879d0
The Key
b4cd11bcf084c19d112879d0
The Key
![Page 28: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/28.jpg)
Secret Sharing with Public Key Crypto
Cryptosmith Video Series #3
Rick Smith, April, 2017
![Page 29: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/29.jpg)
b4cd11bcf084c19d112879d0
Secret Key
The datato encrypt
The decrypted
dataCipher
b4cd11bcf084c19d112879d0
Secret Key
To protect our sensitive data…
… we must protect the secret key
Cipher
Encrypt
Decrypt
![Page 30: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/30.jpg)
How do we share the secret key?
The key is easy to intercept
b4cd11bcf084c19d112879d0
Secret Key
b4cd11bcf084c19d112879d0
Secret Key
b4cd11bcf084c19d112879d0
Secret Key
![Page 31: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/31.jpg)
The Phone’s Special InfoThe Server’s Special Info
Share a Secret Keywithout earlier preparations
b4cd11bcf084c19d112879d0
Secret Key
b4cd11bcf084c19d112879d0
Secret Key
Eavesdropping does not leak the shared secret
?
![Page 32: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/32.jpg)
Special Info = Public Key
✤ A public key hides a private key inside
Generatea public-private
key pairRandom input
Public Key
Private Key
![Page 33: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/33.jpg)
Special Info = Public Key
✤ A public key hides a private key inside✤ We can share the public key in public✤ A public key hides a private key inside
Public Key
![Page 34: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/34.jpg)
✤ A public key hides a private key inside✤ We can share the public key in public✤ The private key must remain secret
Special Info = Public Key
✤ A public key hides a private key inside✤ We can share the public key in public
Public Key
Private Key
![Page 35: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/35.jpg)
The Phone’s Special InfoThe Server’s Special Info
The Server’s Public Key
The Phone’s Public Key
b4cd11bcf084c19d112879d0
Secret Key
Use the phone’s private keyand the server’s public keyto create their shared secret key
For the Phone:
Building the Shared Secret
![Page 36: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/36.jpg)
Building the Shared Secret
The Server’s Public Key
The Phone’s Public Key
Use the server’s private keyand the phone’s public keyto create their shared secret key
b4cd11bcf084c19d112879d0
Secret Key
For the Server:
b4cd11bcf084c19d112879d0
Secret Key
Private Key Private Key
![Page 37: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/37.jpg)
Building the Shared SecretChoose a library function:✤ Elliptic Curve ✤ Diffie-Hellman
Secret Sharing
b4cd11bcf084c19d112879d0
Shared Secret
Private Key
Public Key
![Page 38: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/38.jpg)
b4cd11bcf084c19d112879d0
Secret Key
b4cd11bcf084c19d112879d0
Secret Key
A reliable, secure data link requires
✤ Public key exchange toconstruct a shared secret
✤ A strong cipher whose keysare known to both devices
Encrypt
Decrypt
Transport LayerSecurity (TLS - SSL)
![Page 39: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/39.jpg)
Transport Layer Security (TLS - SSL)
Cryptosmith Video Series #4
Rick Smith, March, 2017
![Page 40: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/40.jpg)
![Page 41: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/41.jpg)
What’s in a name?
TLSTransport Layer Security
SSLSecure Sockets Layer
TLSTransport Layer Security
SSLSecure Sockets Layer
![Page 42: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/42.jpg)
protocol:
got it!
1. set of rules that explain correct conduct and proceduresfor 2 or more parties
2. set of rules for handling andformatting computer data
![Page 43: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/43.jpg)
TLS evolved from the SSL Protocol✤ Introduced in 1994✤ https://
![Page 44: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/44.jpg)
The TLS Protocolfor safe communication between 2 devices
1. Create a secret-sharing public key pair
2. Use public-key crypto to establish a shared secret
3. Use the shared secret to establisha secure link using a secret-key cipher.
4. Use the secure link to exchange encrypted messages.
4 Steps
b4cd11bcf084c19d112879d0
Shared Secret
b4cd11bcf084c19d112879d0
Shared Secret
![Page 45: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/45.jpg)
Step 1: Create a key pair
Makekey pair Phone creates a new pair when
it opens a new connection
![Page 46: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/46.jpg)
Step 2: Establish a shared secret
Makekey pair
1. Phone sends public key and asks for a TLS connection
2. Server creates a key pair3. Server sends its public key4. Devices compute the shared secret
b4cd11bcf084c19d112879d0
Shared Secret
b4cd11bcf084c19d112879d0
Shared Secret
![Page 47: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/47.jpg)
Step 3: Establish encrypted link
Hash
b4cd11bcf084c19d112879d0
Shared Secret
b4cd11bcf084c19d112879d0
Shared Secret
Hash
812d0b4ccd1f019d4c181b79
Phone Key
812d0b4ccd1f019d4c181b79
Phone Key
12d0bf4c5c1b819d61c4c179
Server Key
12d0bf4c5c1b819d61c4c179
Server Key
1. Devices create crypto keysusing a “hash” function
✤ Separate keys for separate roles
![Page 48: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/48.jpg)
Step 3: Establish encrypted link
Encrypt
Decrypt
hello?hello?
812d0b4ccd1f019d4c181b79
Phone Key
1. Devices create crypto keysusing a “hash” function
✤ Separate keys for separate roles2. Phone sends message to test
the encrypted link
812d0b4ccd1f019d4c181b79
Phone Key
1. Devices create crypto keysusing a “hash” function
✤ Separate keys for separate roles
![Page 49: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/49.jpg)
Step 3: Establish encrypted link
okay!
1. Devices create crypto keysusing a “hash” function
✤ Separate keys for separate roles2. Phone sends message to test
the encrypted link3. Server sends reply to confirm
the test message arrived
12d0bf4c5c1b819d61c4c179
Server Key
12d0bf4c5c1b819d61c4c179
Server Key
1. Devices create crypto keysusing a “hash” function
✤ Separate keys for separate roles2. Phone sends message to test
the encrypted link
okay!
Cipher
Cipher
Decrypt
Encrypt
![Page 50: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/50.jpg)
Step 4: Exchange messages safely
Cipher
Cipher
![Page 51: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/51.jpg)
b4cd11bcf084c19d112879d0
The Key
Decrypt
PAY $2K TO BOB
Encrypt
b4cd11bcf084c19d112879d0
The Key
PAY $6K TO ROB
NFF %8C UIF BSL
NFF %7G UIF CSL
Message IntegrityThe text must not be altered
How do we detect an altered message?
Hash functions!
![Page 52: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/52.jpg)
Protecting Message Integrity
Cryptosmith Video Series #5
Rick Smith, January, 2017
![Page 53: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/53.jpg)
b4cd11bcf084c19d112879d0
The Key
Decrypt
PAY $2K TO BOB
Encrypt
b4cd11bcf084c19d112879d0
The Key
PAY $6K TO ROB
NFF %8G UIF BSL
NFF %7G UIF CSL
Message IntegrityHow do we detect altered text?
![Page 54: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/54.jpg)
We add extra data to detect changes.
NFF %8G UIF BSL K(check value)
Use the numeric values of the data in the message to calculate a check value.
![Page 55: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/55.jpg)
Sending: N+F+F+%+8+G+U+I+F+B+S+L = K
Received: N+F+F+%+7+G+U+I+F+C+S+L = W
NFF %8G UIF BSL K(check value)
NFF %7G UIF CSL K(check value)
Recalculate the check value for the received message.Damage yields a different check value.
![Page 56: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/56.jpg)
One Way Hash functions
✤ More than a simple check digit calculation✤ Input: 1 or more bytes, and can take a huge input✤ Output: a fixed size (example: 128 bits for “SHA 128”)
A GOOD GLASS IN THE BISHOP'S HOSTEL IN THE … … FROM THE TREE THROUGH THE SHOT FIFTY FEET OUT
43 84 9f 75 61 4a 49 8b 00 d5 28 a4 59 fc 9d de
Hash
![Page 57: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/57.jpg)
One Way Hash functions
✤ Not encryption: no procedure to simply invert it✤ Hashing a second time mixes the data even more
A GOOD GLASS IN THE BISHOP'S HOSTEL IN THE … … FROM THE TREE THROUGH THE SHOT FIFTY FEET OUT
43 84 9f 75 61 4a 49 8b 00 d5 28 a4 59 fc 9d de
UnHashHash
b5 3c e2 fa 7c 4f a7 c8 8e 33 b4 2e 57 da 13 30
![Page 58: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/58.jpg)
Hash
PAY $2K TO BOB
Hash
PAY $2K TO BOB
UK
Message IntegrityInclude the message hash (“UK”)
Check thehash values
![Page 59: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/59.jpg)
Hash
PAY $2K TO BOB
Hash
PAY $2K TO BOB
UK
Message IntegrityAny change causes a mismatch
PAY $6K TO ROB
UK
Check thehash values
![Page 60: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/60.jpg)
Hash
PAY $2K TO BOB
Hash
PAY $2K TO BOB
UK
Message IntegrityWhat about intentional changes?
PAY $6K TO ROB
GV
Check thehash values
The hash calculation shouldinclude secret information
![Page 61: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/61.jpg)
Keyed Hashing✤ Include secret information - a key - to prevent
attackers from making undetected changes
A GOOD GLASS IN THE BISHOP'S … THROUGH THE SHOT FIFTY FEET OUT
43 84 9f 75 61 4a 49 8b
Hash
b4cd11bc f084c19d 112879d0
The KeyThe Message
![Page 62: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/62.jpg)
Keyed Hashing✤ Recipient uses the shared secret key to check for
alterations in the message
A GOOD GLASS IN THE BISHOP'S … THROUGH THE SHOT FIFTY FEET OUT 43 84 9f 75 61 4a 49 8b
b4cd11bc f084c19d 112879d0
The KeyThe Message
The Wrapped Message The transmitted hash
![Page 63: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/63.jpg)
Keyed Hashing✤ Recipient uses the shared secret key to check for
alterations in the message
A GOOD GLASS IN THE BISHOP'S … THROUGH THE SHOT FIFTY FEET OUT
43 84 9f 75 61 4a 49 8b
b4cd11bc f084c19d 112879d0
The KeyThe Message
The transmitted hash
43 84 9f 75 61 4a 49 8b
Hash
=
![Page 64: Learning Practical Cryptography - WordPress.com...2018/02/01 · Grade School Crypto Ciphers hide the meaning of text Zfmebop efab qeb jbxkfkd lc qbuq encryption, decryption, ciphers,](https://reader030.vdocuments.mx/reader030/viewer/2022011906/5f3c9fa85846950d365a71e0/html5/thumbnails/64.jpg)
Crypto mechanisms can fail
WEPWhat makes crypto weak