Skip to content

O-Gamal/TEA-Tiny-Encryption-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TEA Tiny Encryption Algorithm

Security communication become more important today as a result increasing use of the electronic communication for many daily activities such as internet banking, online shopping.

To establish secure communication, Transmitted data must be encrypted to prevent attacking it using cipher algorithms.

Cipher

In our project transmitted data, be encrypted and decrypted using One of most efficient and fastest software encryption algorithms ever devised specially for mobile systems which has limited resource yet still concern in speed and area is Tiny Encryption Algorithm (known by its convenient acronym TEA).

Implement tea in C++ :

  • We implemented tea cipher to take input string [64-bit] in high level language to simplify the functionality of cipher. So we implemented these five functions :
  • Encryption
  • Decryption
  • Combine & Split >> Two helper functions.
  • TEA >> Then upgrade this code to work on multiple 64-bit blocks.

Implement TEA in assembly

Combine

  • This function combines every four characters in one integer.

  • The input is 8 chars so we need array of two integers

Combine

Encryption algorithm

Encryption

Split

  • This function the reverse operation of combine.

  • It uses the returned array from encryption or decryption, every 32-bit integer splitted into 4 chars.

Split

Decryption algorithm

Decryption

UPGRADE CODE TO WORK ON MULTIPLE BIT BLOCKS

Steps to implement this feature

  • Split the input into blocks of 8 chars.
  • Iterate on each block to combine and generate 2 integers.
  • encrypt these integers.
  • split the encrypted integers.
  • store the encrypted text in a new string.

This code works fine with a string of multiples of 8, other strings must be appended with (0x00)

TEA Demo animated video ⬇⬇⬇

Watch the Demo Animated Video

UPGRADE CODE TO BE INTERACTIVE

  • Message asks the user if he want to decrypt the text or not after printing the encrypted one.
  • Message asks the user if he want to encrypt another text.

Demo

TESTING THE PROGRAM :

Bug Description Issue Number Bug Status
Bug in main.asm when a char is encrypted to '\0' (NULL char) #38 Solved ✔
Bug in main.asm when a char is encrypted to ('\b' or '\f' or '\r') #39 Solved ✔
Bug in main.asm when we enter a large string then run the program again with a smaller size string the encryption output is wrong #42 Solved ✔
Bug in main.asm when we enter a large string then run the program again with a smaller size string the encryption output is wrong #43 Solved ✔
Bug in main.asm when we enter a large string then enter another string with lower size the encryption outputs wrong values #47 Solved ✔

Handling exceptions for key inputs

Handlingkey

Team Members:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published