... for the class
Codes, codemakers, codebreakers:
an introduction to cryptography.
[Stuff inside square brackets is not in Singh's text.]
beot ebot o... t... beto ebto o... t... boet eobt o... t... bote eotb o... t... bteo etbo o... t... btoe etob o... t...
a b c d e f g h i j k l m n o p q r s t u v w x y z 1 0 2 1 6 1 0 2 2 0 0 1 1 3 3 1 0 3 4 3 0 0 0 1 0 0how many rearrangements of a 1-2-1-6-2-2-1-1-3-3-1-3-4-3-1 multiset?
s e n d m o r e \t \r \o \o \p \s \t \o \s \o \u \t \h \e \r \n \f \l \a \n \k \x \q \i stsferolnouadotnmphkosexrtuqeoni
r i f n e i h r \ /\ /\ /\ /\ /\ /\ /\ \a/ \l/ \e/ \c/ \c/ \p/ \e/ \ rifneihraleccpe
a b c ... α β γ ...
abcdefghijklmnopqrstuvwxyz 3-shift Caesar cipher DEFGHIJKLMNOPQRSTUVWXYZABC 3-VKLIW fDHVDU FLSKHU
abcdefghijklmnopqrstuvwxyz how secure is this? MARYQUENOFSCTVWXZBDGHIJKLP NWJ DQRHBQ OD GNOD?
key-letter a b c ... z shift 0 1 2 ... 26ciphertext: fk( pj ) = ( pj + kj mod m) mod 26
W H I T E W H I T E W H I T E W H I T E W H I d i v e r t t r o o p s t o e a s t r i d g e Z P D X V P A Z H S L Z B H I W Z B K M Z N Mcj = ( pj + kj mod κ ) mod α
a 09 12 33 47 53 67 78 92 b 48 81 c 13 41 62 d 01 03 45 79 e 14 16 24 44 46 55 57 64 74 82 87 98 f 10 31 ... ... x 28 y 21 52 z 02
1 2 3 4 5 1 a b c d e 2 f g h i/j k 3 l m n o p 4 q r s t u 5 v w x y z
23 34 52 24 43 44 23 15 35 34 31 54 12 24 45 43 22 42 24 14 45 43 15 21 45 31 24 33 44 15 31 15 22 42 11 35 23 54 ? 1 2 3 4 5 6 1 a b c d e f 2 g h i j k l 3 m n o p q r 4 s t u v w x 5 y z 0 1 2 3 6 4 5 6 7 8 9
C H A R L
E S B D F
G I/J K M N
O P Q T U
V W X Y Z
plaintext: retreat left ??????????
re tr ea tl ef tx ?? ?? ?? ?? ??
ciphertext: CD YD BC UR SE QY BC DW UP PF GC
LP YN UG DZ UC PA DS OT MS AE SE CU DH NK BU UC ES TG YD
A D F G V X
A 8 P 3 D 1 N
D L T H O A H
F 7 K B C 5 Z
G J U 6 W G M
V X S V I R 2
X 9 E Y 0 F Q
keyword: CUBE
c r a c k e d b y ? ? ? ? ? ? ? ? ? ? ? ? ? ?
FG VV DV FG FD XD AG FF XF ** ** ** ** ** ** ** ** ** ** ** ** ** **
C U B E => B C E U
F G V V VFXF*******FDFAX*******VGDF*******GVDGF*******
D V F G
F D X D
A G F F
X F * *
* * * *
* * * *
* * * *
* * * *
* * * *
* * * *
* *
v d d d d v d d g d f f g f d x f g x a x g d g x d d a g g v a g g v a d v v x
grid: see Appendix F keysize: 4
VFXFGDGVDAVFDFAXXVXAVVAVGDFVGVDVXGGVDGFDVDDGFX
----------------------------------------------
perm? was 1234? e.g. keyword ARTY
12 chars 12 chars 11 chars 11 chars
VFXFGDGVDAVF DFAXXVXAVVAV GDFVGVDVXGG VDGFDVDDGFX
VDGVFFDD ... => s g b t ... :(
----------------------------------------------
perm? was 1243? e.g. keyword ARTS
12 chars 12 chars 11 chars 11 chars
VFXFGDGVDAVF DFAXXVXAVVAV GDFVGVDVXGG VDGFDVDDGFX
VDVGFFDD ... => s i b t ... :(
----------------------------------------------
perm? ...
:(
----------------------------------------------
perm? .... was 3142? e.g. keyword CUBE
11 chars 12 chars 11 chars 12 chars
VFXFGDGVDAV FDFAXXVXAVVA VGDFVGVDVXG GVDGFDVDDGFX
FGVVDVFG ... => c r a c ... :)
D D D D D D D D D D D D c a e s a r c i p h e r F D H V D U F L S K H U abcdefghijklmnopqrstuvwxyz DEFGHIJKLMNOPQRSTUVWXYZABC abcdefghijklmnopqrstuvwxyz BLIZARDWNGHJKMOPQSTUVXYCEF k e y p h r a s e s u b s t i t u t i o n c i p h e r H A E P W S B T A T V L T U N U V U N O M I N P W A S S E C R E T S E C R E T S E v i g e n e r e c i p h e r N M I V R X J I E Z T A W V A N H I S T O R I C A L I N T R r u n n i n g k e y c i p h e r R H U V A G U B M A C T X U X I Q T X P L K G G U R E M P D W X o n e t i m e p a d c i p h e r E G B I T W K V U U G U E K A O
? ? ? ? ? ? ? ? ? ? ? ? C T F Q Q R C-H T-E F-L Q-P Q-M R-E C-G T-O F-A Q-W Q-A R-Y h e l p m e g o a w a y C T F Q Q R C T F Q Q R
L O K R G M A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
M V T X Z E P M R X
J K T M P E
D V Y P Z X
. . . . . .
F Q H P L W O G B M V R X U Y C Z I T N J E A S D K
A -> F -> W -> A B -> Q -> Z -> K -> V -> E -> L -> R -> I -> B C -> H -> G -> O -> Y -> D -> P -> C J -> M -> X -> S -> T -> N -> U -> J
V E C J I B rotors 123, start DDN E W O P F A K D A L Y T 1-4: L C V T E O A B C D E F G H I J K L M N O P Q R S T U V W X Y Z B A H Q D Z J J Y S I B Y T I Q W V P Q X E Y R Q P G Y F A V 2-5: F Q P A L R A B C D E F G H I J K L M N O P Q R S T U V W X Y Z C R M U Q N I D U R C J M Z Z K N U L Y O U M W K X N B S S D 3-6: I T J B T G A B C D E F G H I J K L M N O P Q R S T U V W X Y Z H J G E K H B U K L V H J W V F O O U G P X D P C R L N K M S A S D R G I S B Z G N X O H T Z Z W N F I H C F M M W X X E
...wettervorhersage........ KVBVRBCPZFQFNTTQEQOGYIIOYNG
G P A Z
| \| |
S--Q--O--E--R--F--V--W H--N
| /
|/
C--T--B
...wettervorhersage........ KVBVRBCPZFQFNTTQEQOGYIIOYNG
pairs: EH
...wettervorhersage...
....W................. <- W should be R
pairs: EH RW
...wettervorhersage...
....R.........N....... <- N should be T
pairs EH RW NT
++++ ? +++++ + <- these positions ok, so BC EFGH PQRST ok
...netteqzlrhersjgy... so at ? must have F unchanged,
KVBVRBCPZFQFNTTQEQOGYI so at ? must have VZ
pairs EH RW NT VZ
++++++?+++++ + <- Q ok so must have LO
...WETTERVLRHERSJGY...
KVBVRBCPZFQFNTTQEQOGYI
pairs EH NT RW VZ LO
++++++++++++?++ <- E ok so must have AJ
...WETTERVORHERSJGE...
KVBVRBCPZFQFNTTQEQOGYI
pairs EH NT RW VZ LO AJ <- final
+++++++++++++++
XXXWETTERVORHERSAGEMUENCHEN <- ptext :)
KVBVRBCPZFQFNTTQEQOGYIIOYNG
----------- | cartouche | -----------
sadani sa da ni sadanu sa da nu sadu sa du
case 1 25 26 37 57 70 52 41 57 2 " " " 36 " " " 36 3 " " 05 " " 12
| 217 | = | 2 | × | 108 | + | 1 |
| 108 | = | 2 | × | 54 | + | 0 |
| 54 | = | 2 | × | 27 | + | 0 |
| 27 | = | 2 | × | 13 | + | 1 |
| 13 | = | 2 | × | 6 | + | 1 |
| 6 | = | 2 | × | 3 | + | 0 |
| 3 | = | 2 | × | 1 | + | 1 |
| 1 | = | 2 | × | 0 | + | 1 |
110110012
=
1 × 27 +
1 × 26 +
0 × 25 +
1 × 24 +
1 × 23 +
0 × 22 +
0 × 21 +
1 × 20
=
1 × 128 +
1 × 64 +
0 × 32 +
1 × 16 +
1 × 8 +
0 × 4 +
0 × 2 +
1 × 1
= 21710
usual method fast method hint: 423 = 0b 110100111
x = 1 <- a**0 x = 1 <- a**0
x = x*a <- a**1 1 x = x*x*a <- a**1
x = x*a <- a**2 1 x = x*x*a <- a**3
x = x*a <- a**3 0 x = x*x <- a**6
x = x*a <- a**4 1 x = x*x*a <- a**13
x = x*a <- a**5 0 x = x*x <- a**26
x = x*a <- a**6 0 x = x*x <- a**52
x = x*a <- a**7 1 x = x*x*a <- a**105
x = x*a <- a**8 1 x = x*x*a <- a**211
x = x*a <- a**9 1 x = x*x*a <- a**423
x = x*a <- a**10
x = x*a <- a**11
x = x*a <- a**12
...
...
...
x = x*a <- a**423
p = 613144603035200518605071627722399281527 base = 347449578131074797459449734586666998031 alice_secret = 474140564715023867271727810192114419457 bob_secret = 556327197178837163583577967104054021837 alice_sends = pow(base, alice_secret, p) bob_sends = pow(base, bob_secret, p) alice_key = pow(bob_sends, alice_secret, p) bob_key = pow(alice_sends, bob_secret, p) Alice,Bob probable prime 613144603035200518605071627722399281527 Alice,Bob base 347449578131074797459449734586666998031 Alice sends Bob 344627486120828843474388906075377334410 Bob sends Alice 409706635860222822429885047531176332371 Alice creates key 450786317947341275948138905696766128062 Bob creates key 450786317947341275948138905696766128062
Euclid gcd: compute gcd(a,b), a= 60534384 b= 35717371 gcd is last non-zero remainder 60534384 - 35717371 * 1 = 24817013 35717371 - 24817013 * 1 = 10900358 24817013 - 10900358 * 2 = 3016297 10900358 - 3016297 * 3 = 1851467 3016297 - 1851467 * 1 = 1164830 1851467 - 1164830 * 1 = 686637 1164830 - 686637 * 1 = 478193 686637 - 478193 * 1 = 208444 478193 - 208444 * 2 = 61305 208444 - 61305 * 3 = 24529 61305 - 24529 * 2 = 12247 24529 - 12247 * 2 = 35 12247 - 35 * 349 = 32 35 - 32 * 1 = 3 32 - 3 * 10 = 2 3 - 2 * 1 = 1 2 - 1 * 2 = 0 extension: express gcd as linear combination of a,b 1 = 3 * 1 + 2 * -1 1 = 32 * -1 + 3 * 11 1 = 35 * 11 + 32 * -12 1 = 12247 * -12 + 35 * 4199 1 = 24529 * 4199 + 12247 * -8410 1 = 61305 * -8410 + 24529 * 21019 1 = 208444 * 21019 + 61305 * -71467 1 = 478193 * -71467 + 208444 * 163953 1 = 686637 * 163953 + 478193 * -235420 1 = 1164830 * -235420 + 686637 * 399373 1 = 1851467 * 399373 + 1164830 * -634793 1 = 3016297 * -634793 + 1851467 * 1034166 1 = 10900358 * 1034166 + 3016297 * -3737291 1 = 24817013 * -3737291 + 10900358 * 8508748 1 = 35717371 * 8508748 + 24817013 * -12246039 1 = 60534384 * -12246039 + 35717371 * 20754787
120 = 23*5 + 5 23 = 5*4 + 3 5 = 3*1 + 2 3 = 2*1 + 1 2 = 1*2 + 0
1 = 3 - 2*1 2 = 5 - 3*1 = 3 - (5 - 3*1)*1 = 3*2 - 5*1 3 = 23 - 5*4 = (23 - 5*4)*2 - 5*1 = 23*2 - 5*9 5 = 120 - 23*5 = 23*2 - (120 - 23*5)*9 = 47*23 - 120*9
1 * 1 * 84 = 84 mod 143 84 * 84 = 49 mod 143 49 * 49 * 84 = 54 mod 143 54 * 54 * 84 = 128 mod 143 128 * 128 * 84 = 24 mod 143
1 * 1 * 24 = 24 mod 143 24 * 24 = 4 mod 143 4 * 4 * 24 = 98 mod 143 98 * 98 * 24 = 123 mod 143 123 * 123 * 24 = 19 mod 143 19 * 19 * 24 = 84 mod 143
| ≈ 2 000 000 BC | homo habilis handy man / stone age |
| ≈ 11 000 BC | last ice age ends |
| ≈ 8 000 BC | agriculture |
| ≈ 4 000 BC | bronze (copper+tin) age |
| ≈ 3 500 BC | writing |
| ≈ 1750 AD | industrial age |
| ≈ 1970 AD | information age |
s = pow(m, d_B, n_B) = pow(28, 173, 323) = 24
toA_m = pow(m, e_A, n_A) = pow(28, 7, 143) = 63 toA_s = pow(s, e_A, n_A) = pow(24, 7, 143) = 106
m = pow(toA_m, d_A, n_A) = pow( 63, 103, 143) = 28 s = pow(toA_s, d_A, n_A) = pow(106, 103, 143) = 24
pow(s, e_Bob, n_Bob) = pow(24, 5, 323) = 28
filter: + + x + x + + x + x x x + x message: 1 1 0 0 1 1 0 1 0 1 0 1 1 1 photon: | | \ - / | - / - / \ / | /
filter: + x x + x x + + + + x x x + photon: | | \ - / | - / - / \ / | / interpret: 1 ? 0 0 1 ? 0 ? 0 ? 0 1 ? ?
Alice's filter: + + x + x + + x + x x x + x Bob's filter: + x x + x x + + + + x x x + matched: + x + x + + x x key: 1 0 0 1 0 0 0 1
Eve's filter: x x + + + x x + + x + x + x Alice/Bob matched: + x + x + + x x key bits: 0 0 1
original photon: | | \ - / | - / - / \ / | / Eve's filter: x x + + + x x + + x + x + x altered photon: ? ? ? - ? ? ? ? - / ? / | / e.g. : \ / | - - / / - - / | / | /
altered photon: \ / | - - / / - - / | / | / Alice-Bob matched: + x + x + + x x key: ? ? 0 ? ? 0 ? ? e.g.: 1 0 0 0 1 0 1 0
Alice-Bob matched: + x + x + + x x test bits: . . . Alice: 1 1 0 Bob: 1 0 1
a b c d e f g h i j
77915 16875 22505 38217 117089 20833 20820 62895 65432 1082
k l m n o p q r s t
8058 42791 23274 65615 69325 17255 1556 52133 64231 87997
u v w x y z
26697 8597 22222 1030 16870 632
prob(2 people, diff't b'days) = 1-1/365 prob(3 people, diff't b'days) = (1-1/365)*(1-2/365) prob(4 people, diff't b'days) = (1-1/365)*(1-2/365)*(1-3/365) ... prob(22 people, diff't b'days) = (1-1/365)* ... * (1-21/365) = 0.5243... prob(23 people, diff't b'days) = (1-1/365)* ... * (1-21/365)*(1-22/365) = 0.4927...
prob(some 3-character sequence "i**" is not "ilm") ?
two characters after i must be
either "(not l) *" A
or " l (not m)" B
prob(A) = (total - #l) / total
= 951 947 - 42 791 / 951 947
= 0.955...
prob(B) = ( #l / total) * ( (total - #m) / total)
= ( 42 791 / 951 947 ) * ( ( 951 947 - 23 274) / 951 947 )
= 0.043852...
prob(A) + prob(B) =
prob (each of the 65 432 sequences "i**" is not "ilm")
roughly = 0.99838...^65432
= 1.49e-46
= 0.000000000000000000000000000000000000000000000149
Prob(some 5-character k-EDLS is "koran") =
1- ( (951947-69325)/951947 +
(69325/951947)*(951947-52133)/951947 +
(69325/951947)*(52133/951947)*(951947-77915)/951947 +
(69325/951947)*(52133/951947)*(77915/951947)*(951947-65615)/951947) ^ 8058 =
1- ( 0.9999775 ) ^ 8058 =
1- 0.834179193 =
0.1658...
{ a,a,a,a,b,b,c,d,d,d,e,e,e,e,e} ?
I_c = (4*3 + 2*1 + 1*0 + 3*2 + 5*4) / (15*14)
= (12 + 2 + 0 + 6 + 20 ) / 210
= 0.19...
{ a,a,a,b,b,b,c,c,c,d,d,d,e,e,e } ?
I_c = (3*2 + 3*2 + 3*2 + 3*2 + 3*2) / (15*14)
= ( 6 + 6 + 6 + 6 + 6 ) / 210
= 0.14...
I_c = ( f_1*(f_1 - 1) + f_2*(f_2 - 1) + ... + f_c*(f_c - 1) / n*(n-1)
if n is large, (f_j - 1) / (n - 1) ≈ f_j / n = p_j, and so
I_c ≈ p_1^2 + p_2^2 + ... + p_c^2
{ a a a a b b c d d d e e e e e } and
{ a a a a a b b b b c c d e e e } ?
I_mc = (4*5 + 2*4 + 1*2 + 3*1 + 5*3) / (15*15) =
= 48/225 = 0.21...
{ a a a a b b c d d d e e e e e } and
{ a a a a b b c d d d e e e e e } ?
I_mc = (4*4 + 2*2 + 1*1 + 3*3 + 5*5) / (15*15) =
= 55/225 = 0.24...
a b c d e .27 .13 .07 .20 .33 shift 0 a->a (a bbb ccccc dddd ee) ((1*.27) + (3*.13) + (5*.07) + (4*.2) + (2*.33))/15 = .165 shift 1 a->b (aa b ccc ddddd eeee) ((2*.27) + (1*.13) + (3*.07) + (5*.2) + (4*.33))/15 = .213 shift 2 a->c (aaaa bb c ddd eeeee) ((4*.27) + (2*.13) + (1*.07) + (3*.2) + (5*.33))/15 = .244 shift 3 a->d (aaaaa bbbb cc d eee) ((5*.27) + (4*.13) + (2*.07) + (1*.2) + (3*.33))/15 = .213 shift 4 a->e (aaa bbbbb cccc dd e) ((3*.27) + (5*.13) + (4*.07) + (2*.2) + (1*.33))/15 = .165
a b c ... z .081 .019 .028 .001 .0066 + .0004 + .0008 + ... + .0000 = .065...
SAABTFWFTBJVAKLGCZSRVVAHCMBEHNQIFIAWNA FGZMIOFUIZPRKCZUSGZFCQSGFVRFWFSFGNFVRV WQGAGBIWYDAAIAVIEHUWLASFLWPOLQWGQNFAUB TXWDHUWEUZYTMFVNLEMGJSTFYRDTK keysize 1 ? substring S A A B T ... I_c = .050 keysize 2 ? substring S A T W T ... substring A B F F B ... avg I_c = .053 keysize 3 ? substring S B W B A ... substring A T F J K ... substring A F T V L ... avg I_c = .054 keysize 4 ? substring S T B K Z ... substring A F J L S ... substring A W V G R ... substring B F A C V ... avg I_c = .046 keysize 5 ? substring S F J G V ... substring A W V C V ... substring A F A Z A ... substring B T K S H ... substring T B L R C ... avg I_c = .070 keysize 6 ? substring S W A S C ... substring A F K R M ... substring A T L V B ... substring B B G V E ... substring T J C A H ... substring F V Z H N ... avg I_c = .043
26 choose 2
= (26*25) / 2
= 325
(26 choose 2) * (24 choose 2) / 2!
= (26*25*24*23) / (2 * 2 * 2!)
= 44 850
(26 choose 2) * (24 choose 2) * (22 choose 2) / 3!
= (26*25*24*23*22*21) / (2*2*2 * 3!)
= 3 453 450
? ? ? ? ? ? ? ?
= ? ? ? ? ? ? ? ?
= 100 391 791 500
n p(n)
1 1 1
2 2 2 1+1
3 3 3 2+1 1+1+1
4 5 4 3+1 2+2 2+1+1 1+1+1+1
5 7 5 4+1 3+2 3+1+1 2+2+1 2+1+1+1 1+1+1+1+1
6 11 6 5+1 4+2 4+1+1 3+3 3+2+1 3+1+1+1 2+2+2 2+2+1+1 2+1+1+1+1 1+1+1+1+1+1
...
26 2436
#!/usr/bin/env python
# show single letter frequencies of running key cipher,
# assuming both key and ptext independently uniformly sampled from
# typical English letter single letter frequencies
import string
L = [ # English letter frequencies
8.167, 1.492, 2.782, 4.253, 12.702, 2.228, 2.015, 6.094, 6.966, 0.153,
0.772, 4.025, 2.406, 6.749, 7.507, 1.929, 0.095, 5.987, 6.327, 9.056,
2.758, 0.978, 2.360, 0.150, 1.974, 0.074 ]
def printAlphabet():
alphabet = string.ascii_lowercase
for letter in alphabet:
print ' '+letter,
print ''
def showAsPerCentRatios(A):
for j in range(len(A)):
print "%2d" % int(round (100.0*A[j]/(1.0*sum(A)))),
print ''
def runningCipherFreqs(L):
M = [] # running cipher frequencies
n = len(L)
# compute M
for j in range(n):
s = 0.0
for k in range(n):
s += 1.0*L[k]*L[(j-k)%n] # ptxt k + key (j-k) = ctxt j
M.append(s/sum(L))
return M
printAlphabet()
showAsPerCentRatios(L)
showAsPerCentRatios(runningCipherFreqs(L))
---------------
python < run_ciph_freq.py
a b c d e f g h i j k l m n o p q r s t u v w x y z
8 1 3 4 13 2 2 6 7 0 1 4 2 7 8 2 0 6 6 9 3 1 2 0 2 0
5 3 3 3 5 4 4 5 5 3 4 5 4 3 3 4 3 4 4 4 3 5 5 4 3 4
s*iqq4epdwvjg3oh2#*3z,5e'9icmsw3qtg0r*s/t9%+mes%bvpwhxlat*&1ke'
wi3g.h26uvu4'-zk*s9+qei5rwxjh3,)ba't.*%clq)u0e(4#m,doksg&k1/2uib(
6w5paxu3.5r9sz-t*hc0jenomx2l4s1#zgk93wcm-'3jid,8ubh0uyo'6g&59(*d2a/&
r.+4kzi,t1p%beh(cla3m0q-k6gdkj#.kw2r4/&*'xzo1$uyl9(p,dm5bi3aec
&u+%gnwh(9d+*'xi.e#36w/%4&0-h(ju2r3*po+m'e
zlgd9&%wi5m(*n,#qdghvu+e/1'b9c3-i&m(0djk%g2z+a.%&4c6wh0r,(b*
de'xwi59&*)ou2zlpa.sm+4(%1hvgcd)#,ex06w2'-yj9izbf3a.5&*8ue/c4p
okwsm+,g09(dby*#e2axk/1szr.swmh%*'5)qe&3wp34+qy,#3bycg)%a3/.4$
-j!9ivm0(t*q2lpouv6etg+x,#hbd&1k/a.5(w'xd%9s4*ken-pmz,#b&j/cok
0raswp(l6.i2r4n,vbz*cg1heds9vl0)a&uyy-(.5md&3w'2j#*z+4e(c
xtw/kgd6io0p,b&1k*hqsev'92u5aw#.z-)4(,biha*/cr.t4d0,p'bf2#asmzq
tl./4kjpcsou%0#g,&2eix(wh5t6b/a*p.d1s4s9&,#e)+bk/wsa)um%xg'v(
z.i*hc45xup9'vduss,#)q0rbkuvm2gna&k/-s3lep+.(zji5udcwhxk4n,#s*q
)bkou'59ixa.5064)/m&2%qye+s,zc1)u02rbtl-%ag(+whxt9z6cr.
4f3,y0mj'ok2lgdtb&zapiy19hc*'5e%mi.-k6w#xtrg04),*3ljh26b
(ae3owdz9&31n./45tmcr*x,'(bui5apv#-t0ljk26.dt4,zsq/c+b&osu3r
ypg!ax)q0l.61#293u%zu/m(cd-k4hv+e'50r,&lpu)6b#ajk2.iwzc*gh(0r4
l,9v62okkmkzba'1/ct.i0qk4,2ehxk-psdw'*%sj&zgsybiac#e)+.3oyy934
)u/0r,hm'v2lbwgpt9z6mc(k#*v/ei3a
1117 characters 49 different (each datum is count)
224 2202727271932203017292427172829302220 2273030282732 327272818342027 8182418203121301831221528
! # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z
! . . . . . . . . . . . . . . . . . . . . . . 1 1 . . . . . . . . . . . . . . . . . . . . . . . . .
# . . . . . . . 1 3 . 1 1 2 . . . 1 2 . . . . . 2 1 . . 3 . 1 1 . . . . 1 . . . 1 . 1 . . . . 1 . 1
$ . . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . . . . .
% . . . . 1 . . . 1 1 . . . . 1 1 . . 1 . . . 1 2 2 1 . . . 2 . . . . . 1 . . . 1 . 1 . . . 1 1 . 1
& . . . 1 . . . . 3 . 1 . . . 1 3 2 3 1 1 . . . . . . . . . . . . 1 2 1 1 . 1 . . 1 . . 2 . . . . 2
' . . . . . . 1 . 1 . . 2 . . . 1 1 1 . 4 1 . 2 . 2 . . 1 . . . . . . . . . 1 . . . . 1 . 3 1 4 . .
( . . . 1 . . . . 2 1 1 . 1 . 2 . . . 1 . 1 . 1 1 2 3 1 . . . . . 1 1 1 . . . 1 . . . 1 . . 2 . . 2
) . 1 . 1 . . . . . 2 1 . . 1 . . . . 1 . 1 . . 1 2 . . . . . . . . . . . . 1 . 3 . . . 4 . . . . .
* . 1 . 2 1 4 . 1 . . . . . 1 . . . 2 . . . 1 . . . 1 2 . . 1 3 1 . 1 . . 1 . 2 2 . 2 . . 1 . 1 . 1
+ . . . 1 . . . . 1 . 1 . 2 . . . . . 3 . . . . 1 2 . . 2 . . . . . . . 2 . . . 2 . 1 . . . 1 1 . .
, . 7 . . 2 1 1 1 1 . . . . . . . 1 . . 1 . 1 1 . 2 . 2 1 . 1 1 . . . . . . . 1 . . . 1 . 1 . . 1 2
- . . . 1 . 1 1 1 . . . . . . . . . . . . . . . . . . . . . . 1 1 1 3 . . . . 2 . . 1 2 . . . . 1 1
. . . . 1 . . 1 . 1 1 . 1 . 2 . . . 1 2 5 1 . . . . . 2 1 . . 1 4 . 1 . . . . . . . 2 1 . . . . . 1
/ . . . 1 2 . . . . . . 1 1 . 1 2 1 . 2 . . . . 2 . 5 . 1 . . . . . 1 . 2 . . . . . . 1 . . 1 . . .
0 . 1 . . . . 1 1 . . 1 1 . . . . 1 . 1 . 2 . 1 . . . 1 1 . . . . 1 . 2 1 . . 1 2 7 . . 1 . . . . .
1 . 2 1 . . 1 . 1 . . . . . 2 . . . . . . . . 1 . . . . . . . 2 . . 3 . . 1 . 1 . . 2 . . . . . . .
2 . 2 . 1 . 1 . . . . . . 1 . . . . . . . 3 . 1 2 . . . 2 . 1 . . 1 . 4 . . 1 . . 4 . . 2 . . . . 2
3 . . . . . . . . 1 . 2 1 1 1 . 1 . . 2 . 1 . . 3 1 . . . . 1 . . 1 . 2 1 . 3 . 1 1 . . 1 . 3 . . 1
4 . 1 1 . 1 1 2 3 1 1 2 . . 1 . . . . . 2 . . . . . 1 1 2 1 . 1 . . 2 1 . 2 . 1 . . 2 . . . . . . .
5 . . . . 1 . 1 1 . . . . . . 2 . . . . . . . 3 2 1 . . 2 . . . . . . . 2 . . 1 . 2 . 2 1 . . 1 . .
6 . . . . . . . . . . . . 2 . . 1 1 . 1 . . . . . 3 1 . 1 . 2 . 1 . . . 1 . . . . . . . 1 . 5 . . .
8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 . . . . .
9 . . . 1 4 1 3 . . 1 . . . . . . 1 3 . . . . . . . 1 1 . . . 1 4 . . . . . . . . . 2 . . 2 . . . 2
a . . . . 2 2 . 1 2 . . . 5 1 . . . 2 . . . . . . . 1 . 2 . 1 . . 1 . . . . . 2 . . 2 1 . . 1 3 . .
b . 1 . . 4 . 2 . 1 . . . . 1 . . . . . . . . 1 2 . . 1 1 2 . 1 3 . 3 . . . . . . . . 1 1 1 1 . 2 1
c . 1 . . 1 . 1 . 2 1 . . . . 1 1 . 1 2 . 1 . . . . . 2 . . 2 . . . . 2 2 . 1 . . 3 1 1 . . 1 1 . .
d . . . 1 2 . . 1 . 1 1 1 . . 1 1 1 . . . 1 . 1 . 1 1 . 1 . 1 . . 1 1 . 1 . 1 . . . 1 2 1 . 2 . . 1
e . 1 . 1 1 4 2 2 . 1 . . . 2 . . 1 1 . . . . . . . 1 1 . . . 2 3 . . . . 2 . 2 . . 1 1 . 1 . 1 . 1
f . . . . . . . . . . . . . . . . 1 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
g 1 . . . 2 1 1 1 . 1 1 . 1 . 3 1 1 1 . . . . . . . 1 4 . . . 2 . . 1 . . 2 . 1 . . 1 . . . . . . .
h . . . 1 . . 4 . . . . . . . 2 . 3 1 . 1 . . . 1 1 3 . 1 . . . . . . . 1 . . . 1 . . . . 3 . 4 . .
i . . . . 1 . . . 1 . 1 . 2 . 1 . 1 3 . 5 . . . 1 1 1 1 . . . 1 . . . . . . 1 . 1 . . . . 1 1 2 1 1
j 1 2 . . 1 1 . . . . . . . 1 . . . . . . . . 1 . . . . 1 . 1 2 2 . 3 . . . . 1 . . . . 1 . . . . .
k . 1 . 1 . . . . 2 . . 1 . 4 1 1 3 . 3 . 2 . 1 . . . . 2 . 1 . . 2 1 . 1 . 1 . . . 1 . 1 . 2 . . 2
l . . . . . . . . . . 1 1 2 . 1 . . . 1 . 1 . 1 2 1 . . 1 . 2 . . 2 . . . . . 3 1 . . . . . . . . .
m . . . 1 1 2 3 . . 2 1 1 . . 2 . 1 . . 1 . . . . . 2 1 1 . . 1 1 1 1 . . . . . . . 1 . . . . 1 . 2
n . . . . . . . . . . 3 1 1 . . . . . . . . . . 1 . . . . . . . . . . . . . 1 . . . . . . . 1 . . .
o . . . . . 1 . . . 1 . . . . 1 1 . . . . . . . . . . . . . . 1 . . 5 . 1 . . . . . 1 . 4 . 1 . 1 .
p . . . 1 . 1 1 . . 1 2 . 1 . . . . 1 . . . . 1 2 . 1 1 . . 1 . 1 . . . 1 . 3 . . . 1 1 1 1 1 . . .
q . . . . . . . 2 . . . 1 . 1 2 . 1 . 1 . . . . . . . 1 2 . . . . . 1 . . . . . 1 . 1 2 . . . . 2 .
r . . . . . . . . 2 . 3 . 4 . . . . 1 3 . . . 1 1 2 . . . . 1 . . . . . . . . . . . . . . . 1 . 1 .
s . . . 1 . . . . 2 . 2 . . 1 . 1 . 1 2 . . . 3 1 . . 1 1 . 1 . . 1 . . 3 . 1 . 1 . 1 . 1 . 3 . 1 2
t . . . . . . . . 3 . . . 2 . 1 1 . . 2 . 1 . 3 . 1 . . . . 2 . . . . 2 1 . . . . 1 . . . . 1 . . .
u . . . 2 . 1 . 1 . 2 . . . 2 2 . 2 2 1 1 . . . . 1 . 1 1 . . . 2 . . . 1 . . 1 . . 1 . . 3 . . 3 .
v . 1 . . . 1 1 . . 1 . . . 1 . . 1 . . . 2 . . . 1 . 1 . . 1 . . 1 . 1 2 . . 1 . . . . 2 . . . . .
w . 2 . . . 3 . . . . . . . 2 . . 2 1 . 1 . . . . . 1 1 . . 1 6 3 . . . 1 . . 2 . . 2 . . 1 . 1 . 1
x . . . . . . 1 1 . . 2 . . . 1 . 1 . . . . . . 1 . . 1 . . 1 . 1 1 3 1 . . . . . . . 3 2 . 1 . . 1
y . . . . . . . . 1 . 1 1 . . 1 1 . . . . . . 1 . 1 1 . 1 . . . . 1 . 1 . . 1 1 . . . . . . . . 2 .
z . . . . . . . . 1 2 2 2 1 . . . . . . . 2 . 1 1 2 2 . . . 2 . 1 1 1 2 . . 1 . 1 1 1 . 1 . . . . .
digram frequency: Pride and Prejudice (non-alphabetic characters removed)
536406 characters (each datum is ratio*10000; eg. 'a' ratio 777/10000, 'aa' ratio 1/10000)
777 169 251 416 1293 224 187 635 705 16 60 403 275 703 746 153 12 602 617 870 279 107 229 16 237 17
a b c d e f g h i j k l m n o p q r s t u v w x y z
a 1 30 24 47 0 12 18 2 30 0 11 55 29 149 1 17 0 79 96 107 10 28 9 0 23 0
b 5 0 . 0 78 . . 0 8 3 . 19 0 . 12 . . 6 3 2 21 0 . . 12 .
c 26 0 6 0 46 0 . 42 10 . 8 6 0 0 58 0 2 6 0 24 7 . 0 . 10 .
d 47 19 5 8 55 8 5 26 55 2 1 7 14 17 29 4 0 8 24 42 6 3 15 . 12 .
e 99 17 51 114 46 28 13 36 49 2 4 71 47 125 30 25 4 221 99 92 3 30 44 14 30 .
f 23 2 3 2 23 12 1 14 21 0 0 4 6 1 44 2 0 17 6 25 7 0 4 . 4 .
g 22 4 1 1 26 2 1 35 15 0 0 11 4 3 15 1 0 13 7 14 3 0 4 . 2 .
h 130 3 2 2 278 2 1 9 89 1 0 2 6 1 53 2 0 4 7 27 6 0 6 . 3 .
i 20 7 31 28 28 14 16 6 0 0 6 33 34 188 40 3 0 28 95 92 0 16 4 1 0 14
j 6 . . . 4 . . . 0 . . . . . 3 . . . . . 3 . . . . .
k 3 0 0 0 20 1 0 5 11 0 0 1 0 9 2 0 0 0 3 2 0 0 2 . 1 .
l 32 4 3 32 68 14 1 4 62 0 5 59 4 3 28 2 0 1 7 13 6 2 5 . 47 .
m 43 6 1 1 60 2 1 4 32 0 0 1 7 2 26 14 0 21 11 9 14 0 4 . 16 .
n 33 6 35 107 81 9 91 15 28 2 7 11 8 16 74 3 2 2 39 96 5 6 12 1 14 0
o 10 17 9 15 6 77 5 14 11 1 8 24 52 116 28 14 0 75 30 62 117 10 39 0 4 0
p 19 0 0 0 32 0 0 2 8 0 . 17 0 0 19 13 . 25 4 7 3 0 1 . 2 .
q . . . . . . . . . . . . . . . . . . . 0 12 . . . . .
r 46 12 22 26 142 13 6 16 48 1 3 13 18 14 45 7 0 15 52 47 7 5 15 . 27 .
s 54 15 15 7 78 11 5 66 56 1 2 8 13 11 50 20 1 5 53 90 30 3 19 . 4 .
t 54 13 9 7 87 7 2 279 84 1 2 20 14 6 114 6 1 19 27 54 17 1 25 . 19 1
u 12 5 21 6 8 1 16 2 8 0 1 33 7 27 1 9 0 49 33 36 0 0 3 0 0 0
v 7 . . . 80 . . . 16 . . . . . 4 . . 0 . . 0 . . . 0 .
w 53 1 1 1 34 1 0 46 49 0 0 2 2 10 20 0 0 2 3 3 0 0 2 . 0 .
x 1 0 3 . 1 0 . 0 1 . . . 0 . 0 5 0 . . 3 0 . 0 . 0 .
y 20 8 9 11 11 7 3 11 14 1 1 5 9 4 51 5 0 5 21 22 2 1 15 . 2 .
z 12 . . . 1 . . . 0 . . 0 . . . . . . . . . . 1 . 2 2
FOR NEXT TIME: make column width divisible by keylength KRWAOIBCZMBPKSMVMWFEJMNMFIVMXKOTZIDIZPSZOVDLQKYVPIJU CBREALOVDILGYNDHWEYUKNTMRQXDLPOUYNSTSAKSAKYVSCKUSTOG WZWIXYKCXQFEJASBIOXPOQNEDJOZQSSGCAREAAVQCAVMVOSOUWXL YWANOWPFDWBMXTAVOJESAVOACMSVPZKNUMCKYDWTQQYCGVNWKCUW BLSNYBYVYTWAGZSTLMXQXTZMWIBGAVCWPATWYSLYSNBQONVWPTOO FIBLYDSDSVMISADPOAJBSADWGZUMNOFBRMWAKBOZZIWKOBREKKRW YLKISLSNSADIDEEMXBWOFLKGDHWLSAMONMBGLYSPOQNEDJOZQUFQ FMBSABITSBJIBGWAFCCKBIHBOFZEJBKXZESZCBYCGVPQBMOPKBRA KTYVQBWMXAESHMMBODABSAKLKWKVKNKEOZDHSBRICBWMXQXPDISV FIWEPWBCWVDCBIWADPOMGVKTSSSQCSXOOVKAVAYQYKYNVISVSTST SIXDWTQQYCGVNWGAKNSZCTFIWMNAKBRMVICMXMCSAVDPOPSQXBSN YJIQDADQKVGRABOZQIGZQQYVSAKZSIFERWKLKWNIDEVBRMGOJSKB LELEOMXAFLDPOUFQFMBSABIAKIV
ghrjdtip gszjwc chahyc yzi zy kwfzdtisx ghrdhrp eji zy vhp ghrdhrp
__ ___ ._. ... . _._. ___ _.. . ... _ .. ._.. ._.. .._ ... . _.. _ ___ _.. ._ _.__ ..__.. ..._ .._. _.._ .._. __. _.. __. ..._ _.. ._ ..._ .._. _.. .._. ._ _.._ _.._ ..._ _.._ ._ ..._ ..._ ._ ..._ __. _.. .._. ..._ __. ..._ _.. ..._ _.._ __. __. ..._ _.. __. .._. _.. ..._ _.. _.. __. .._. _.._
u n i v e r s i t a t F U U X U S A J T S I E N C V R T M P T N A R
xli izspyxmsr sj xli sri-xmqi-teh Ycpgvcvcmc lkdpi pfi Rcnc-gjpkc em pfi 4pf aimpjkv co. Ep emawjoig c oigaketpedm dh c gjxgpepjpedm aetfik. .d-mryli-mk6iy8odbva+%7iv7mbv#o7-yrimh#-h.ola% b18.1y7-8y7hik7'm6og7o1-9aymro1-by71-7k1hi'+a7iyl/- +bi98a96+ry-logo6j8rik7l1i6/ysb-kmymrsh1-khsshi k7'mloy6/-+ry-loyh-m6sh1ykhsshi+ai98b9r+l-y6oaiv1hhi dydmeiccyhmyutwmgqmwgpxphvfcewgowprvgcwtq jalprfcmivgenmrfgcwcpgpeugnjftmmprqlepogw yzvfjgykvfkdkwcudifmvsitqqmwgpxphvfcelqkq alqlkngknjpvuytpwwqeptvgdwivmnpxvctaekphc issgygayplpaqkd bdpoajhniyzqmurouuciknlztkodata for 3rd cipher
196 characters 27 different (each datum is count)
2 3 16 3 8 6 7 2 13 1 8 11 7 16
2 7 3 10 12 5 7 2 15 8 10 8 4
# % ' + - . / 1 6 7 8 9 a b d g h i j k l m o r s v y
# . . . . 1 . . . . . . . . . . . . . . . . . 1 . . . .
% . . . . . . . . . 1 . . . 1 . . . . . . . . . . . . .
' . . . 1 . . . . . . . . . . . . . . . . . 2 . . . . .
+ . 1 . . . . . . . . . . 2 1 . . . . . . 1 . . 2 . . .
- . . . 2 . . . . . 1 1 1 . 1 . . 1 . . 2 2 3 . . . . 2
. . . . . . . . 1 . . . . . . 1 . . . . . . . 1 . . . .
/ . . . . 2 . . . . . . . . . . . . . . . . . . . . . 1
1 . . . . 4 . . . . . 1 . . . . . 2 1 . . . . . . . . 2
6 . . . 1 . . 2 . . . . . . . . . . 1 1 . . . 2 . 1 . .
7 . . 2 . 2 . . 1 . . . . . . . . 1 2 . 1 1 1 1 . . . .
8 . . . . . 1 . . . . . . 1 1 . . . . . . . . 1 1 . . 1
9 . . . . . . . . 1 . 2 . 1 . . . . . . . . . . 1 . . .
a . 1 . 1 . . . . . 1 . 1 . . . . . 2 . . . . . . . . 1
b . . . . 1 . . 1 . . . 1 . . . . . 1 . . . . . . . 2 1
d . . . . 1 . . . . . . . . 1 . . . . . . . . . . . . .
g . . . . . . . . . 1 . . . . . . . . . . . . 1 . . . .
h 1 . . . 1 1 . 2 . . . . . . . . 1 5 . . . . . . 2 . .
i . . 1 1 1 . . . 1 . . 2 . . . . . . . 3 . 1 . . . 2 2
j . . . . . . . . . . 1 . . . . . . . . . . . . . . . .
k . . . . . . . 1 1 3 . . . . . . 2 . . . . 1 . . . . .
l . . . . 1 . 1 1 . . . . 1 . . . . 1 . . . . 3 . . . .
m . . . . . . . . 2 . . . . 1 . . 1 . . 1 1 . . 3 . . 1
o . . . . . . . 2 1 1 . . 1 . 1 2 . . . . 1 . . . . . 2
r . . . 1 . . . . . . . . . . . . . 2 . . . . 1 . 1 . 3
s . . . . . . . . . . . . . 1 . . 4 . . . . . . . 2 . .
v 1 . . . . . . 1 . 1 . . 1 . . . . . . . . . . . . . .
y . . . . 2 . . . 2 3 1 . . . . . 1 . . 1 2 2 . 1 1 . .
length 4 substring frequencies a b c d e f g h i j k l m n o p q r s t u v w x y z 0 0 3 1 4 3 4 1 2 2 2 2 3 2 0 2 3 0 0 1 1 1 3 1 4 0 45 0.0385 0 0 2 1 1 2 3 1 3 1 3 1 1 1 0 8 3 1 1 4 2 2 3 0 1 0 45 0.0524 3 0 2 3 2 2 5 2 0 1 2 1 3 0 0 3 2 2 1 1 0 5 2 2 1 0 45 0.0405 2 0 4 1 1 1 3 0 1 0 1 2 4 2 2 4 2 1 1 1 1 3 4 0 2 1 44 0.0372 0.0422 length 5 substring frequencies a b c d e f g h i j k l m n o p q r s t u v w x y z 2 0 1 1 0 2 4 0 1 0 2 0 2 0 0 0 4 2 1 2 2 8 2 0 0 0 36 0.0741 0 0 3 0 0 5 5 0 0 2 1 2 3 1 1 4 3 0 1 0 0 0 1 0 4 0 36 0.0664 1 0 5 2 3 0 4 1 0 1 3 0 1 2 0 1 3 0 0 2 2 1 1 2 1 0 36 0.0463 2 0 2 3 2 0 0 0 0 1 0 2 4 2 0 10 0 0 1 1 0 0 2 0 3 1 36 0.0973 0 0 0 0 3 1 2 3 5 0 2 2 1 0 1 2 0 2 0 2 0 2 6 1 0 0 35 0.0621 0.0693 length 6 substring frequencies a b c d e f g h i j k l m n o p q r s t u v w x y z 1 0 4 1 0 0 3 3 0 1 0 1 5 0 0 3 1 0 0 1 1 4 0 0 1 0 30 0.069 1 0 3 0 0 2 1 0 1 0 2 1 1 1 2 3 0 1 1 2 1 3 3 0 1 0 30 0.0356 2 0 0 2 0 3 5 0 2 2 1 0 0 2 0 1 2 1 0 0 0 2 4 0 1 0 30 0.0578 1 0 2 2 1 1 4 1 1 0 1 0 2 0 0 5 2 1 1 2 1 0 1 0 1 0 30 0.0467 0 0 1 1 6 2 1 0 0 0 3 2 1 0 0 1 2 1 1 1 0 0 1 3 3 0 30 0.0601 0 0 1 0 1 0 1 0 2 1 1 2 2 2 0 4 3 0 0 1 1 2 3 0 1 1 29 0.0405 0.0516 gcw 21 qmwgpxphvfce 90