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 .
Initial Vector IV : 64 bits binary vector
Text : ASCII chars
Key : string of 16 HEX chars
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)
For further details about how DES works , read this [PDF] .
and to learn about CBC mode , please visit this [link].
Adel Belasker
E-mail : adel.belasker@gmail.com
Linkedin : https://www.linkedin.com/in/belasker/