Skip to content

Latest commit

 

History

History
64 lines (33 loc) · 1.54 KB

Homework 4 Xuenan Xu.md

File metadata and controls

64 lines (33 loc) · 1.54 KB

Homework 4

by Xuenan Xu GWID G26980825

 

1

X = 0xF32A = 1111 0011 0010 1010

Y = 0x32B1 = 0011 0010 1011 0001

a) X∧Y = 0011 0010 0010 0000

b) X⊕Y = 1100 0001 1001 1011

c) X + Y mod 232 = 1 0010 0101 1101 1011

d) ROTL5(X) = 0110 0101 0101 1110

e) ¬Y = 1100 1101 0100 1110

2

a) L = 058 101000

b) X = 0xAB56F11075 = 1010 1011 0101 0110 1111 0001 0001 0000 0111 0101

c) d = (447 - 40) mod 512 = 407

d) Y = 1010 1011 0101 0110 1111 0001 0001 0000 0111 0101 1 0465 10 1000

3

a) key-dependent

b) CBC

c) bidirectional

d) IBC

e) Stream cipher

4

M1 = 0xab56f110 = 1010 1011 0101 0110 1111 0001 0001 0000

A = 0x01234567 = 0000 0001 0010 0011 0100 0101 0110 0111

B = 0x89abcdef = 1000 1001 1010 1011 1100 1101 1110 1111

C = 0xfedcba98 = 1111 1110 1101 1100 1011 1010 1001 1000

D = 0x76543210 = 0111 0110 0101 0100 0011 0010 0001 0000

ti = 0xd76aa478 = 1101 0111 0110 1010 1010 0100 0111 1000

a) F(B, C, D) = (B ∧ C) ∨ ((¬B) ∧ D) = (1000 1000 1000 1000 1000 1000 1000 1000) ∨ (0111 0110 0101 0100 0011 0010 0001 0000) = 1111 1110 1101 1100 1011 1010 1001 1000

b) A + F(B, C, D) + M1 + ti = 10 1000 0010 1100 0001 1001 0101 1000 0111

c) ROTL7(A + F(B, C, D) + M1 + ti) = 01 0110 0000 1100 1010 1100 0011 1101 0000

e) B + ROTL7(A + F(B, C, D) + M1 + ti) = 1 1110 1010 0111 0110 1001 0001 1011 1111 = 0x1EA7691BF