Hashing Algorithms Overview

Hashing Algorithms

            The process of converting large blocks of data into smaller and fixed size of representations by performing the mathematical functions is called hashing algorithms. This is the most commonly used encryption method which is a special kind of mathematical function that gives the one way encryption. This means that once the hash value of the data is generated using the hashing algorithm it is impossible to retrieve the plain text using the hash value. Ideally it is impossible to derive a same hash value for the two different plain texts. These hashing algorithms are publicly available and anyone can hash their file or messages to check the integrity of them.

There are two popular hashing algorithms which are widely in use; they are Secure Hash Algorithm (SHA) and Message Digest (MD).  These algorithms also provide authentication by appending the symmetric or asymmetric key to the message and performing the hash function on it, this is known as hashed Message Authentication Code or Keyed Hash. Both the hash algorithms support this and HMAC-SHA and HMAC-MD5 are used in TLS. 

This Project Paper is written & submitted by Deepak V.

Encryption And Decryption Using RSA

RSA being a block cipher the plaintext and cipher text must be integers between 0 and n-1 for some n. 

Encryption

  • Suppose A wants to send message M (M<n) to B.
  • Obtain the recipient B’s public key (n,e)
  • Find the exponentiation on M = Me [e is the B’s public key]
  • From the above value calculate the cipher text C of the plain text M

            C= Me mod n

  • Send this cipher text C to B. 

Decryption

  • B uses his private key (n,d) to compute the plain text M from the cipher text
  • I.e. M= Cd mod n.

Digital Signing/Signature Verification 

Digital Signature

  • Sender A creates a message digest of the chat message to be sent.
  • This digest should be an integer m between 0 and n-1.
  • Computes the signature S= md mod n using his private key (n, d).
  • Sends this signature S to B for verification.

 Deffi Hellman Key Exchange Algorithm

            This algorithm is developed by Whitfield Diffie and Martin Hellman in the year 1976, this is one of the oldest known algorithm used in most of the protocols (SSL, SSH, IPSec) for the secure exchange of shared secret between two parties over a network.

            This is a one kind of Symmetric key encryption algorithm in which both the parties use the same key for encryption and decryption. The algorithm is developed using fundamental mathematics that a high school student can understand. In this algorithm both the parties will agree up on a shared secret which is used to generate a symmetric key at both ends. The excellence of this algorithm is that a key won’t be travelling over a network by which eavesdropper can have accesses, only the shared secret used to develop the keys at both ends is travelled over a network.

This Project Paper is written & submitted by Deepak V.

Key Generation Using RSA

Key Generation Algorithm:

  • Generate two large random primes, p and q, such that their product is of the order 768 bits for personal use and 1024 bits for corporate use.
  • Compute n = pq where n is called as the modulus for encryption and decryption. (Modulus is the integer used to divide out by, in modular arithmetic.)
  • Compute Euler Quotient of n= (φ) phi = (p-1) (q-1).
  • Choose an integer e (this value is used for encryption), such that 1 < e < phi, which means e and (p-1)*(q-1) have only 1 as a common factor.
  • Compute the secret exponent d (this value is used for decryption), 1 < d < phi, the decryption exponent d can also be computed by solving, e.d=1 mod (φ) (n).
  • In the above calculation e, d are known as the public and private exponents.

The public key is (n, e) and the private key is (n, d). the other values used for generation of these keys (p, q, d) are kept along with private key or destroyed.

This Project Paper is written & submitted by Deepak V.

Ron Rivest Adi Shamir and Len Adleman (RSA) introduction

Ron Rivest, Adi Shamir and Len Adleman (RSA)

            RSA is the most powerful and widely used public key algorithm developed by Ron Rivest, Adi Shamir and Len Adleman in 1977 at MIT and hence was named in the name of its developers. It was published in the year 1978.

             The RSA is accepted all over the world as a powerful algorithm when compared to the symmetric  or private key cryptography algorithms, which supports only encryption by using  a same key at both ends like DES, Where as public key cryptography provides encryption and authentication at the same time to the end users. These keys are generated mathematically by choosing large prime numbers and the security of the algorithm is difficulty of factoring these large numbers most of the versions of RSA uses 154-digit or 512 bit keys. The selection of large prime numbers and the use of up-to-date implementations make the RSA algorithm more powerful.

            The RSA algorithm can be used for both public key encryption and digital signatures. Its security is based on the difficulty of factoring large integers. Here we are going to have a look at the three major operations that an RSA algorithm can perform.

1)      Key Generation.

2)      Encryption/Decryption.

3)      Digital Signing/Signature Verification.

This Project Paper is written & submitted by Deepak V.

Advantages and Disadvantages of Asymmetric or Public Key Cryptography

Advantages and Disadvantages of Asymmetric or Public Key Cryptography

Advantages:

  • Security is easy as only the private key must be kept secret.
  • Maintenance of the keys becomes easy being the keys (public key/private key) remain constant through out the communication depending on the connection.
  • As the number of keys to be kept secret become less.

Disadvantages:

  • This is not suitable for encryption of large messages as the encryption/decryption throughput is inversely related to the key length.

Digital Signature Algorithm (DSA):

            DSA is a secured public key encryption algorithm. DSA has been addressed by the National Institute of Standards and Technology (NIST) from the digital signature method defined by its Digital Signature Standard. This has been proposed as the substitution for the hand written signatures and it provides the attributes for authentication as a paper based document. It has been accepted all over the world and DSA is being implemented for business transactions and legal documents.

            DSA uses the private key for signing the document, for which it has been processed by the hashing algorithms (SHA-1 or MD5), and the resultant hash values and the private key are given as the input for the DSA to create the signature.

At the receiver end public key of receiver and sender key is used for the verification of the signature. With this the authentication and integrity of the message will be satisfied. Key’s used by DSA are in between 512 to 1024 bits which in turns makes DSA much slower. Hence RSA is used for authentication.

            Inspite of DSA being slower than RSA as the key size of the DSA is more which in turn makes encryption stronger. Hence we will be using this for the initial key establishment and handshaking when once it is completed we will be using symmetric key encryption algorithm (AES_128) for further communication of messages.

This Project Paper is written & submitted by Deepak V.

Difference between DES and AES Paper

Difference between DES and AES

  • DES was originally designed to run in specialized hardware and is considered “computationally expensive” on general-purpose processors. AES was designed to run efficiently on a variety of processors, including general-purpose ones.
  • AES is more secure when compared to DES as it uses large blocks for encryption and the algorithm is relatively complicated than AES. Possible number of AES 128-bit keys are 1021 times greater than DES 56-bit keys, hence it is  found that a machine that could recover a DES key in a second (I.e. try 255keys per second) , it takes 149 trillion years to crack a 128-bit AES key.

Asymmetric or Public Key Cryptography

            “Public-key cryptography” is one of the most reliable and secure cryptography algorithm. It is also known as asymmetric. In public-key cryptography, user has a pair of keys known as public key and private key, of which one is used for encryption and other the other one for decryption. The keys are related mathematically, but to derive either of the keys using the other one is practically impossible, hence the public key is distributed and is accessible to all the users and the private key is not revealed. If a sender wants to send a message he will encrypt the message with the recipient’s public key which is accessible widely among the internet and sends it to the recipient, at the other side the recipient will decrypt the message with his secret key.

This Project Paper is written & submitted by Deepak V.

RC4 DES TrippleDES Paper Presentation

 RC4

RC4 is known as the most popular symmetric stream ciphers in symmetric cryptography. With the random key generated by pseudorandom byte generator and with the input as a key K, a stream of 8 bits is generated, which is applied on a plaintext of individual bits or a byte at a time. Without the knowledge of input key K it is impossible to predict the pseudorandom generated key stream.

 DES

  • DES is a cipher or encryption algorithm which came into picture in the 1970’s.
  • The algorithm uses the Fiestel structure for encryption of the information; it uses 16 rounds of XOR operations. The encryption and decryption are carried out using sub keys which implement XOR and reverse XOR respectively.
  • DES used relatively smaller key size for encryption, which made it less secured when compared to the other algorithms. Hence triple DES and AES were implemented later which were more secured.
  • 3DES or Triple DES overcomes the drawbacks of the DES algorithm and was adopted as aUSstandard in 1977. 3DES uses three 64-bit long keys for encryption. Data encryption using TDES, is encrypted with the first key, decrypted with the second key, and finally encrypted again with the third key, which makes the key length to 192 bits.
  • TDES uses three steps of encryption to avoid the meet-in-the-middle-attacks, which are quiet common in double DES encryption. TDES also has a large key space than the 56 bit key of DES to secure against the brute force attacks.
  • In order to simplify interoperability between DES and TDES the middle step is usually decrypted (EDEmode): DES (k3; DES-1(K2; DES (k1; M))) where M is the message block and k1, K2, k3 as DES keys.

This Project Paper is written & submitted by Deepak V.

International Data Encryption Algorithm (IDEA) Seminar Topic

International Data Encryption Algorithm (IDEA)

IDEA is a block cipher encryption algorithm developed with the series of complaints on the key size of DES.  It is the advanced version of DES developed to overcome the problems faced in DES. Similar to DES it operates on the 64-bit block of data using a key length of 128 bits which makes it more secure. This 128 bit key is divided in to 52 16-bit sub keys and then these sub keys are implemented on the input message for encryption/decryption.

AES:

AES (Rijndael), one of the most accepted algorithm in symmetric key cryptography is the encryption standard adopted by the US government in the year 2001.It uses a series of linked mathematical operations (Substitution Permutation network) for the implementation of the encryption algorithm. The ease of implementing the algorithm makes it more popular when compared to the other algorithms. AES uses fixed block and key sizes which are large enough to provide security to the information up to the required secret levels. 

This Project Paper is written & submitted by Deepak V.

Advantages and Disadvantages of Symmetric Cryptography

Advantages and Disadvantages of Symmetric Cryptography:

Advantages:

  • Keys of encryption and decryption are small.
  • Using these there is a chance of generating stronger ciphers, with simple transformations.
  • These are used to have a higher rate of data throughput i.e. in a range of hundreds of mega bytes/sec in hardware implementations. Where as the implementation is software generates a throughput of mega bytes/sec.

Disadvantages:

  •  Being a single key at both ends, it should be kept secret at both ends.
  •   As the number of keys depends on the number of communicating parties, key stack in larger networks will be more which affects the maintenance.
This Project Paper is written & submitted by Deepak V.

Symmetric or Private Key Cryptography Seminar

Let’s look at the some of the Network Security and Software Development concepts, before going in to the further processes. 

Cryptography

Cryptography is one of the most important domains in the computer science department. Enigma machine is the widely known application used at the time of World War II by the German military to protect their sensitive communications. This is a technology used to exchange important data securely over a network hidden from eavesdroppers. This is achieved by encrypting the data at the transmission end and decrypting the data by the end user who is the receptor.

Cryptography protects information from theft or alteration and also provides user authentication. Cryptographic schemes are of three types:

  • Secret key (or symmetric) cryptography
  • Public-key (or asymmetric) cryptography
  • Hash functions

The initial unencrypted data is referred to as plaintext and is encrypted into cipher text, which is again decrypted to usable plaintext.

In our project we are implementing both the Cryptographic suites to make use of the advantages they provide. 

Symmetric or Private Key Cryptography

Symmetric key encryption is the process of encrypting and decrypting secret message using a same key, which is distributed to the members whoever is participating in the communication. The strength of the encryption depends on the size of the key used; trivially larger keys are used for encrypting larger blocks of data where it is very difficult to decrypt the data by eavesdropper for those who don’t have the key pair.

The number of keys required to encrypt the data depends on the number of persons communicating. It is given by the formula

Number of keys = [n+ (n-1)]/2.

Symmetric key cryptography is of two types “stream ciphers” and “block Ciphers”. Stream ciphers divide the message into bits and processes individual bits whereas Block ciphers take a number of bits at a time and divide them into blocks of a fixed size and processes them. In general a block of 64 bits has been used for encryption; in the latest versions approved by NIST i.e. Advanced Encryption Standard (AES) a block of 128 bits has been taken.

This Project Paper is written & submitted by Deepak V.