QUIZ CMPE

advertisement
QUIZ CMPE-553 25.05.2005 (110 min, 2 points)
St. Name, Surname______________________________________ St.Id#_____________
Open books, notes!! Open books, notes!! Open books, notes!! Open books, notes!!
Instructor Alexander Chefranov
Task 1. (0.2 points) Show that group (M, *) (where M is a set of square 2*2 matrices, *
is a matrix multiplication) is not an abelian group.
Show that A*B<>B*A for some particular square matrixes with not zero determinant
Task 2. (0.2 points) Calculate in not more than 15 steps of multiplication:
15250 mod 13.
Show all intermediate steps
15 mod 13 = 2
152 mod 13 =4
154 mod 13 =3
158 mod 13 =9
1516 mod 13 =3
1532 mod 13 =9
1564 mod 13 =3
15128 mod 13 =9
15250 mod 13 = (15128 mod 13)*( 1564 mod 13)*( 1532 mod 13)*( 1516 mod 13)*( 158 mod
13)*( 152 mod 13) = ((9*3) mod 13)*((9*3) mod 13)*9*4) mod 13 = (1*1*9*4) mod 13=
36 mod 13 = 10
Task 3. (0.2 points) Solve equation
6x=5 mod 13
Show all intermediate steps
Find 6-1, by Extended Euclid, for example: 11. Then x=6-1*5 mod 13 = 11*5 mod 13 = 55
mod 13 = 3.
Task 4. (0.2 points) Find gcd(286, 428)
Show all intermediate steps
Gcd(286, 428) = gcd(428, 286) = gcd(286, 142) = gcd(142, 2) = gcd(2, 0) = 2
Task 5. (0.2 points) Find
15-1 mod 30
Show all intermediate steps
Inverse does not exist because numbers are not relatively prime (30=2*15)
Task 6. (0.2 points) Find
15-1 mod 31
Show all intermediate steps
Use Extended Euclid:
A=(1,0,31), B=(0,1,15)
Q=2
T=A-QB=(1,-2,1)
Hence, 15-1=-2=29. Actually, 29*15 mod 31=435 mod 31 = 1
Task 7. (0.2 points) Find multiplicative inverse for
b(x)= x 7  x 2  1 mod x 8  x 4  x 3  x  1 in GF(28)
Show all intermediate steps
Apply Extended Euclid:
A=(1,0, x 8  x 4  x 3  x  1 ) B=(0,1, x 7  x 2  1 )
Q=x
T=A-QB=(1, x, x 4  1 )
A=(0,1, x 7  x 2  1 )
B=(1, x, x 4  1 )
Q= x 3
T=A-QB=( x 3 , x 4  1 , x 3  x 2  1 )
A=(1, x, x 4  1 )
B=( x 3 , x 4  1 , x 3  x 2  1 )
Q=x+1
T=A-QB=( x 4  x  1 , x 5  x 4  1 , x 2  x )
A=( x 3 , x 4  1 , x 3  x 2  1 )
B=( x 4  x  1 , x 5  x 4  1 , x 2  x )
Q=x
T=A-QB=( x 5  x 3  x 2  x , x 6  x 5  x 4  x  1 , 1)
Hence, inverse is x 6  x 5  x 4  x  1
Task 8. (0.2 points) Compare efforts of brute-force and meet-in-the-middle attacks on
Double DES.
Efforts of MIM attack on Double DES is 256 on average. Efforts of brute force attack on
Double DES is 2111, which is significantly greater.
Task 9. (0.2 points) Assume that p=3, q=11. Encrypt and decrypt message M=5 using
RSA
Show all intermediate steps
N=pq=33
Fi=20
E=3 (say)
Gcd(e,fi)=1
e-1=d=7
C=Me mod n =53mod 33 = 26
Cd mod n = 267 mod 33 = ((676 mod 33) * (265 mod 33) ) mod 33 = ((16*16) mod 33
*(263 mod 33) ) mod 33 = (25*16*26) mod 33 = (4*26) mod 33 = 104 mod 33 = 5 = M
Task 10. (0.2 points) Determine what operations and in what number are necessary to
output next byte of generated by RC4 pseudo-random stream (fill a table with two
columns: Operation Name, Operation Number).
Operation
Operation Number
+
3
Mod
3
Swap
1
Store
4
Download