M360 Mathematics of Information Security

advertisement
Dr. A. Betten
Fall 2005
M360 Mathematics of Information Security
exercise sheet # 3
Exercise # 1
(1 points)
Decipher the substitution cipher “task 2” on the web (in the web, go to: M360
class homepage → interactive cryptanalysis → substitution cipher). Hint for
task 2: h is an f.
Exercise # 2
(2 points)
When picking 2 successive cards from a standard 52-card deck, what is the
probability of:
a) The first card is an Ace and the second card is not a Queen?
b) The first card is Spade and the second card is not a Queen?
Exercise # 3
(1 points)
There are 50 cards numbered from 1 to 50. Two different cards are chosen at
random. What is the probability that one number is twice the other number?
Exercise # 4
(3 points)
a) Compute the gcd of 122 and 48 and write it in the form s · 122 + t · 48 with
s, t ∈ Z.
b) Solve the equation 10x + 15y + 12z = 1 with integers x, y, z.
c) Show that the equation 12x + 15y + 21z = 1 does not have a solution with
integers x, y, z.
Bonus: For a, b, c and d integers, under which conditions does the equation
ax + by + cz = d has integer solutions in x, y, z.
Exercise # 5
(3=1+1+1 points)
The German Enigma used during WWII had three wheels (or rotors) which
were serving as permutations σ1 , σ2, σ3. The wheels formed a sequence such
that the permutations were applied one after another as σ3(σ2(σ1(x))), where
x is the plaintext symbol. After that, a fixed permutation ρ was applied on the
“Umkehrwalze” (return roll). Finally, the inverses of the three permutations
were applied in reversed order, and a ciphertext symbol y was output.
In addition, once a letter was enciphered, the first permutation wheel was rotated by one step. If it happened to rotate from 25 to 0, then the second
permutation wheel was rotated once. If the second permutation wheel would
rotate from 25 to 0, the third permutation wheel would rotate once (just as we
know it from car odometers).
Also, a fixed initial rotation s1 , s2, and s3 of the three wheels was chosen at the
beginning (the key).
Build your own Enigma from the two attached sheets (just cut out the three
wheels from the second sheet and put them centered on top of the wheels on
the first sheet; cut along the inner circle!). The shift is the rotation to bring a
particular integer of the wheel under the ‘A’ position on the sheet. Note that
the permutations σ1 , σ2, σ3 (the wheels) are read from “outer to inner” on the
way down, and from “inner to outer” on the way back. The permutation ρ is
listed at the bottom, in the usual list notation, i.e. it is read from the top row
down to the bottom row. Rotate the wheels counterclockwise!
a) Use rotor settings s1 = 25, s2 = 13, and s3 = 7. Encrypt the message
HI
b) The rotor settings s1 = 24, s2 = 25, and s3 = 19 were used to produce the
ciphertext
QAV
Decrypt the message
c) Rotors 1 and 3 were interchanged with rotor settings s1 = 23 (the shift for
the top wheel), s2 = 3, and s3 = 7 to produce the ciphertext
SKNSL BOWU
Decrypt the message.
due to Friday, 9/16/05.
U
S T 2 V W
R 18 19 0 21 2
17 U X G M L 2
C
1
H I
F G
E 5 6 7 8 J
4 V J I T K9
R
Z A B C
Y 25 0 1
D
X 3 24 F P E B2 3
2 Q
N
A
M N O
L 2 13 14 P Q
1
Z Y 15 1
K 11
D
H
10 O
S6
W
U
S T 2 V W
R 18 19 0 21 2
17 N R Z Y V 2
K
2
H I
F G
E 5 6 7 8 J
4 J I G E A9
B
Z A B C
Y 25 0 1
D
X 3 24 W F C D2 3
2 X
H
U
M N O
L 12 13 14 P Q
K 11 P O Q S15 16
10 M
T
L
U
S T 2 V W
R 18 19 0 21 2
17 J G D A E 2
F
3
H I
F G
E 5 6 7 8 J
4 P Q R S T9
O
Z A B
Y 25 0 1 C D
X 3 24 B K L M2 3
2 I
N
H
M N O
L 2 13 14 P Q
1
1
5
X
K 11
Y
1
W
Z
10 V
C6
U
ABCDEFGH I J KLMNOP QR S TUVWXYZ
MJ DCY S X I HB ZNALVRTPF QWOUGEK
U
S T 2 V W
R 18 19 0 21 2
17 U X G M L 2
C
1
H I
F G
E 5 6 7 8 J
4 V J I T K9
R
Z A B C
Y 25 0 1
D
X 3 24 F P E B2 3
2 Q
N
A
M N O
L 2 13 14 P Q
1
Z Y 15 1
K 11
D
H
10 O
S6
W
U
S T 2 V W
R 18 19 0 21 2
17 N R Z Y V 2
K
2
H I
F G
E 5 6 7 8 J
4 J I G E A9
B
Z A B C
Y 25 0 1
D
X 3 24 W F C D2 3
2 X
H
U
M N O
L 12 13 14 P Q
K 11 P O Q S15 16
10 M
T
L
U
S T 2 V W
R 18 19 0 21 2
17 J G D A E 2
F
3
H I
F G
E 5 6 7 8 J
4 P Q R S T9
O
Z A B
Y 25 0 1 C D
X 3 24 B K L M2 3
2 I
N
H
M N O
L 2 13 14 P Q
1
1
5
X
K 11
Y
1
W
Z
10 V
C6
U
ABCDEFGH I J KLMNOP QR S TUVWXYZ
MJ DCY S X I HB ZNALVRTPF QWOUGEK
Download