SlideShare a Scribd company logo
Trible Data Encryption Standard
(3DES)
Prepared by: Ahmed Mohamed
Ahmedmohamed.eece@gmail.com
Contents:
Introduction: a short history of DES
 Basic Terminology
 DES
 3DES
 Simulations
Introduction:
• The Data Encryption Standard (DES) is a symmetric-key block cipher published by
the National Institute of Standards and Technology (NIST).
• DES was developed as a standard for communications and data protection by an
IBM research team, in response to a public request for proposals by the NBS - the
National Bureau of Standards (which is now known as NIST).
Basic Terminology
• plaintext - the original message
• ciphertext - the coded message
• cipher - algorithm for transforming plaintext to ciphertext
• key - info used in cipher known only to sender/receiver
• encipher (encrypt) - converting plaintext to ciphertext
• decipher (decrypt) - recovering ciphertext from plaintext
• Permutation !
Permutation:
…….
……..
1 2 3 4 32
22 6 13 32 3
Input:
Output
0 0 1 0 1
1 0 1 1 1
1 bit
DES
Key: 64 bit quantity=8-bit parity+56-bit key
Every 8th bit is a parity bit.
64 bit input, 64 bit output.
DES STRUCTURE
Initial and Final Permutations
Continue
Example:
• Find the output of the initial permutation box when the input is given in
hexadecimal as:
• Solution:
Only bit 25 and bit 63 are 1s; the other bits are 0s. In the final permutation, bit 25
becomes bit 64 and bit 63 becomes bit 15. The result is
Initial Permutations VHDL Code
Note
DES top view
Permutation
Permutation
Swap
Round 1
Round 2
Round 16
Generate keys
Initial Permutation
48-bit K1
48-bit K2
48-bit K16
Swap 32-bit halves
Final Permutation
64-bit Output
48-bit K164-bit Input
56-bit Key
…...
DES
64 bit plaintext block
IP
L0 R0
L1=R0 R1=L0 f(R0,K1)
f
K1 (derived from
56 bit key)=48 bit
L16=R15
f
K16 (derived from
56 bit key)= 48 bit
IP-1
repeat 16 times…
64 bit ciphertext block
R16=L15 f(R15,K16)
32 32


Per-Round Key Generation
28 bits 28 bits
48 bits
Ki
One
round
Circular Left Shift Circular Left Shift
28 bits 28 bits
Permutation
with Compression,
PC-2
Initial Permutation of DES key ,PC-1
C i-1 D i-1
C i D i
Key generation:
• Parity-bit drop table:
Key-compression table:
Rounds
𝐿 𝑛 = 𝑅 𝑛−1
L0 R0
L1 R1
48 bit subkey
Generator
K48 = g(i,K56)
(The key for
each round is
deterministically
found from the
input 56 bit key).
Expansion Permutation
S-Box Substitution
P-Box Permutation
32
48
48
48
32
32
3232
32
Expansion P-box
• Since RI−1 is a 32-bit input and KI is a 48-bit key, we first need to expand RI−1 to
48 bits.
Continue
• Although the relationship between the input and output can be defined
mathematically, DES uses Table to define this P-box.
Expansion P-box VHDL Code
S-Boxes
• The S-boxes do the real mixing (confusion). DES uses 8 S-boxes, each with a 6-bit
input and a 4-bit output.
S-box rule
S-box
1
14 4 13 1 2 15 11 8
3 10 6 12 5 9 0 7
0 15 7 4 14 2 13 1
10 6 12 11 9 5 3 8
4 1 14 8 13 6 2 11
15 12 9 7 3 10 5 0
15 12 8 2 4 9 1 7
5 11 3 14 10 0 6 13
Pageselect
Example:
• The input to S-box 1 is 100011. What is the output?
• Answer:
• If we write the first and the sixth bits together, we get 11 in binary, which is 3 in
decimal. The remaining bits are 0001 in binary, which is 1 in decimal. We look for the
value in row 3, column 1, in Table (S-box 1).
• The result is 12 in decimal, which in binary is 1100. So the input 100011 yields the output
1100.
S-Box1 VHDL Code
And So on ..
Straight Permutation
Straight Permutation VHDL Code
Decryption
• The same algorithm as encryption.
• Reversed the order of key (Key16, Key15, … Key1).
• For example:
IP undoes IP-1 step of encryption.
1st round with SK16 undoes 16th encrypt round.
DES Security:
• Not too good:
• Trying all 256 possible keys
is not that hard these days.
• If you spend ~$25k you can build
a DES password cracker that can
will succeed in a few hours.
• The major criticism of DES regards its key length. Fortunately DES is not a group.
This means that we can use double or triple DES to increase the key size.
Triple DES - More Secure
True cryptographic strength of 3DES key is 2x56 bits = 112 bits
Ci  EK3
DK2
EK1
Pi   
Triple DES - More Secure
Triple DES with two keys
• Run DES three times
Why Encrypt then Decrypt then
Encrypt with 2 keys?!
• Backwards compatibility
• If K2 = K3, this is DES
E(D(E(P,K),K),K)= E(P,K)
C=E(D(E(P,K1),K2),K1)
P=D(E(D(C,K1),K2),K1)
Comparison
Simulation:K1=K2=K3: Encryption
Simulation:K1=K2=K3: Decryption
Simulation:K1=K3: Encryption
Simulation:K1=K3: Decryption
Simulation:K1≠K2≠K3: Encryption
Simulation:K1≠K2≠K3: Decryption
Any Questions ?
Thank You

More Related Content

What's hot (20)

PPTX
Public Key Cryptography
Gopal Sakarkar
 
PPT
Design and Simulation Triple-DES
chatsiri
 
PPTX
Cryptography
Rutuja Solkar
 
PPT
Cryptography Intro
Christopher Martin
 
PPTX
Key Management and Distribution
Syed Bahadur Shah
 
PPTX
DISCRETE LOGARITHM PROBLEM
MANISH KUMAR
 
PPTX
Symmetric encryption
DR RICHMOND ADEBIAYE
 
PPTX
Rsa Crptosystem
Amlan Patel
 
PPTX
Public Key Cryptosystem
Devakumar Kp
 
PPTX
Data Encryption Standard
Adri Jovin
 
PPTX
Double DES & Triple DES
Hemant Sharma
 
PPT
Cryptography
IGZ Software house
 
PPTX
RSA algorithm
Arpana shree
 
PPTX
Key management
Sujata Regoti
 
PPTX
RSA Algorithm
Srinadh Muvva
 
PPTX
Principles of public key cryptography and its Uses
Mohsin Ali
 
PPT
Network Security and Cryptography
Adam Reagan
 
PPT
AES.ppt
BincySam2
 
Public Key Cryptography
Gopal Sakarkar
 
Design and Simulation Triple-DES
chatsiri
 
Cryptography
Rutuja Solkar
 
Cryptography Intro
Christopher Martin
 
Key Management and Distribution
Syed Bahadur Shah
 
DISCRETE LOGARITHM PROBLEM
MANISH KUMAR
 
Symmetric encryption
DR RICHMOND ADEBIAYE
 
Rsa Crptosystem
Amlan Patel
 
Public Key Cryptosystem
Devakumar Kp
 
Data Encryption Standard
Adri Jovin
 
Double DES & Triple DES
Hemant Sharma
 
Cryptography
IGZ Software house
 
RSA algorithm
Arpana shree
 
Key management
Sujata Regoti
 
RSA Algorithm
Srinadh Muvva
 
Principles of public key cryptography and its Uses
Mohsin Ali
 
Network Security and Cryptography
Adam Reagan
 
AES.ppt
BincySam2
 

Viewers also liked (20)

PPT
AES Cryptosystem
هيثم فرج
 
PDF
Advanced Encryption Standard (AES)
Hardik Manocha
 
PPTX
Digital signature
Yash Karanke
 
PDF
Data Encryption Standard
Amirul Wiramuda
 
DOCX
Data encryption standard
Prasad Prabhu
 
PPT
Aes
Surya Kiran
 
PPT
Data encryption standard (des)
Mecheko Sha
 
PDF
cns 2marks
ilakiyadinesh
 
PPT
Digital signature
Hossain Md Shakhawat
 
PDF
Advanced Encryption Standard (AES) Implementaion using Java
Sunil Kumar R
 
PPSX
Advanced Encryption Standard (AES)
Amir Masinaei
 
PPT
Digital Signature
nayakslideshare
 
PPTX
Hash Function
Siddharth Srivastava
 
PPT
Introduction to Digital signatures
Rohit Bhat
 
PPTX
Substitution Cipher
Agung Julisman
 
PPT
Digital signature
AJAL A J
 
PPT
Digital Signature
saurav5884
 
PPTX
Aes (advance encryption standard)
Sina Manavi
 
PDF
AES-Advanced Encryption Standard
Prince Rachit
 
AES Cryptosystem
هيثم فرج
 
Advanced Encryption Standard (AES)
Hardik Manocha
 
Digital signature
Yash Karanke
 
Data Encryption Standard
Amirul Wiramuda
 
Data encryption standard
Prasad Prabhu
 
Data encryption standard (des)
Mecheko Sha
 
cns 2marks
ilakiyadinesh
 
Digital signature
Hossain Md Shakhawat
 
Advanced Encryption Standard (AES) Implementaion using Java
Sunil Kumar R
 
Advanced Encryption Standard (AES)
Amir Masinaei
 
Digital Signature
nayakslideshare
 
Hash Function
Siddharth Srivastava
 
Introduction to Digital signatures
Rohit Bhat
 
Substitution Cipher
Agung Julisman
 
Digital signature
AJAL A J
 
Digital Signature
saurav5884
 
Aes (advance encryption standard)
Sina Manavi
 
AES-Advanced Encryption Standard
Prince Rachit
 
Ad

Similar to Trible data encryption standard (3DES) (20)

PPTX
Information and network security 20 data encryption standard des
Vaibhav Khanna
 
PDF
4-DES.pdf
ShimoFcis
 
PPTX
M tech2
vinodkumar K
 
PDF
cryptography2 WHICH IS VERY IMPOTRANT.pdf
gadisagemechu1
 
PDF
DES (Data Encryption Standard) Algorithm
SamEhlinger
 
PPT
ch03_block_ciphers_nemo (2) (1).ppt
MrsPrabhaBV
 
PPTX
DES Presentation.pptx for Information Security, A common Subject
kashafbutt72
 
PDF
1 DES.pdf
nitin571047
 
PPT
section-8.ppt
DeepakPrajapati868260
 
PPT
data encryption standard algorithm in cryptography
sweetysinghal2
 
PPT
DATA ENCRYPTION STANDARD ALGORITHM , PPT
pg636002
 
PPT
CNS_06 DES ALGORITHM AND ITS IMPLEMENTAT
tpvvsreenivasarao
 
PPTX
Data Encryption standard in cryptography
NithyasriA2
 
PPTX
Software EngineeringModule 2 (Complete).pptx
20PZSB7038SachinP1
 
PDF
3-Block Ciphers and DES.pdf
MuhammadShoaibHussai2
 
PPT
DATA ENCRYPTION STANDARD (DES) / lucifer
sahadcse8bu
 
PPT
Data encryption standard
Vasuki Ramasamy
 
PPT
4255596.ppt
ShahidMehmood285010
 
PPT
Cryptography Symmetric Key Algorithm (CSE)
SoumyaBhattacharyya14
 
Information and network security 20 data encryption standard des
Vaibhav Khanna
 
4-DES.pdf
ShimoFcis
 
M tech2
vinodkumar K
 
cryptography2 WHICH IS VERY IMPOTRANT.pdf
gadisagemechu1
 
DES (Data Encryption Standard) Algorithm
SamEhlinger
 
ch03_block_ciphers_nemo (2) (1).ppt
MrsPrabhaBV
 
DES Presentation.pptx for Information Security, A common Subject
kashafbutt72
 
1 DES.pdf
nitin571047
 
section-8.ppt
DeepakPrajapati868260
 
data encryption standard algorithm in cryptography
sweetysinghal2
 
DATA ENCRYPTION STANDARD ALGORITHM , PPT
pg636002
 
CNS_06 DES ALGORITHM AND ITS IMPLEMENTAT
tpvvsreenivasarao
 
Data Encryption standard in cryptography
NithyasriA2
 
Software EngineeringModule 2 (Complete).pptx
20PZSB7038SachinP1
 
3-Block Ciphers and DES.pdf
MuhammadShoaibHussai2
 
DATA ENCRYPTION STANDARD (DES) / lucifer
sahadcse8bu
 
Data encryption standard
Vasuki Ramasamy
 
4255596.ppt
ShahidMehmood285010
 
Cryptography Symmetric Key Algorithm (CSE)
SoumyaBhattacharyya14
 
Ad

Recently uploaded (20)

PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
July Patch Tuesday
Ivanti
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 

Trible data encryption standard (3DES)

  • 1. Trible Data Encryption Standard (3DES) Prepared by: Ahmed Mohamed [email protected]
  • 2. Contents: Introduction: a short history of DES  Basic Terminology  DES  3DES  Simulations
  • 3. Introduction: • The Data Encryption Standard (DES) is a symmetric-key block cipher published by the National Institute of Standards and Technology (NIST). • DES was developed as a standard for communications and data protection by an IBM research team, in response to a public request for proposals by the NBS - the National Bureau of Standards (which is now known as NIST).
  • 4. Basic Terminology • plaintext - the original message • ciphertext - the coded message • cipher - algorithm for transforming plaintext to ciphertext • key - info used in cipher known only to sender/receiver • encipher (encrypt) - converting plaintext to ciphertext • decipher (decrypt) - recovering ciphertext from plaintext • Permutation !
  • 5. Permutation: ……. …….. 1 2 3 4 32 22 6 13 32 3 Input: Output 0 0 1 0 1 1 0 1 1 1 1 bit
  • 6. DES Key: 64 bit quantity=8-bit parity+56-bit key Every 8th bit is a parity bit. 64 bit input, 64 bit output.
  • 8. Initial and Final Permutations
  • 10. Example: • Find the output of the initial permutation box when the input is given in hexadecimal as: • Solution: Only bit 25 and bit 63 are 1s; the other bits are 0s. In the final permutation, bit 25 becomes bit 64 and bit 63 becomes bit 15. The result is
  • 12. Note
  • 13. DES top view Permutation Permutation Swap Round 1 Round 2 Round 16 Generate keys Initial Permutation 48-bit K1 48-bit K2 48-bit K16 Swap 32-bit halves Final Permutation 64-bit Output 48-bit K164-bit Input 56-bit Key …...
  • 14. DES 64 bit plaintext block IP L0 R0 L1=R0 R1=L0 f(R0,K1) f K1 (derived from 56 bit key)=48 bit L16=R15 f K16 (derived from 56 bit key)= 48 bit IP-1 repeat 16 times… 64 bit ciphertext block R16=L15 f(R15,K16) 32 32  
  • 15. Per-Round Key Generation 28 bits 28 bits 48 bits Ki One round Circular Left Shift Circular Left Shift 28 bits 28 bits Permutation with Compression, PC-2 Initial Permutation of DES key ,PC-1 C i-1 D i-1 C i D i
  • 17. • Parity-bit drop table: Key-compression table:
  • 18. Rounds 𝐿 𝑛 = 𝑅 𝑛−1
  • 19. L0 R0 L1 R1 48 bit subkey Generator K48 = g(i,K56) (The key for each round is deterministically found from the input 56 bit key). Expansion Permutation S-Box Substitution P-Box Permutation 32 48 48 48 32 32 3232 32
  • 20. Expansion P-box • Since RI−1 is a 32-bit input and KI is a 48-bit key, we first need to expand RI−1 to 48 bits.
  • 21. Continue • Although the relationship between the input and output can be defined mathematically, DES uses Table to define this P-box.
  • 23. S-Boxes • The S-boxes do the real mixing (confusion). DES uses 8 S-boxes, each with a 6-bit input and a 4-bit output.
  • 24. S-box rule S-box 1 14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7 0 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8 4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0 15 12 8 2 4 9 1 7 5 11 3 14 10 0 6 13 Pageselect
  • 25. Example: • The input to S-box 1 is 100011. What is the output? • Answer: • If we write the first and the sixth bits together, we get 11 in binary, which is 3 in decimal. The remaining bits are 0001 in binary, which is 1 in decimal. We look for the value in row 3, column 1, in Table (S-box 1). • The result is 12 in decimal, which in binary is 1100. So the input 100011 yields the output 1100.
  • 29. Decryption • The same algorithm as encryption. • Reversed the order of key (Key16, Key15, … Key1). • For example: IP undoes IP-1 step of encryption. 1st round with SK16 undoes 16th encrypt round.
  • 30. DES Security: • Not too good: • Trying all 256 possible keys is not that hard these days. • If you spend ~$25k you can build a DES password cracker that can will succeed in a few hours. • The major criticism of DES regards its key length. Fortunately DES is not a group. This means that we can use double or triple DES to increase the key size.
  • 31. Triple DES - More Secure True cryptographic strength of 3DES key is 2x56 bits = 112 bits Ci  EK3 DK2 EK1 Pi   
  • 32. Triple DES - More Secure Triple DES with two keys • Run DES three times Why Encrypt then Decrypt then Encrypt with 2 keys?! • Backwards compatibility • If K2 = K3, this is DES E(D(E(P,K),K),K)= E(P,K) C=E(D(E(P,K1),K2),K1) P=D(E(D(C,K1),K2),K1)

Editor's Notes

  • #8: The encryption process is made of two permutations (P-boxes), which we call initial and final permutations, and sixteen Feistel rounds.
  • #30: DES Decryption i) Use same function ii) Key is the key… Used in reverse order (K1,…, K16 becomes K16,…, K1) Right circular shift of 0-2 bits 0 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1) With DES it is possible to use the same function to encrypt or decrypt a block. The only difference is that the keys must be used in the reversed order. That is , if the encryption keys for each round are K1,K2,K3,…K16, then the decryption keys are K16, K15, K14, …,K1.The algorithm that generates the key used for each round is circular as well. The key shift is shown above.