Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… ·...

24
17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora [email protected] Junho/2009 Did you watch this movie ?

Transcript of Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… ·...

Page 1: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

1

Cryptographyand beyond

Evandro Curvelo [email protected]

Junho/2009

Did you watch this movie ?

Page 2: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

2

Scherbius and his patent

As usual... Hollywood is lying...(U-110 captured by Royal Navy)

Page 3: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

3

Alec Dennis

Enigma

Page 4: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

4

Enigma models

Enigma rotors

Page 5: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

5

Enigma rotor position settings

Enigma basic internals

Page 6: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

6

Enigma 8 rotors engine

Power and battery inlets

Page 7: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

7

Enigma plugboard panel

Enigma hardware kit

Page 8: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

8

Enigma users guide

Wehrmacht Enigma Codebook

Page 9: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

9

Luftwaffe Enigma Codebook

Kriegsmarine Enigma Codebook

Page 10: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

10

How strong was Enigma ?

• For 3 rotors interchange orientation:

– 26 x 26 x 26 = 17.576 orientations.

• For 3 rotors positioning:

– (123, 132, 213, 231, 312, 321) = 6 positions.

• Plugboard (typical 6 plug wires):

– 6 letter pairs (26 letters) = 100.391.791.500

• Possible keys =

– 17.576 x 6 x 100.391.791.500 = ~10.000.000.000.000.000

Session key use example

• Rotors orientation initial position = QCW

• Random session key choice = PGH

• Session key typing = PGHPGH (2 times)

• Session key encrypted = KIVBJE

• Session key decrypted = PGHPGH

• New session key used = PGH

– Interesting note: PGH is not in the codebook!

Page 11: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

11

Enigma in use

Enigma in battlefield

Page 12: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

12

Wireless Enigma

Station listeners

Page 13: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

13

Using Enigma

Enigma Emulator

The Gordian Knot legend• In 333 B.C. Alexander the Great had invaded Asia Minor

and arrived in the central mountains at the town of

Gordium; he was 23.

• The staves of the cart were tied together in a complex

knot with the ends tucked away inside. Legend said that

whoever was able to release the knot would be

successful in conquering the East.

• Having arrived at Gordium it was inconceivable that the

impetuous young King would not tackle the legendary

“Gordian Knot”.

Page 14: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

14

The Gordian Knot legend• His generals gathered round as he struggled with the

Knot for a few minutes. Then he asked Aristander, his

seer, “does it matter how I do it?”. Aristander couldn’t

provide a definitive answer, so Alexander pulled out his

sword and cut through the knot.

• The legend of the Gordian

Knot appealed to us for

Alexander’s decisive action

and as a metaphor for radical

solutions to complex

problems.

Marian Rejewski & Alan Turing

Page 15: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

15

Some tips used...

• In Enigma one letter never was encrypted

as itself;

• Procedures: Wheater reports

boilerplates/templates;

• Operators:

– Morse code typing hand signatures;

– Not random session key choice;

• ... and so on...

– These procedures can decrease the keypossibilities universe to (only) 105.456

Boilerplates & templates

Page 16: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

16

Wheather reports

Turing bombs & Colossus

Page 17: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

17

Typical encrypted message

Typical decrypted U-Boatmessage

Page 18: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

18

Naval Enigma cracking roadmap

Coventry: protecting sources

Page 19: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

19

Checkpoint

• Good cryptography not always means

good privacy;

• Good procedure is your friend. Maybe the

only one;

• Good procedures costs something, usually

is not cheap;

• Functionality and performance are your

enemies;

• Cryptoanalysis is a mix of science and art.

Navajo Codetalkers

Page 20: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

20

Nowadays...

sql-injection-acc.exe

Lessons

• Software engineering and security are not

friends!

– To get functionality and performance, youhave to pay using security currency.

• Procedure is fundamental.

• Users hates procedures!

• Good cryptography, sometimes, looks like

a Gordian knot! Be careful with the things

around it!

Page 21: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

21

To have fun…

• U-571

To have fun…

• Windtalkers

Page 22: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

22

To have fun…

• The Codebook: The Secret

History of Codes and Code-

breaking

• Simon Singh

2000

• ISBN-10: 1857028899

• ISBN-13: 978-1857028898

To have fun…

• The codebrakers

• David Kahn

1996

Page 23: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

23

To have fun…

• Mary Queen of Scots

• Lady Antonia Fraser

• 1989.

To have fun…

• Applied cryptography

• Bruce Schneier

• 1995.

Page 24: Cryptography and beyond v01 - cin.ufpe.brsati/palestras/Cryptography_and_beyond-Evandro.… · 17/6/2009 1 Cryptography and beyond Evandro Curvelo Hora evandro@tempest.com.br Junho/2009

17/6/2009

24

To have fun…

• Secrets and Lies

• Bruce Schneier

• 2004.

Thank you

Evandro Curvelo [email protected]