Considering the following mapping function g and the specified encryption algori
ID: 3583601 • Letter: C
Question
Considering the following mapping function g and the specified encryption algorithm, determine the hash of the message m= D716 using 4-bit blocks. Assume H0=1110. For simplicity, in the following, ek(x) is represented as e(k,x) where k is the key and x is the data to be encrypted.
g: Count the number of bits in the input, subtract it from 15, and express as a 4-bit binary. For example g(“1011”)= (15-3) in binary = ”1100” because there are thee 1s; similarly g(“0100”)= (15-1) in binary =”1110” because there is only one 1 in the input.
e(k,m) = k * m or bit-wise multiplication of k and m. For example, if k=”1100” and m=”0110”, e(k,m) = (1100) * (0110) = 0100;
Hash function: Hi = e(g(xi), Hi-1) XOR xi
(b) Repeat the above using the following hash function. Find the hash of m.
Explanation / Answer
Answer:
Consider fixed-length message of k bits here. o Variable-length message addressed later. • Fixed-length message and Fixed-length key message-length output o DES: 64-bit message, 56-bit key • If key length j is too small, insecure. If j is too large, expensive. • Want function S mapping k-bit msg to k-bit output such that: o For decryption, S must be 1-1 mapping from 2 K to 2 K . o For security, S must be “random”: • even if msg1 and msg2 differ in just one bit, • S(msg1) and S(msg2) differ in many bits (approx k/2 bits). o So S cannot be a “simple” function; so following are no good: S(msg) = msg key S(msg) = msg bits in reverse order