Lecture 2 Exercises and solutions

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

9
4
Exercise 3
pq 11 01 10 00 or 1 1 1 0
• P=‘melon’. What is the digest of P using 10101 as the block cipher key and OR as the function? • 1100 0100 1011 1110 1101 P in binary • 11000100101111101101 Blocked P 10101 Key Answer:
6
Exercise 4
pq 11 01 10 00 or 1 1 1 0
• P=‘melon’. What is the digest of P using a stream hash of 5 bits and OR as the function? • 1100 0100 1011 1110 1101 P in binary • 11000 10010 11111 01101 Blocked P 10010 = 11010 Answer:
1
Solution 1
• P=‘melon’. What is the digest of P using 10101 as the block cipher key and XOR as the function? • 1100 0100 1011 1110 1101 P in binary • 11000100101111101101 Blocked P 10101101011010110101 Answer:01101001110101011000 = 433496 0110 1001 1101 0101 1000 = ‘gjnfi’ Note the difference between the encryption algorithm (XOR) and the key Most encryption technologies can reveal the algorithm As long as the key is secret, decryption may not be possible But still the key has to be shared between A and B
2
Exercise 2
pq 11 01 10 00 xor 0 1 1 0
• P=‘melon’. What is the digest of P using a stream hash of 5 bits and XOR as the function? • 1100 0100 1011 1110 1101 P in binary • 11000 10010 11111 01101 Blocked P 10010 = 01010 ??? Answer:
3
Solution 2
pq 11 01 10 00 xor 0 1 1 0
• P=‘melon’. What is the digest of P using a stream hash of 5 bits and XOR as the function? • 1100 0100 1011 1110 1101 P in binary • 11000 10010 11111 01101 Blocked P 10010 = 01010 XOR 11111 = 10101 XOR 01101 = Answer: 11000 = 24
7
Biblioteka Baidu
Solution 4
pq 11 01 10 00 or 1 1 1 0
• P=‘melon’. What is the digest of P using a stream hash of 5 bits and OR as the function? • 1100 0100 1011 1110 1101 P in binary • 11000 10010 11111 01101 Blocked P 10010 = 11010 OR 11111 = 11111 OR 01101 = 11111 Answer: 11111 = 31 Comment about using OR as a stream hash?
5
Solution 3
• P=‘melon’. What is the digest of P using 10101 as the block cipher key and OR as the function? • 1100 0100 1011 1110 1101 P in binary • 11000100101111101101 Blocked P 10101101011010110101 Answer:11101101111111111101 = 974845 Extra: 1110 1101 1111 1111 1101= ‘onppn’
8
Exercise 5
• Alice wants to communicate with Bob with integrity and authenticity. Alice and Bob have not communicated before. How does Alice communicate with integrity and authenticity to Bob?
Exercise 1
pq 11 01 10 00 xor 0 1 1 0
• P=‘melon’. What is the digest of P using 10101 as the block cipher key and XOR as the function? • 1100 0100 1011 1110 1101 P in binary • 11000100101111101101 Blocked P 10101 Key Answer:
相关文档
最新文档