首页 > > 详细

辅导 COMP3020J encryptors and decryptors 程序

COMP3020J – INFO SECURITY FOR IOT Practical
Assignment
Implement simple Feistel and TEA encryptors and decryptors
Notes:
This is a graded assignment and is worth 20% of final grade.
This can be implemented using a programming language of your choice. Use UTF-8 for text.
Implement both encryption and decryption, and verify recovery of the original input.
Part – A : 64-bit Feistel (4 rounds, keyed mixing)
Block size: 64 bits → split into two 32-bit halves (L0, R0) as written (high 32 bits =
L0, low 32 bits = R0)
Plaintext (hex): 0x1234DCBA5678EF90
Number of Rounds: 4
Subkeys:
K1 = 0x13579BDF, K2 = 0x2468ACE0, K3 = 0x0F0F0F0F, K4 = 0xF0F0F0F0
Round Function:
ROTL32 and ROTR32 are just rotate-left and rotate-right respectively on a 32-bit word.
Task: Encrypt to get the ciphertext (hex) and decrypt that ciphertext to recover the original
plaintext (hex). Also show the intermediate steps after each round.
Part – B : 16-bit Feistel (2 rounds, permutation-based F)
Block size: 16 bits → two 8-bit halves (L0, R0)
Plaintext (binary): 1011001110001110
Number of Rounds: 2
Subkeys: K1 = 0b10100101, K2 = 0b01011010
Permutation P over 8 bits (bit 0 = LSB):
  0, 2, 4, 6, 1, 3, 5, 7 P 
(even bits first, then odd bits)
Round Function (8-bit):  ,    F R K P R K  
(mask to 8 bits as needed)
Task: Encrypt to get the ciphertext (binary) and decrypt to obtain the original plaintext
(binary). Also show P(R) for each round.
 
32 , ( ) (( ROTL ,7 R 32 32 R K R K OTR mod2 ,1 ) 1) F R K    
Dr. Anca Jurcut P a g e | 2
COMP3020J – INFO SECURITY FOR IOT Practical
Assignment
Part – C : TEA block encryption/decryption (ECB & CBC)
Cipher: TEA with 32 rounds, delta 0x9E3779B9
Plaintext: We choose to go to the Moon in this decade and do the other things,
not because they are easy, but because they are hard.
Block: 64 bits; Key: 50645267556B58703273357638792F42 (hex - 128 bits)
Modes to implement:
ECB: split into 8-byte blocks; PKCS#7 padding
CBC: IV = 0x0001020304050607 (64-bit); PKCS#7 padding
Tasks:
1. Encrypt the message with ECB and CBC. Show the ciphertext in 8-byte blocks (hex),
one block per line.
2. Decrypt both ciphertexts and verify exact recovery of the original message (including
unpadding).
Submission Guidelines
For your submission, please prepare a 10 minutes recording of your presentation/
demonstration regarding your implementation. The recorded presentation should include:
 6 minutes discussion on your implementation on the source code of the algorithms
for encryption and decryption. (i.e., Explain how you coded the encryption and
decryption functions of Feistel network/TEA of each part)
 4 minutes presentation of your results of each part (demonstration of algorithms
execution)
Please submit the executable files of your application and the recorded presentation/
demonstration in Brightspace before 9th November, 11:59 pm.
Submissions received after the deadline will be subjected to penalties. The penalties for late
submission are as follows:
 Less than 15 minutes past the deadline - no penalty.
 Greater than 15 minutes and less than 2 hours past the deadline - loss of 25% of the
final mark.
 Greater than 2 hours past the deadline - loss of 50% of the final mark.
Video Submission:
The submitted video should not exceed 100 MB in size, or the length should not exceed
more than 10 min. If those limits are exceeded, there will be a 25% penalty applied.
联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!