Navigation Menu

Skip to content

Hamza-Megahed/des-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  _    _   __     _                                        
 | \  |_  (_     /    _.  |   _       |   _.  _|_   _   ._ 
 |_/  |_  __)    \_  (_|  |  (_  |_|  |  (_|   |_  (_)  |  

----------------
DES Calculator :
----------------


introduction :

    DES Calculator is a program to encrypt and decrypt a plaintext over DES encryption algorithm , DES Calculator is mainly for educational purposes to calculate DES functions in each round in a binary form and then convert it to HEX form.

------
Note : 
------
       DES Calculator in only work under python3

Here is an example of one round :
================================================================================
==========
Round  10
==========

Expanded Right [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1]

Round Key [0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1]

XOR result [1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0]

F Function output [0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0]

Output of permutation function [1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1]

New Right [1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1]

New Left [1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1]
================================================================================

How To Use :

    To run DES Calculator (encryption algorithm)
	a- Via python3 interpreter 
	   python3 des-encryption.py
    	b- Via normal CLI
	1- chmod u+x des-encryption.py
	2- ./des-encryption.py

    To run DES Calculator (decryption algorithm)
	a- Via python3 interpreter 
	   python3 des-decryption.py
    	b- Via normal CLI
	1- chmod u+x des-decryption.py
	2- ./des-decryption.py


Copyright :

    DES Calculator is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    DES Calculator is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with DES Calculator.  If not, see <http://www.gnu.org/licenses/>.

About

DES-Calculator is to encrypt and decrypt over DES algorithm and give full details in each round, DES-Calculator works only under python3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages