Skip to content

anmol372/basic_cryptography

Repository files navigation

basic_cryptography

program is to call different cryptographic functions and measure the speed of different cryptographic operations. For that purpose, it should create or read a small file of size 1KB and a large file of size 10MB. These can be randomly generated data or existing files of any type (of the specified size). The program is to implement the following functionalities: Create a 128-bit AES key, encrypt and decrypt each of the two files using AES in the CBC mode. AES implementations must be based on hardware implementation of AES, so ensure that your libraries are chosen or configured properly. Repeat part (a) using AES in the CTR mode. Repeat part (b) with a 256-bit key. Compute a hash of each of the files using hash functions SHA-256, SHA-512, and SHA3-256. Create a 2048-bit RSA key, encrypt and decrypt the files above with PKCS #1 v2 padding (at least v2.0, but v2.2 is preferred if available; it may also be called OAEP). Repeat part (e) with a 3072-bit key. Create a 2048-bit DSA key, sign the two files and verify the corresponding signatures. If creating a key takes two parameters, use 224 bits for the exponent sizes. If the hash function algorithm needs to specified separately, use SHA-256. Repeat part (g) with a 3072-bit DSA key (if the second parameter is required, use 256). 
 Include simple checking for correctness, namely, that computed ciphertexts decrypt to the original data and that signed messages properly verify. For each encryption algorithm, measure the time it take to generate a new key the total time it takes to encrypt each of the two files the total time it takes to decrypt each file, and also compute encryption speed per byte for both files and (v) decryption speed per byte for both files. For the signature scheme, measure the key generation time, and the time to produce a signature for both files the time to verify a signature on both of the files, and compute per-byte time for signing and signature verification for both files. Finally, for the hash functions, measure (i)the total time to compute the hash of both files and compute per-byte timings.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages