MATH 470 Lecture 3

From Notes
Jump to navigation Jump to search

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


Homework 2 will be online later today.

Deciding whether

ab(modn)

takes one division step: n(ab)


Deciding whether

axb(modn)

has a solution iff GCD(a,n)b[1] and takes 5 × (number of digits in smaller of a and n) + 1



From Homework 1

Problem 18b

When is the matrix [11b1](mod26) invertible?

The inverse should be

[abcd]1=1det[dbca]

As long as the determinant has a multiplicative inverse, then the formula still works.

Working in /26, the determinant 11b has to be relatively prime to 26, or 𝔾𝔻(1b,26)=1.

...

When is [3573]1(modp) undefined for prime number p?

|3573|=26

Therefore, 126 only makes sense mod p when GCD(p,26)=1, so p{2,13} makes 126 nonsensical.


Complexity

[2]

Caesar cipher xx+b(mod26) can be broken by looking at 26 possible shifts (where b = key) of plaintext.

Vigenere cipher xjxj+b or equivalently, (xi,,xk)(xi+b1,,xk+bki) can be broken with brute force by looking at 26ki possible keys/shifts

Page Under Construction
This page still needs revision. Please edit this page to finish it.

Frequency of letters in English: Table 2.1 on page 17

Both are examples of symmetric [3] ciphers, where the decryption key is easy to obtain from the encryption key.

Disadvantages:

  1. If an enemy knows the encryption key, he/she gets the decryption key (almost) for free.
  2. You must still send the key to your partner somehow


Vigenere Cipher

easier to break if key length is known and plaintext is long enough (sufficiently large samles of English text have predictable letter frequencies)

  1. Decimate your sequence: (x1,,xk,xk+1,,x2k,){(x1,xk+1,x2k+1,)index1(modk)(x2,xk+2,x2k+2,)index2(modk)
  2. Perform frequency analysis on decimations: most frequent in each is likely the letter 'E'
  • If plaintext consists of n symbols, you're going to spend Cn time reading anyway, so adversary should spend Cn time breaking code.
  • IF we know k, we need O(n) time to break the cipher
  • If we don't know k, finding it is nontrivial.


In practice, 1<k<N, perhaps k=np(0,1).


Dearrangement Inequality

Discovered in 1952 by Hardy-Little???, this inequality will help us find k

Given any sequences x1xn and y1yn of the same length and any permutation [4] σ:{1,,n}{1,,n}, we have

x1y1+xnynx1yσ(1)++xnyσ(n)

In particular, if both sequences are strictly increasing, then equality occurs only for σ=identity

For example, if x=(14,14,12) and y=(19,17,16), then 1419+1416+12161416+1419+1217

Finding Key Length

Given x1,x2,, do the following:

  1. Get frequency info for symbols in your language (e.g. English)
  2. for i from 1 to np, compare the frequency of a collision between xj and xj+1 for j{1,,ni}. This yields pi,a,,pi,z

To be continued …

Next Time

Dr. Rojas will be in Washington D.C.

Guest lecture Catherine Yan on Fermat's Little Theorem


Footnotes

  1. Lame's Theorem
  2. Later, we'll see more on the complexity of multiplication, and that the complexity of multiplication ≈ complexity of division for integers
  3. Later, we'll see asymmetric ciphers (enemy cannot easily get the decryption key, even knowing the encryption key)
  4. A permutation is a one-to-one and onto mapping