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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!