1
Frequency distribution:
P | C | S | U | R | V | G | H | D | E | Z | M | O | K | X | N | L | I | F | T |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 2 | 8 | 4 | 6 | 3 | 4 | 2 | 1 | 1 | 6 | 2 | 2 | 3 | 1 | 2 | 1 | 1 | 1 | 1 |
- First we notice there is a word
H
, and the only character that forms a word itself isa
; S
has a noticeable high frequency than other characters, I guess it'se
;- Three-character word
VCS
ends withe
, the most frequent word of this isthe
, that isV
ist
andh
stands forC
; RV
ends witht
, so we know thatR
isi
;RV RG H
has been likeit i* a
, soG
could bes
;GHOS
issa*e
now, soO
shall bem
;DESGVRZU
looks like**esti**
, the first word came to my mind isquestion
, soD
isq
,E
isu
,Z
iso
andU
isn
;ZM
is a two-character word going afterquestion
and starts witho
, the best match shall bequestion of
, that isf
representsM
;OZUSK
is nowmone*
, soK
has a great possibility ofy
;- I would split
SXSNKLZIK
into two parts,SXSNK
which looks likee*e*y
andLZIK
which looks like*o*y
, soSXSNK
shall beevery
and thusLZIK
could bebody
; PCSU
is a four-character word like*hen
, the most frequent ones arewhen
andthen
, so in this caseP
shall bew
;NSFRTRZU
contains the remaining two undecided characters, which areF
andT
, I did some word search because I couldn't recognize the pattern at first, and the first result isreligion
that quite makes sense;
Mapping:
P | C | S | U | R | V | G | H | D | E | Z | M | O | K | X | N | L | I | F | T |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
W | H | E | N | I | T | S | A | Q | U | O | F | M | Y | V | R | B | D | L | G |
Result:
When it is a question of money, everybody is of the same religion. -Voltaire
2
a) Pr[1] = Pr[a] * Pr[K1] + Pr[b] * Pr[K3] + Pr[c] * Pr[K2] = 1/2 * 2/3 + 1/3 * 1/6 + 1/6 * 1/6 = 5/12
b) Pr[b|1] = Pr[b] * Pr[K3] / Pr[1] = 1/3 * 1/6 / 5/12 = 2/15;
c) Pr[c|1] = Pr[c] * Pr[K2] / Pr[1] = 1/6 * 1/6 / 5/12 = 1/15;
d)
Pr[2] = Pr[a] * Pr[K2] + Pr[b] * Pr[K1] + Pr[c] * Pr[K3] = 1/2 * 1/6 + 1/3 * 2/3 + 1/6 * 1/6 = 1/3
Pr[3] = 1 - Pr[1] - Pr[2] = 1/4
H[C] = -(Pr[1] * log2Pr[1] + Pr[2] * log2Pr[2] + Pr[3] * log2Pr[3]) = -(5/12 * log25/12 + 1/3 * log21/3 + 1/4 * log21/4) = 3/4log23 + 2/3log24 - 5/12log25 = 1.5546
3
According to the cipher process e2(π(e1(M))), we shall use the multiplicative decipher with key 5
to decrypt the string first, and permutate the result with π = (2 3 1 4), finally decipher the result with autokey decipher with key 5
.
- First, use the multiplicative decipher to decrypt the string RXJNJPOEHLZGFPBV
- The reverse of
5
is21
- Starting with R, we calculate
R * 21 mod 26
, and we haveT
- Repeat this process, and we get TPHNHDIGRXFWBDVZ
- The reverse of
- Second, use the permutation decipher with π = (2 3 1 4) to decrypt the result
- Take the first 4 characters TPHN, put the 2nd char at 1st, 3rd char at 2nd, 1st char at 3rd and 4th at 4th, we have HTPN
- Repeat this process, and we get HTPNIHDGFRXWVBDZ
- Finally, use the autokey decipher to decrypt the result
- Take the first character H, the key is 5, so we calculate
H - 5 mod 26
and getC
, and useC
as the new key - Repeat this process, we have CRYPTOPRODUCTIVE as final result
- Take the first character H, the key is 5, so we calculate
4
- The formula given can be converted into zi = zi - 6 + zi - 4 mod 2
- We have initial stream 110101
- When we calculate the 7th number, we take the sum of 1st and 3rd number, mod 2, and get 1
- Repeat this process, we have result 110101100011101101
5
a)
Key Length Bits | 128 | 192 | 256 |
---|---|---|---|
Key Length Bytes | 16 | 24 | 32 |
# Rounds | 10 | 12 | 14 |
b)
r0 | r1 | r2 | r3 |
---|---|---|---|
12 | 67 | AB | EF |
23 | 78 | BC | 1A |
45 | 89 | CD | 2B |
56 | 9A | DE | 3C |
c)
r0 | r1 | r2 | r3 |
---|---|---|---|
12 | 67 | AB | EF |
78 | BC | 1A | 23 |
CD | 2B | 45 | 89 |
3C | 56 | 9A | DE |
d)
r0 | r1 | r2 | r3 |
---|---|---|---|
C9 | 85 | 62 | DF |
BC | 65 | A2 | 26 |
BD | F1 | 6E | A7 |
EB | B1 | B8 | 1D |
e)
r0 | r1 | r2 | r3 |
---|---|---|---|
85 | 62 | DF | C9 |
65 | A2 | 26 | BC |
F1 | 6E | A7 | BD |
B1 | B8 | 1D | EB |