SlideShare a Scribd company logo
2
Most read
5
Most read
6
Most read
Tiny Encryption Algorithm
(TEA)
Presented by Farah Al-Tufaili
Introduction
 The Tiny Encryption Algorithm (TEA) is one of the fastest and most efficient
cryptographic algorithms in existence.
 The Tiny Encryption Algorithm (TEA) is a symmetric (private) key encryption
algorithm created by
 David Wheeler and Roger Needham of Cambridge University and published in
1994
3/14/2015Tiny Encryption Algorithm 2
OVERVIEW OF TEA
 TEA is a symmetric key algorithm.
 TEA is designed to minimize memory footprint and maximize speed.
 It is a Feistel type cipher
 Achieves the Shannon's properties of complete diffusion and confusion with
out the employment of S & P boxes, after only six rounds but thirty two
rounds are recommended.
3/14/2015Tiny Encryption Algorithm 3
FUNCTIONALITY OF TEA
 Inputs to encryption algorithm are 64 bits of plain/cipher text , 128 bits of
key and output is a cipher/plain text.
 It performs operations on 32 bit words.
 Each round has 4 sub key k[i].
 Each half of message is used to encrypt the other half over 64 rounds of
processing and then combine to produce the cipher text block.
 A half block is processed and swapped iteratively and all operations are
performed on modulo 32‐bit
3/14/2015Tiny Encryption Algorithm 4
3/14/2015Tiny Encryption Algorithm 5
OPERATIONS PERFORMED IN A SINGLE
ITERATION
 Each round i has inputs Left[i-1] and Right[i-1], derived from the previous
round, as well as a sub key K[i] derived from the 128 bit overall K.
 The sub keys K[i] are different from K and from each other.
 Delta is defined as a constant, 2^32/(golden ratio), which is 2654435769 as an
integer.
 Multiples of delta are used in each round (mod 2^32), Delta is derived from
the golden number ratio to ensure sub keys to be different.
3/14/2015Tiny Encryption Algorithm 6
 In the first feistel round R is used as
an input to several operations. All
addition operations are (mod 2^32).
 1. R goes through a left shift of 4 and
then is added to K[0]
 2. R is added to Delta
 3. R goes through a right shift of 5 and
then is added to K[1]
 An XOR operation is then applied to
the result of those three operations
and finally, the result of
 the XOR operation is added to L. This
result then becomes R for the next
feistel round, because of the swap.
3/14/2015Tiny Encryption Algorithm 7
TEA has a 128 bit key that is split up into
four 32 bit subkeys, which can be seen as
K[3]in the diagram.
Delta is defined as a constant, 2^32/(golden
ratio), which is 2654435769 as an integer.
Multiples of delta are used in each round
(mod 2^32).
TEA Encryption Function
 void encrypt(unsigned long k[], unsigned long text[]) {
 unsigned long y = text[0], z = text[1];
 unsigned long delta = 0x9e3779b9, sum = 0; int n;
 for (n= 0; n < 32; n++) {
 sum += delta;
 y += ((z << 4) + k[0]) ^ (z+sum) ^ ((z >> 5) + k[1]);
 z += ((y << 4) + k[2]) ^ (y+sum) ^ ((y >> 5) + k[3]); }
 text[0] = y; text[1] = z; }
3/14/2015Tiny Encryption Algorithm 8
TEA decryption function
 void decrypt(unsigned long k[], unsigned long text[]) {
 unsigned long y = text[0], z = text[1];
 unsigned long delta = 0x9e3779b9, sum = delta << 5; int n;
 for (n= 0; n < 32; n++) {
 z -= ((y << 4) + k[2]) ^ (y + sum) ^ ((y >> 5) + k[3]);
 y -= ((z << 4) + k[0]) ^ (z + sum) ^ ((z >> 5) + k[1]);
 sum -= delta;
 }
 text[0] = y; text[1] = z;
 }
3/14/2015Tiny Encryption Algorithm 9
TEA in use
 void tea(char mode, FILE *infile, FILE *outfile, unsigned long k[]) {
 /* mode is ’e’ for encrypt, ’d’ for decrypt, k[] is the key.*/
 char ch, Text[8]; int i;
 while(!feof(infile)) {
 i = fread(Text, 1, 8, infile); /* read 8 bytes from infile into Text */
 if (i <= 0) break;
 while (i < 8) { Text[i++] = ' ';} /* pad last block with spaces */
 switch (mode) {
 case 'e': encrypt(k, (unsigned long*) Text); break;
 case 'd':decrypt(k, (unsigned long*) Text); break;
 }
 fwrite(Text, 1, 8, outfile); /* write 8 bytes from Text to outfile */
 }
 }
3/14/2015Tiny Encryption Algorithm 10
Thank you
3/14/2015Tiny Encryption Algorithm 11
Ad

Recommended

Matching techniques
Matching techniques
Nagpalkirti
 
A* Algorithm
A* Algorithm
Dr. C.V. Suresh Babu
 
Setting up computer servers (sucs)
Setting up computer servers (sucs)
Melchor Maravillas
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AI
vikas dhakane
 
Pareto Analysis
Pareto Analysis
Amey Shetti
 
Comparative Study and Performance Analysis of different Modulation Techniques...
Comparative Study and Performance Analysis of different Modulation Techniques...
Souvik Das
 
Disk partitioning
Disk partitioning
AnuragNarula5
 
Kali Linux Installation - VMware
Kali Linux Installation - VMware
Ronan Dunne, CEH, SSCP
 
Block Cipher and its Design Principles
Block Cipher and its Design Principles
SHUBHA CHATURVEDI
 
Bit Oriented Protocols in Data Communication DC23
Bit Oriented Protocols in Data Communication DC23
koolkampus
 
x.509-Directory Authentication Service
x.509-Directory Authentication Service
Swathy T
 
What is AES? Advanced Encryption Standards
What is AES? Advanced Encryption Standards
Faisal Shahzad Khan
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Mona Rajput
 
5. message authentication and hash function
5. message authentication and hash function
Chirag Patel
 
Elliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge Proof
Arunanand Ta
 
5 Cryptography Part1
5 Cryptography Part1
Alfred Ouyang
 
Cryptography.ppt
Cryptography.ppt
Uday Meena
 
Sha3
Sha3
Jyun-Yao Huang
 
Encryption And Decryption Using AES Algorithm
Encryption And Decryption Using AES Algorithm
Ahmed Raza Shaikh
 
Cryptography-Hash-Functions.pptx
Cryptography-Hash-Functions.pptx
AngeloChangcoco
 
Rsa rivest shamir adleman
Rsa rivest shamir adleman
Hossain Md Shakhawat
 
Transposition Cipher
Transposition Cipher
daniyalqureshi712
 
Idea(international data encryption algorithm)
Idea(international data encryption algorithm)
SAurabh PRajapati
 
symmetric key encryption algorithms
symmetric key encryption algorithms
Rashmi Burugupalli
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
Kathirvel Ayyaswamy
 
Chapter 9 morphological image processing
Chapter 9 morphological image processing
asodariyabhavesh
 
Triple Data Encryption Standard (t-DES)
Triple Data Encryption Standard (t-DES)
Hardik Manocha
 
Steganography
Steganography
Uttam Jain
 
A Cryptanalysis of the Tiny Encryption Algorithm Vikram Reddy Andem
A Cryptanalysis of the Tiny Encryption Algorithm Vikram Reddy Andem
Information Security Awareness Group
 
Tea Final
Tea Final
honeydewaccount
 

More Related Content

What's hot (20)

Block Cipher and its Design Principles
Block Cipher and its Design Principles
SHUBHA CHATURVEDI
 
Bit Oriented Protocols in Data Communication DC23
Bit Oriented Protocols in Data Communication DC23
koolkampus
 
x.509-Directory Authentication Service
x.509-Directory Authentication Service
Swathy T
 
What is AES? Advanced Encryption Standards
What is AES? Advanced Encryption Standards
Faisal Shahzad Khan
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Mona Rajput
 
5. message authentication and hash function
5. message authentication and hash function
Chirag Patel
 
Elliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge Proof
Arunanand Ta
 
5 Cryptography Part1
5 Cryptography Part1
Alfred Ouyang
 
Cryptography.ppt
Cryptography.ppt
Uday Meena
 
Sha3
Sha3
Jyun-Yao Huang
 
Encryption And Decryption Using AES Algorithm
Encryption And Decryption Using AES Algorithm
Ahmed Raza Shaikh
 
Cryptography-Hash-Functions.pptx
Cryptography-Hash-Functions.pptx
AngeloChangcoco
 
Rsa rivest shamir adleman
Rsa rivest shamir adleman
Hossain Md Shakhawat
 
Transposition Cipher
Transposition Cipher
daniyalqureshi712
 
Idea(international data encryption algorithm)
Idea(international data encryption algorithm)
SAurabh PRajapati
 
symmetric key encryption algorithms
symmetric key encryption algorithms
Rashmi Burugupalli
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
Kathirvel Ayyaswamy
 
Chapter 9 morphological image processing
Chapter 9 morphological image processing
asodariyabhavesh
 
Triple Data Encryption Standard (t-DES)
Triple Data Encryption Standard (t-DES)
Hardik Manocha
 
Steganography
Steganography
Uttam Jain
 
Block Cipher and its Design Principles
Block Cipher and its Design Principles
SHUBHA CHATURVEDI
 
Bit Oriented Protocols in Data Communication DC23
Bit Oriented Protocols in Data Communication DC23
koolkampus
 
x.509-Directory Authentication Service
x.509-Directory Authentication Service
Swathy T
 
What is AES? Advanced Encryption Standards
What is AES? Advanced Encryption Standards
Faisal Shahzad Khan
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Mona Rajput
 
5. message authentication and hash function
5. message authentication and hash function
Chirag Patel
 
Elliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge Proof
Arunanand Ta
 
5 Cryptography Part1
5 Cryptography Part1
Alfred Ouyang
 
Cryptography.ppt
Cryptography.ppt
Uday Meena
 
Encryption And Decryption Using AES Algorithm
Encryption And Decryption Using AES Algorithm
Ahmed Raza Shaikh
 
Cryptography-Hash-Functions.pptx
Cryptography-Hash-Functions.pptx
AngeloChangcoco
 
Idea(international data encryption algorithm)
Idea(international data encryption algorithm)
SAurabh PRajapati
 
symmetric key encryption algorithms
symmetric key encryption algorithms
Rashmi Burugupalli
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
Kathirvel Ayyaswamy
 
Chapter 9 morphological image processing
Chapter 9 morphological image processing
asodariyabhavesh
 
Triple Data Encryption Standard (t-DES)
Triple Data Encryption Standard (t-DES)
Hardik Manocha
 
Steganography
Steganography
Uttam Jain
 

Viewers also liked (9)

A Cryptanalysis of the Tiny Encryption Algorithm Vikram Reddy Andem
A Cryptanalysis of the Tiny Encryption Algorithm Vikram Reddy Andem
Information Security Awareness Group
 
Tea Final
Tea Final
honeydewaccount
 
Cryptography
Cryptography
Pratiksha Patil
 
Encryption And Decryption
Encryption And Decryption
NA
 
The SHA Hashing Algorithm
The SHA Hashing Algorithm
Bob Landstrom
 
Fungsi Hash & Algoritma SHA-256 - Presentation
Fungsi Hash & Algoritma SHA-256 - Presentation
Aditya Gusti Tammam
 
Cryptography and Encryptions,Network Security,Caesar Cipher
Cryptography and Encryptions,Network Security,Caesar Cipher
Gopal Sakarkar
 
Green Tea Presentation
Green Tea Presentation
jennifermcquay
 
Tea
Tea
Rohit Mohan
 
A Cryptanalysis of the Tiny Encryption Algorithm Vikram Reddy Andem
A Cryptanalysis of the Tiny Encryption Algorithm Vikram Reddy Andem
Information Security Awareness Group
 
Encryption And Decryption
Encryption And Decryption
NA
 
The SHA Hashing Algorithm
The SHA Hashing Algorithm
Bob Landstrom
 
Fungsi Hash & Algoritma SHA-256 - Presentation
Fungsi Hash & Algoritma SHA-256 - Presentation
Aditya Gusti Tammam
 
Cryptography and Encryptions,Network Security,Caesar Cipher
Cryptography and Encryptions,Network Security,Caesar Cipher
Gopal Sakarkar
 
Green Tea Presentation
Green Tea Presentation
jennifermcquay
 
Ad

Similar to Tiny encryption algorithm (20)

Design And Implementation Of Tiny Encryption Algorithm
Design And Implementation Of Tiny Encryption Algorithm
IJERA Editor
 
Extended of TEA: A 256 bits block cipher algorithm for image encryption
Extended of TEA: A 256 bits block cipher algorithm for image encryption
IJECEIAES
 
Randomness evaluation framework of cryptographic algorithms
Randomness evaluation framework of cryptographic algorithms
ijcisjournal
 
Renas Rajab Asaad
Renas Rajab Asaad
Renas Rekany
 
MIMO Wireless based Cryptosystem using Electronic Key Generation Unit
MIMO Wireless based Cryptosystem using Electronic Key Generation Unit
Association of Scientists, Developers and Faculties
 
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
editor1knowledgecuddle
 
Aes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_report
sakhi rehman
 
icwet1097
icwet1097
Sapna Agarwal
 
Unit V network management and security
Unit V network management and security
sangusajjan
 
AES by example
AES by example
Shiraz316
 
AES Presentation.pptx
AES Presentation.pptx
hammadhassan9507
 
Ft3111351140
Ft3111351140
IJERA Editor
 
AES Encryption
AES Encryption
Rahul Marwaha
 
Data encryption techniques and standard
Data encryption techniques and standard
Dr Sarika Jadhav
 
“Optimized AES Algorithm Core Using FeedBack Architecture”
“Optimized AES Algorithm Core Using FeedBack Architecture”
Nirav Desai
 
Conventional Encryption NS2
Conventional Encryption NS2
koolkampus
 
Implementation of aes and blowfish algorithm
Implementation of aes and blowfish algorithm
eSAT Publishing House
 
Chiffremtn asymetriqye AES Introduction.ppt
Chiffremtn asymetriqye AES Introduction.ppt
Mayouf3
 
Cybersecurity Research Paper
Cybersecurity Research Paper
Shubham Gupta
 
Encryption techniqudgfhgvj,hbkes (2).pptx
Encryption techniqudgfhgvj,hbkes (2).pptx
huachuhulk
 
Design And Implementation Of Tiny Encryption Algorithm
Design And Implementation Of Tiny Encryption Algorithm
IJERA Editor
 
Extended of TEA: A 256 bits block cipher algorithm for image encryption
Extended of TEA: A 256 bits block cipher algorithm for image encryption
IJECEIAES
 
Randomness evaluation framework of cryptographic algorithms
Randomness evaluation framework of cryptographic algorithms
ijcisjournal
 
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
editor1knowledgecuddle
 
Aes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_report
sakhi rehman
 
Unit V network management and security
Unit V network management and security
sangusajjan
 
AES by example
AES by example
Shiraz316
 
Data encryption techniques and standard
Data encryption techniques and standard
Dr Sarika Jadhav
 
“Optimized AES Algorithm Core Using FeedBack Architecture”
“Optimized AES Algorithm Core Using FeedBack Architecture”
Nirav Desai
 
Conventional Encryption NS2
Conventional Encryption NS2
koolkampus
 
Implementation of aes and blowfish algorithm
Implementation of aes and blowfish algorithm
eSAT Publishing House
 
Chiffremtn asymetriqye AES Introduction.ppt
Chiffremtn asymetriqye AES Introduction.ppt
Mayouf3
 
Cybersecurity Research Paper
Cybersecurity Research Paper
Shubham Gupta
 
Encryption techniqudgfhgvj,hbkes (2).pptx
Encryption techniqudgfhgvj,hbkes (2).pptx
huachuhulk
 
Ad

More from Farah M. Altufaili (10)

A Correlative Information-Theoretic Measure for Image Similarity
A Correlative Information-Theoretic Measure for Image Similarity
Farah M. Altufaili
 
Fp growth
Fp growth
Farah M. Altufaili
 
Stereo vision
Stereo vision
Farah M. Altufaili
 
Writing a good cv
Writing a good cv
Farah M. Altufaili
 
Virtual Private Network VPN
Virtual Private Network VPN
Farah M. Altufaili
 
Fuzzy image processing- fuzzy C-mean clustering
Fuzzy image processing- fuzzy C-mean clustering
Farah M. Altufaili
 
Principal component analysis
Principal component analysis
Farah M. Altufaili
 
Polygon mesh
Polygon mesh
Farah M. Altufaili
 
Nanotechnology and its impact on modern computer
Nanotechnology and its impact on modern computer
Farah M. Altufaili
 
Adversarial search
Adversarial search
Farah M. Altufaili
 

Recently uploaded (20)

Impact of Network Topologies on Blockchain Performance
Impact of Network Topologies on Blockchain Performance
vschiavoni
 
Enzyme Kinetics_Lecture 8.5.2025 Enzymology.pdf
Enzyme Kinetics_Lecture 8.5.2025 Enzymology.pdf
ayeshaalibukhari125
 
FYJC .Chapter-14 L-1 Human Nutrition.pdf
FYJC .Chapter-14 L-1 Human Nutrition.pdf
RachanaT6
 
Lesson 1 in Earth and Life Science .pptx
Lesson 1 in Earth and Life Science .pptx
KizzelLanada2
 
SCIENCE-G7-Quarter1-Week1-Day1.matatagpptx
SCIENCE-G7-Quarter1-Week1-Day1.matatagpptx
Pyumpyum
 
History of Nursing and Nursing As A Profession UNIT-3.pptx
History of Nursing and Nursing As A Profession UNIT-3.pptx
madhusrinivas68
 
Operationalising OGC Processes with Application Packages in ILIAD: A Service ...
Operationalising OGC Processes with Application Packages in ILIAD: A Service ...
Marco Amaro Oliveira
 
Science 8 Quarter 4 first quiz digestive system.docx
Science 8 Quarter 4 first quiz digestive system.docx
junefermunez
 
8,9-Red Blood Cells.pdf ayurveda for life
8,9-Red Blood Cells.pdf ayurveda for life
AnkitBhardwaj874048
 
SCIENCE-G7-Quarter1-Week1-Day5.matatagptx
SCIENCE-G7-Quarter1-Week1-Day5.matatagptx
Pyumpyum
 
Antibiotic and herbicide Resistance Genes
Antibiotic and herbicide Resistance Genes
AkshitRawat20
 
Overview of Stem Cells and Immune Modulation.ppsx
Overview of Stem Cells and Immune Modulation.ppsx
AhmedAtwa29
 
Death in Sleep Apnea: Who and How It Kills
Death in Sleep Apnea: Who and How It Kills
Richard Castriotta
 
What is Skeleton system.pptx by aahil sir
What is Skeleton system.pptx by aahil sir
bhatbashir421
 
Solution Chemistry Basics, molarity Molality
Solution Chemistry Basics, molarity Molality
nuralam819365
 
Climate and Weather_Science 9_Q3_PH.pptx
Climate and Weather_Science 9_Q3_PH.pptx
Dayan Espartero
 
Science 7 DLL Week 1 Quarter 1 Matatag Curriculum
Science 7 DLL Week 1 Quarter 1 Matatag Curriculum
RONAFAITHLOOC
 
EV REGENERATIVE ACCELERATION INNOVATION SUMMARY PITCH June 13, 2025.pdf
EV REGENERATIVE ACCELERATION INNOVATION SUMMARY PITCH June 13, 2025.pdf
Thane Heins NOBEL PRIZE WINNING ENERGY RESEARCHER
 
plant and animal nutrition..........pptx
plant and animal nutrition..........pptx
mayflorgalleno
 
Relazione di laboratorio Idrolisi dell'amido (in inglese)
Relazione di laboratorio Idrolisi dell'amido (in inglese)
paolofvesco
 
Impact of Network Topologies on Blockchain Performance
Impact of Network Topologies on Blockchain Performance
vschiavoni
 
Enzyme Kinetics_Lecture 8.5.2025 Enzymology.pdf
Enzyme Kinetics_Lecture 8.5.2025 Enzymology.pdf
ayeshaalibukhari125
 
FYJC .Chapter-14 L-1 Human Nutrition.pdf
FYJC .Chapter-14 L-1 Human Nutrition.pdf
RachanaT6
 
Lesson 1 in Earth and Life Science .pptx
Lesson 1 in Earth and Life Science .pptx
KizzelLanada2
 
SCIENCE-G7-Quarter1-Week1-Day1.matatagpptx
SCIENCE-G7-Quarter1-Week1-Day1.matatagpptx
Pyumpyum
 
History of Nursing and Nursing As A Profession UNIT-3.pptx
History of Nursing and Nursing As A Profession UNIT-3.pptx
madhusrinivas68
 
Operationalising OGC Processes with Application Packages in ILIAD: A Service ...
Operationalising OGC Processes with Application Packages in ILIAD: A Service ...
Marco Amaro Oliveira
 
Science 8 Quarter 4 first quiz digestive system.docx
Science 8 Quarter 4 first quiz digestive system.docx
junefermunez
 
8,9-Red Blood Cells.pdf ayurveda for life
8,9-Red Blood Cells.pdf ayurveda for life
AnkitBhardwaj874048
 
SCIENCE-G7-Quarter1-Week1-Day5.matatagptx
SCIENCE-G7-Quarter1-Week1-Day5.matatagptx
Pyumpyum
 
Antibiotic and herbicide Resistance Genes
Antibiotic and herbicide Resistance Genes
AkshitRawat20
 
Overview of Stem Cells and Immune Modulation.ppsx
Overview of Stem Cells and Immune Modulation.ppsx
AhmedAtwa29
 
Death in Sleep Apnea: Who and How It Kills
Death in Sleep Apnea: Who and How It Kills
Richard Castriotta
 
What is Skeleton system.pptx by aahil sir
What is Skeleton system.pptx by aahil sir
bhatbashir421
 
Solution Chemistry Basics, molarity Molality
Solution Chemistry Basics, molarity Molality
nuralam819365
 
Climate and Weather_Science 9_Q3_PH.pptx
Climate and Weather_Science 9_Q3_PH.pptx
Dayan Espartero
 
Science 7 DLL Week 1 Quarter 1 Matatag Curriculum
Science 7 DLL Week 1 Quarter 1 Matatag Curriculum
RONAFAITHLOOC
 
plant and animal nutrition..........pptx
plant and animal nutrition..........pptx
mayflorgalleno
 
Relazione di laboratorio Idrolisi dell'amido (in inglese)
Relazione di laboratorio Idrolisi dell'amido (in inglese)
paolofvesco
 

Tiny encryption algorithm

  • 2. Introduction  The Tiny Encryption Algorithm (TEA) is one of the fastest and most efficient cryptographic algorithms in existence.  The Tiny Encryption Algorithm (TEA) is a symmetric (private) key encryption algorithm created by  David Wheeler and Roger Needham of Cambridge University and published in 1994 3/14/2015Tiny Encryption Algorithm 2
  • 3. OVERVIEW OF TEA  TEA is a symmetric key algorithm.  TEA is designed to minimize memory footprint and maximize speed.  It is a Feistel type cipher  Achieves the Shannon's properties of complete diffusion and confusion with out the employment of S & P boxes, after only six rounds but thirty two rounds are recommended. 3/14/2015Tiny Encryption Algorithm 3
  • 4. FUNCTIONALITY OF TEA  Inputs to encryption algorithm are 64 bits of plain/cipher text , 128 bits of key and output is a cipher/plain text.  It performs operations on 32 bit words.  Each round has 4 sub key k[i].  Each half of message is used to encrypt the other half over 64 rounds of processing and then combine to produce the cipher text block.  A half block is processed and swapped iteratively and all operations are performed on modulo 32‐bit 3/14/2015Tiny Encryption Algorithm 4
  • 6. OPERATIONS PERFORMED IN A SINGLE ITERATION  Each round i has inputs Left[i-1] and Right[i-1], derived from the previous round, as well as a sub key K[i] derived from the 128 bit overall K.  The sub keys K[i] are different from K and from each other.  Delta is defined as a constant, 2^32/(golden ratio), which is 2654435769 as an integer.  Multiples of delta are used in each round (mod 2^32), Delta is derived from the golden number ratio to ensure sub keys to be different. 3/14/2015Tiny Encryption Algorithm 6
  • 7.  In the first feistel round R is used as an input to several operations. All addition operations are (mod 2^32).  1. R goes through a left shift of 4 and then is added to K[0]  2. R is added to Delta  3. R goes through a right shift of 5 and then is added to K[1]  An XOR operation is then applied to the result of those three operations and finally, the result of  the XOR operation is added to L. This result then becomes R for the next feistel round, because of the swap. 3/14/2015Tiny Encryption Algorithm 7 TEA has a 128 bit key that is split up into four 32 bit subkeys, which can be seen as K[3]in the diagram. Delta is defined as a constant, 2^32/(golden ratio), which is 2654435769 as an integer. Multiples of delta are used in each round (mod 2^32).
  • 8. TEA Encryption Function  void encrypt(unsigned long k[], unsigned long text[]) {  unsigned long y = text[0], z = text[1];  unsigned long delta = 0x9e3779b9, sum = 0; int n;  for (n= 0; n < 32; n++) {  sum += delta;  y += ((z << 4) + k[0]) ^ (z+sum) ^ ((z >> 5) + k[1]);  z += ((y << 4) + k[2]) ^ (y+sum) ^ ((y >> 5) + k[3]); }  text[0] = y; text[1] = z; } 3/14/2015Tiny Encryption Algorithm 8
  • 9. TEA decryption function  void decrypt(unsigned long k[], unsigned long text[]) {  unsigned long y = text[0], z = text[1];  unsigned long delta = 0x9e3779b9, sum = delta << 5; int n;  for (n= 0; n < 32; n++) {  z -= ((y << 4) + k[2]) ^ (y + sum) ^ ((y >> 5) + k[3]);  y -= ((z << 4) + k[0]) ^ (z + sum) ^ ((z >> 5) + k[1]);  sum -= delta;  }  text[0] = y; text[1] = z;  } 3/14/2015Tiny Encryption Algorithm 9
  • 10. TEA in use  void tea(char mode, FILE *infile, FILE *outfile, unsigned long k[]) {  /* mode is ’e’ for encrypt, ’d’ for decrypt, k[] is the key.*/  char ch, Text[8]; int i;  while(!feof(infile)) {  i = fread(Text, 1, 8, infile); /* read 8 bytes from infile into Text */  if (i <= 0) break;  while (i < 8) { Text[i++] = ' ';} /* pad last block with spaces */  switch (mode) {  case 'e': encrypt(k, (unsigned long*) Text); break;  case 'd':decrypt(k, (unsigned long*) Text); break;  }  fwrite(Text, 1, 8, outfile); /* write 8 bytes from Text to outfile */  }  } 3/14/2015Tiny Encryption Algorithm 10