/Crypto_time_analysis

Performance graphs of various Cryptography algorithms RSA, SHA and Diffie Hellman Key Exchange

Primary LanguagePython

Cryptography operations time plotting

Operations:

RSA Operations

Plotting the Performance graphs of following operations of RSA cryptosystem using Cryptography library in Python.

Operations :

  • Encryption
  • Decryption
  • Key size

This is aimed at the recreation of the graph in Cryptography Book Chapter 6: Public Key Cryptography and RSA, Page 79, Figure 6.4.

Hash operations

Plotting the time(in microseconds) of Hash calculation for no. of iterations of for given input sizes using RSA cryptosystem using Cryptography library in Python.

Hash Functions:

Results

RSA time with key RSA time without key
RSA time with key RSA time without key
SHA 256 Hash time SHA 512 Hash time
SHA256 SHA512
SHA 224 Hash time SHA 384 Hash time
SHA256 SHA512

SHA Compared

SHA compared

Diffie Hellman Key Exchange

Diffie Hellman Key Exchange

Features

  • Ability to set starting key size, key size range, no of iterations per key size, time unit and y-axis ticks(labels).
  • Clubbing of points, multiple iteration and data average for error free data and smooth plot.
  • Saves and read data from respective data files in data_dump directory.

Setup

Clone this repo to your desktop and install the Libraries used using pip.

Usage

After you clone this repo to your desktop, go to its root directory and run with main.py file in your Python IDE respective graph matplotlib dialog with the output graph.

Libraries used

This project uses the following open source packages:

Cryptography Book 📔

Cryptography, Network Security, and Cyber Laws Book authored by Bernard L. Menezes | Ravinder Kumar. ISBN: 9789386858948 Edition: 1st Year : 2018

Constraints ⚠

  • RSA: Cryptography library used has limitation of minimum key size of 800 to avoid errors of Data too long for key size even for empty string.
  • SHA operations: due to quick execution, SHA operations are measured in bunch of operations.
  • Diffie Hellman Key Exchange: Cryptography library used has limitation of minimum key size of 512 bytes fixed.