Implementation of RSA in python and Simulation of AES, DES, Triple DES using Crypttool

Implementation of RSA in python and Simulation of AES, DES, Triple DES using Crypttool

Public key cryptography, also known as asymmetric cryptography, uses two different but mathematically linked keys -- one public and one private. The public key can be shared with everyone, whereas the private key must be kept secret.

RSA implemented in python is demonstrated below

 

 

Encryption of a file with the AES cipher using the content of the component "Key" as key and the parameters of the AES component for key size, block mode and padding. For 128 bit AES you should enter 32 hex characters as key. Non-hex characters are extracted by the "StringDecoder" component

Fig 1. AES implementation using Crypttool

 

Data encryption standard uses cryptographic algorithm that can be used to protect electronic data. DES algorithm makes use of symmetric cryptographic method. Block cipher algorithm is used for encryption and decryption purpose and the message is divided into blocks of bits. DES processes the input data (Original message) of block size 64- bits and a secret key of 64-bits to provide a 64-bit cipher text.

 

Fig 2. DES visualization using Crypttool

 

Triple DES is the upgrade of traditional DES operation. It takes three 64-bit keys, for an overall key length of 192 bits. The procedure for encryption is exactly the same as regular DES, but it is repeated three times, hence the name Triple DES. The data is encrypted with the first key, decrypted with the second key, and finally encrypted again with the third key.

Fig 3. Triple DES simulation Crypttool

 

Message Digest Algorithm 5 (MD5) is a cryptographic hash algorithm that can be used to create a 128-bit string value from an arbitrary length string. MD5 (Message-Digest algorithm 5) is a widely used cryptographic hash function that results in a 128-bit hash value. The 128-bit (16-byte) MD5 message digest hashes typically are represented as 32-digit hexadecimal numbers (for example, ad57d3e696d289f2afd663725127abdc)

Fig 4. MD5 simulation in Cryptool