MATH 470 Lecture 1

From Notes
Jump to navigation Jump to search

« previous | Tuesday, January 15, 2013 | next »


MATH 470 J. Maurice Rojas MILN 206 rojas@math.tamu.edu


Course Web Page

Homework 1 is online.

Critical Things

Grades

  • 10% HW (some from in the book)
  • 20% Quizzes
  • 35% Midterm
  • 35% Final (May 3 15:00—17:00)


There will be some number theory

Textbook: Ch. 1–3, parts of 6, 7, 9, 16

Groups:

  • Name
  • Email picture of me


Cryptology

κρυπτο(acute) = hidden or secret λογι(acute);α

Broadest sense: Protecting information from

  • adversaries
  • corruption
  • noise


Other etymology (main concerns of course)

  • Cryptography = making codes
  • Cryptonalysis = breaking codes



Caesar Cipher

ca. 100–44 BC (Julius Caesar)

During this time, a code like the following was used:

Define /26:={0,1,2,,25} [1]

f:/26/26xx+3f({0,1,2,,23,24,25})={3,4,5,,0,1,2}

Let each number correspond to a letter (A=0, B=1, etc.) and put it through the function:

  • HELLO → (7,4,11,11,13) → (10,7,14,14,16) → KHNNP

To decode, invert the function f by subtracting 3

This is called a Caesar cipher, where the key is 3

  1. take plain text (no punctuation or spaces)
  2. convert to a vector m in (/26)N
  3. Add a key mod 26 to each element: m+k(mod26)
  4. Convert back to letters

Modern View

"The core of cryptography is building and applying one-way functions."

Function should be easy to evaluate, but very hard to invert.

Example: Sound file

  • Numbers between -16,383 and 16,384 represent amplitude
  • Work in /32768={0,,32768}
  • Caesar cipher does not hide music at all
  • More sophisticated examples do very well.


Moral: The best encryption is (provably) a one-time random pad

  • BUT on a computer, random is anything but...

Decoding vs. Breaking

In decoding, you know what you're doing. In breaking, you don't know the exact means of deciphering, but "hack" it

Decoding a Caesar cipher requires the recipient ("Bob") to know about the sender's ("Alice") key k.

But how would an adversary ("Eve") break a "Caesar" cipher?

  • Frequency analysis [2]: The most commonly used letter is probably a masked version of 'E'
  • Brute Force: just try k={0,1,,25}


Vigenere Cipher

Giovan Battista Bellaso (1553)

  • Describes what would later and incorrectly be called a "Vigerere Cipher"

Use multiple Caesar ciphers at once:

  1. Take plain text (FOURSCOREANDSEVENYEARSAGO)
  2. Convert to vector (x1,x2,,x25)
  3. Key is now a vector k=(7,1,3,4,2)
  4. Cipher text becomes (x1,,x5)+k,(x6,,x10)+k,

Brute force is now more difficult since there are 26|k|

Breaking the Vigenere and Beyond

  1. Charles Babbage (ca. 1853–1856) finds ways to break Vigenere
  2. Confederates (ca. 1861–1865) use Vigenere
  3. Kasiski (1863) publishes volume showing how to break vigenere
  4. Scientific American (1917) says "Vigenere is impossible to break"
  5. Clifford Cocks (1973) at GCHQ [3] discovers "RSA"
  6. Rivest Shamir Adleman (1977) "invent" RSA (named after them) [4]


Number Theory

"To speak of cryptography well, we need to know some number theory" because it is the language of modern cryptography

What about multiplying instead of adding? (e.g. use f(x)=3x(mod26)

  • HELLO → (7,4,11,11,13) → (21,12,7,7,13) → VMHHO


Now what is f1(x)=x3(mod26)?

  • Quick answer: Just multiply by 9 mod 26. That is, the unique solution to x in 3x=1(mod26) is x=9
  • f1(x)=9x(mod26)

We say that ab(modn)n÷(ba) [5]

Note: Any Integer is congruent mod n to some number in {0,,n1}

In general: n(remainder of division of x by n)=xxn, where y is the "floor of y", or the greatest integer y

Example: 18014(mod26) since 18024=6+2426 and 24=180626


How do you invert mod n? (e.g. 1a(modn) )

  • Solve ax1(modn)
  • ax1(modn)n÷(ax1), so ax1=yn
  • To solve, find x,y with ax+ny=1
  • Extended Euclidean algorithm makes this easy


Extended Euclidean Algorithm

Standard wikipedia:Euclidean Algorithm is a way to compute GCD

For example: What is GCD(3,26)?

  1. 26=83+2
  2. 3=12+1
  3. GCD is 1


The Extended Euclidean Algorithm involves the following:

[263] becomes [1001263] (put identity matrix on top)

Repeat division steps on the entire matrix:

[1001263][108123][118921]

This means that [21]=[263][1189]

From this, we can find that 26(1)+3(9)=1

Footnotes

  1. is the set of integers, and /26𝟚𝟞 is "Z mod 26 Z"
  2. The letters in English occur with discernible frequency (E is most common, followed by S, T, A)
  3. GCHQ is British equivalent to CIA
  4. What's inside is often known before it becomes public on the outside
  5. "congruence mod n" is true iff their difference is divisible by n