33
CRYPTOGRAPHY Lecture 1 3 week summer course

CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

CRYPTOGRAPHY

Lecture 1

3 week summer course

Page 2: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Course structure

• Format: Part lecture, part group activities• HW:

– Daily assignments, some in-class and some take home. Keep these in a portfolio.

– Weekly 7-10 page essays on history of cryprography (topics not in book)

– Final project and presentation (you propose the topic and format)

– Final grade will be determined by portfolio of work including the above.

Page 3: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Expectations

• Most work should be typed. Even work done in class should (usually) be typed and added to portfolio.

• Attendance is mandatory.• Respectful behavior to your peers.• Your day is devoted to this class.

Page 4: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

General Rules

• When decrypting or deciphering, all tools are fair. You may do anything legal to obtain the information you want.

• However, you must disclose the methods you used. In unusual cases, you can keep some technique secret from your peers, with my approval, for a limited amount of time.

Page 5: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Why we need secure means of communication?

• Government: diplomacy is sometimes better done quietly.

• Military: strategies often rely on the element of surprise.

• Business: competitors will win if they know your secrets.

• Love letters . . . Secret affairs . . .

Page 6: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

History of secret writing I

• Herodotus chronicled the conflicts between Greece and Persia in the fifth century (499-472 BCE).

• Greece was organized into small, disunited, independent city-states. Persia was a large empire (and growing) ruled by Darius, and later his son Xerxes.

Page 7: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

History of secret writing I

• The Persian rulers had a long history of feuds with Athens and Sparta. Any minor problem could spark a major war.

• When Xerxes built a new capital for his kingdom (Persepolis), other countries sent tributes and gifts, but Athens and Sparta did not. Xerxes was upset by this lack of respect, and began mobilizing forces to attack the Greek city-states.

Page 8: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

History of secret writing I

• The Persians spent 5 years building up their forces. This was one of the largest fighting forces in history. In 480 BCE they were ready to attack.

• There was a Greek exile, Demaratus, who lived in the Persian city of Susa and saw the forces being built up for war with Greece. He still felt a loyalty to his homeland, and decided to send a message to warn the Greeks of the impending attack. But how?!

Page 9: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

History of secret writing I

• He scraped the wax off a pair of wooden folding tablets, wrote on the wood underneath, and covered over the tablets with wax. The apparently blank tablets got to Greece, where they realized (how?) that there may be a secret message in it, and found it. Now the Persians lost the element of surprise – and the war.

Page 10: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Steganography

• This is hidden writing or steganography. Another example is the story of Histaiaeus, who wanted to encourage Miletus to revolt against the Persian king. He shaved the head of his messenger, wrote the message on his scalp, and waited until the hair grew back.

Page 11: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Steganography

• Other examples include– The ancient Chinese would write

messages on fine silk, roll it into a tiny ball, coat it with wax and swallow it . . .

– Secret ink: in the 1st century, Pliny the Elder explained how the “milk” of the thithymallus plant becomes transparent after drying, but reappears upon heating. (Many organic fluids behave this way, e.g. urine)

Page 12: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Steganography

In the 16th century, the Italian scientist Giovanni Porta described how to conceal a message in a hardboiled egg by making ink from alum and vinegar and writing on the shell. The solution penetrates the shell, leaving its mark only on the egg underneath!

During WWII, German agents in Latin America would photographically shrink down a page of text to a little dot, and hide it on top of a period or dotted I on a page. A tip-off allowed American agents to find this in 1941.

Page 13: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Steganography

Steganography suffers from one problem: if it is uncovered all is lost.

Page 14: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Cryptography

If we hide the message but then make it difficult to read if

found, we have an added level of security.

Page 15: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Cryptography

The aim is to hide the meaning of the message rather than its presence. This can be done by scrambling the letters around.

Page 16: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Transposition CiphersMake an anagram according to a straightforward system (404 BCE):The sender winds a piece of cloth or leather on the scytale and writes the message along the length of the scytale. Then unwinds the strip, which now appears to carry a list of meaningless letters. The messenger would take the leather strip (sometime wearing it as a belt) and when he arrives at his destination, the receiver winds the strip back on a scytale of the same diameter.

Page 17: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Transposition Ciphers

Rail fence transposition:

Round and round the mulberry bush the monkey chased the weasel

r u d n r u d h m l e r b s t e o k y h s d h w a e o n a d o n t e u b r y u h h m n e c a e t e e s l

Becomes:rudnrudhmlerbsteokyhsdhwaeonadonteubryuhhmnecaeteesl

Page 18: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Simple Transposition• Simple Columnar Transposition• The key information is the number k of

columns.• Encipherment: Plaintext is written in lines kletters wide and then transcribed column bycolumn left to right to produce ciphertext.

This and the next few slides copied from:http://www.rhodes.edu/mathcs/faculty/barr/Math103CUSummer04/TranspositionSlides.pdf

Page 19: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Simple Transposition: example

“April come she willWhen streams are ripe and swelled with rain”

Convert to a transposition cipher using k=10

Page 20: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Simple Transposition: example

1234567890APRILCOMESHEWILLWHENSTREAMSARERIPEANDSWELLEDWITHRAIN

AHSRL IPETI LNRWR PEIIE EDLLA AWCLM NIOWS DTMHA SHEER WRSNE EA

Page 21: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Simple Transposition• Decipherment: If n is the length of the ciphertext,it is

written column by column left to right down in a k ×(n DIV k )rectangular array with a “tail ” of length n MOD k as shown. Transcribing row by row produces plaintext.

M E S S A G E A N D M O R EA N D S T I LL M O R E U NT I L I T E ND S

The message is n=37 letters long. It is set up in k=7 columns. So there are 37 DIV 7 = 5 rows and the tail is37 mod 7 = 2

Page 22: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

HW#1a1. Given the message

NNDATEAOIIOTINHRNNODTHSGAECSUIHEMEN IECSTIWORSGAISYNOROINNETGREUNODNUIL DSCRCTP

with k=8: Decipher it.

Page 23: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

HW#1a2. Encipher a message with a given value of k.

Now the groups swap messages and are given the value of k. Decipher the messages.

3. Encipher a message with a value of k between 2 and 10 and swap ciphers. Now decipher the message . . .

Page 24: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Transposition Ciphers

A double transposition offers more security:Rudnrudhmlerbsteokyhsdhwaeonadonteubryuhhmnecaeteesl

Becomes u n u h l r s e k h d w e n d n e b y h m e a t e lR d r d m e b t o y s h a o a o t u r u h n c e e sBecomes

unuhlrsekhdwendnebyhmeatelrdrdmebtoyshaoaoturuhncees

Page 25: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Column Transposition

A G A M E M N O N key phrase1 4 2 5 3 6 7 9 8 convert to numbers

ABCDEFGHIJKLMNOPQRSTUVWXYZAEGMNO delete the letters not used

134579 assign them numbers

2 68 according to how they appear

Example from http://hem.passagen.se/tan01/transpo.html

Page 26: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Column Transposition

A G A M E M N O N key phrase1 4 2 5 3 6 7 9 8 convert to numberss e n d a r m o ur e d c a r t o h e a d q u a r t e r s j * * * * * *

The code is then Srer-nddj-aau-eeas-dcq-rra-mtr-uhe-oot

Page 27: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Double Column Transposition

M Y C E N A E key phrase5 7 2 3 6 1 4 convert to numberss r e r n d d j a a u e e a s d c q r r a m t r u h e o o t

The code is then DEREE ACRRU QUDAA OSJSM ONERH RADTT

Page 28: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Transposition Grille

Example from http://hem.passagen.se/tan01/transpo.html

Page 29: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Transposition Grille

We need more machine gun ammunition fast xx

Page 30: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Transposition Grille

Page 31: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Double column Transposition

How do you get back to where you started? Reverse the process.

Page 32: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

Secure transmission

Steganography cryptography

Transposition Substitution

Page 33: CRYPTOGRAPHY Lecture 1 3 week summer course. Course structure Format: Part lecture, part group activities HW: – Daily assignments, some in-class and some

HW #1b

• Use each of the transposition ciphers we talked about today to encode your own messages. Now swap them and (without sharing the key, or even the method of encryption) try to decipher them.Don’t feel bad if you can’t decipher. It is hard, that’s the point!

• Look online for tools to help decipher transposition cipher and use them.

• Read the code book’s introduction andchapter 1 pages 1-14