Investigating cryptographic libraries

prapulmutyala
CRYPTOASSGNMNT2.docx

INVESTIGATING CRYPTOGRAPHIC LIBRARIES

1. One open-source cryptographic library for each of the following:

Java

javax.crypto

https://docs.oracle.com/javase/7/docs/api/javax/crypto/package-summary.html

C

OpenSSL

https://www.openssl.org/

C++

OpenSSL

https://www.openssl.org/

Python

pycrypto

https://www.dlitz.net/software/pycrypto/api/2.6/

2. Requirements necessary to use the following libraries

OpenSSL

HEADERS

# include "openssl/bio.h"

# include "openssl/ssl.h"

# include "openssl/err.h"

FUNCTIONS

int x = BIO_read(bio, buf, len);

if(x == 0)

{

/ Handle closed connection /

}

else if(x < 0)

{

if(! BIO_should_retry(bio))

{

/ Handle failed read here /

}

pycrypto

CLASSES

cryptography.fernet

FUNCTIONS

key = Fernet.generate_key()

f = Fernet(key)

Cipher

Decryption and encryption functionality of cryptographic is provided by this class

CipherInputStream

This class composes both cipher and inputStream such that data which has been processed by the Cipher is returned from underlying InputStream by use of read() method.

CipherOutputStream

CipherOutputStream class has Cipher and OutputStream so that before writing to underlying OutPutStream, write method processes data to be written.

KeyGeneratorSpi

This class is utilized to define and provide Service Provider Interface for the key generator class

3. Functions for the following

· Key generator

· Javax.crypto

generateKey()

· OpenSSL

RAND_get_rand_method()

· pycrypto

SHA and HMAC

· Hash function

· Javax.crypto

· OpenSSL

· SHA-1

· pycrypto

HMAC

· Block ciphers

· Javax.crypto

DES

· OPENSSL

Blowfish

· pycrypto

DES

· Stream ciphers

· Javax.crypto

HC-256

· OpenSSL

AES

· pycrypto

RSA PKCS#1

4. Description for above-mentioned functions.

· GenerateKey

Generate key function has been implemented to generate keys for a defined algorithm. Java Cryptography Architecture uses getInstance factory method to generate keys for defined KeyGenerator instances.

· RAND_method() (John G) .

OpenSSL uses this function to generate a random number. It is implemented to carry out the modification of methods. It is also used to implements such as hardware RNGs.

· SHA-1

It is a cryptographic function which produces a 160-bit hash from given input. The function is presented as a hexadecimal number. It has length 40 digits.

· HMAC

It is either keyed-hash message authentication or hash-based message authentication mechanism. It involves both secret cryptographic key and cryptographic hash a function.

· DES

National Institute of Standards and Technology developed Data Encryption Standard which is a block cipher. 16 round Feistel structure is employed in DES, it has a size of 64-bit. Despite the 64-bit key length, a 56 bits length is also effective since 8 bits of 64 bits are functionless and not used.

· Blowfish

It is a block cipher designed by Bruce Schneier in the year 1993. Blowfish has been used in most of encryption and cipher suites. Most software’s consider Blowfish since it gives a good encryption rate.

· HC-256

HC-256 cipher is a cipher stream intended to offer bulk encryption in software. Its security permits strong confidence and it has high speed. Estream cipher candidate permits 128-bit variant, HC-256 was selected among four contestants in software profile (hakur).

· AES

Advanced Encryption Standard (AES) is a symmetric block cipher. U.S government chose this encryption in order to provide security for information. Hardware and software use it to encrypt sensitive data .

Work cited

O'Grady, John G., et al. "Controlled trials of charcoal hemoperfusion and prognostic factors in fulminant hepatic failure." Gastroenterology 94.5 (1988): 1186-1192.

Wu, Hongjun. "A new stream cipher HC-256." International Workshop on Fast Software Encryption. Springer, Berlin, Heidelberg, 2004.

Thakur, Jawahar, and Nagesh Kumar. "DES, AES and Blowfish: Symmetric key cryptography algorithms simulation based performance analysis." International journal of emerging technology and advanced engineering 1.2 (2011): 6-12.