Skip to content

yoU-Jay/S-DES-Simplified-Data-Encryption-Standard-Algorithm-in-CPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

S-DES-Simplified-Data-Encryption-Standard-Algorithm-in-CPP

Simplified Data Encryption Standard (S-DES) is a simple version of the DES Algorithm. It is similar to the DES algorithm but is a smaller algorithm and has fewer parameters than DES. It was made for educational purposes so that understanding DES would become simpler.

Sample Output

Enter 10-bit Master Key (using space)
1 0 0 1 0 0 0 0 0 1 0

KEY GENERATION..

After P10 Permutation: 1 0 0 0 0 0 1 1 0 0 

After split, 
l = 1 0 0 0 0 
r = 0 1 1 0 0 

After LeftShift-1, 
l = 0 0 0 0 1 
r = 1 1 0 0 0 

After P8, Key-1: 1 0 1 0 0 1 0 0 

After LeftShift-2, 
l = 0 0 1 0 0 
r = 0 0 0 1 1 

After P8, Key-2: 0 1 0 0 0 0 1 1 
_____________________________________________________________________________

Enter e for Encryption | Enter d for Decryption | Enter b for Both
b
Enter 8-bit Plain Text (using space)
1 0 0 1 0 1 1 1

ENCRYPTING..

After IP: 0 1 0 1 1 1 0 1 

After split, 
l = 0 1 0 1 
r = 1 1 0 1 

Round Function(fk)-1
After EP: 1 1 1 0 1 0 1 1 

XOR with key
0 1 0 0 1 1 1 1 

After Split
l = 0 1 0 0 
r = 1 1 1 1 

After S-Box: 1 1 1 1 

After P4
1 1 1 1 

XOR with leftarray
1 0 1 0 

After combine
1 0 1 0 1 1 0 1 

After Swap
l = 1 1 0 1 
r = 1 0 1 0 

Round Function(fk)-2
After EP: 0 1 0 1 0 1 0 1 

XOR with key
0 0 0 1 0 1 1 0 

After Split
l = 0 0 0 1 
r = 0 1 1 0 

After S-Box: 1 1 1 1 

After P4
1 1 1 1 

XOR with leftarray
0 0 1 0 

After combine
0 0 1 0 1 0 1 0 

After IP-Inverse, 8-bit Cipher Text is: 
0 0 1 1 1 0 0 0 
_____________________________________________________________________________
IP
0 0 1 0 1 0 1 0 
Split
0 0 1 0 
1 0 1 0 
Round Function(fk)-1
After EP: 0 1 0 1 0 1 0 1 

XOR with key
0 0 0 1 0 1 1 0 

After Split
l = 0 0 0 1 
r = 0 1 1 0 

After S-Box: 1 1 1 1 

After P4
1 1 1 1 

XOR with leftarray
1 1 0 1 

After combine
1 1 0 1 1 0 1 0 

swap
1 0 1 0 
1 1 0 1 
Round Function(fk)-2
After EP: 1 1 1 0 1 0 1 1 

XOR with key
0 1 0 0 1 1 1 1 

After Split
l = 0 1 0 0 
r = 1 1 1 1 

After S-Box: 1 1 1 1 

After P4
1 1 1 1 

XOR with leftarray
0 1 0 1 

After combine
0 1 0 1 1 1 0 1 

After IP-Inverse, 8-bit Plain Text is: 
1 0 0 1 0 1 1 1 

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy