Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 1016 Bytes

README.md

File metadata and controls

33 lines (19 loc) · 1016 Bytes

DES_CBC

This is a python script for encryption and decryption using the Data Encryption Standard (DES) algorithm in the Cipher Block Chaining (CBC) mode of operation .

Inputs :

Initial Vector IV : 64 bits binary vector
Text : ASCII chars
Key : string of 16 HEX chars

Example :

Encrypt the text="Adel Belasker" in CBC mode with the KEY="1f4f8a113b4a5d66" with initial vector IV=[0]*40+[1]*20+[0]*4 :

cypher_text=CBC_DES_ENC(IV,text,KEY)

Decryction:

original_text=CBC_DES_DEC(IV,cypher_text,KEY)

References :

For further details about how DES works , read this [PDF] .
and to learn about CBC mode , please visit this [link].

Author :

Adel Belasker
E-mail : adel.belasker@gmail.com
Linkedin : https://www.linkedin.com/in/belasker/