Question
Implement the Tiny Encryption Algorithm (TEA) in Java. Use your TEA algorithm to encrypt the 64-bit plaintext block: 0x123456789abcdef Using 128 bit key: 0xa56babcdf000ffffffffffffabcdef01 For
Implement the Tiny Encryption Algorithm (TEA) in Java.
Use your TEA algorithm to encrypt the 64-bit plaintext block:
0x123456789abcdef
Using 128 bit key:
0xa56babcdf000ffffffffffffabcdef01
For Encryption:
(K[0],K[1],K[2],K[3]) = 128 bit key
(L,R) = plaintext (64-bit block)
delta = 0x9e3779b9
sum = 0
for i = 1 to 32
sum += delta
L += ((R<<4)+K[0]) XOR (R+sum) XOR ((R>>5)+K[1])
R += ((L<<4)+K[2]) XOR (L+sum) XOR ((L>>5)+K[3])
next i
ciphertext = (L,R)
For Decryption:
(K[0],K[1],K[2],K[3]) = 128 bit key
(L,R) = ciphertext (64-bit block)
delta = 0x9e3779b9
sum = delta << 5
for i = 1 to 32
R = ((L<<4)+K[2]) XOR (L+sum) XOR ((L>>5)+K[3])
L = ((R<<4)+K[0]) XOR (R+sum) XOR ((R>>5)+K[1])
sum = delta
next i
plaintext = (L,R)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started