Posts

Showing posts from November, 2021

Elgamal Cryptographic System

  1.  Elgamal Cryptographic System  : In 1984, T. Elgamal announced a public Key scheme based on discrete logarithms closely related to Diffie Hellman technique. This uses in some form in a number of standards including the digital signature(DSS) and the S/MIME e-mail standard.  Global Public Elements q Prime number α α < q and α a primitive root of q.   Key Generation by Alice Select Private Key Xa Xa < q-1 Calculate Ya Ya = α ^(Xa) mod q Public Key {q, α , Ya} Private Key Xa   Encryption by Bob with Alice’s Public Key Plaintext M < q Select random integer K K < q Calculate K ...

Diffie-Hellman Key Exchange

Image
  1.  Diffie-Hellman Key Exchange  : It is a kind of method of securily exchanging the cryptographic key over a public channel. Figure 1 explains the functionality of proposed algorithm. Fig. 1: The Diffie-Hellman Key Exchange Note 1. In Diffie-Hellman algorithm the key exchange by both the person say Bob and Alice are same.  Since We know that K = (Yb)^(Xa) mod q                                { as we know Yb =  α^(Xb) mod q)}   = (( α^(Xb) mod q))^(Xa) mod q  =  α^(XaXb) mod q  = (α^(Xa) mod q)^(Xb) mod q  = (Ya^(Xb) mod q) Hence, above calculation shows that both keys are same.    1.1 Man-in-the-Middle Attack  Since if the value is small then it can be easily break with brute force approach.  The protocol depicts in diffie hellman algorithm is insecure against a man in middle attac...

Public Key Cryptography and RSA

Image
1. Public Key Cryptography  :  Public key cryptography is also known as Asymmetric cryptography which uses the concept of two keys i.e. Public key and Private key. Generation of such key pairs depends on the cryptographic algorithm which are based on Mathematical problem termed as one-way function.  2. Principles of Public Key Cryptography : key distribution under symmetric encryption requires either  A. That two communicants already share a key, which somehow has been distributed to them or B. The use of Key distribution center. 3. Public Key Cryptosystem  : Asymmetric algorithm relay on one key for encryption and a different but related key for decryption. These algorithm have the following important characteristic.  A. It is computationally infeasible to determine the decryption key given only knowledge of the cryptographic algorithm and the encryption key. B. In addition, some algorithm, such as RSA, also exhibit the following characteristic- B.1. Eithe...

Pseudorandom Number Generation and Stream Cipher

Image
1.    The Use of Random Number   1.1 Key Distribution : Two parties communicating by exchanging keys. In many cases nonces are used for handshaking to prevent replay attacks.  1.2 Session Key Generation : Sometime a short key is needed during short period of time such as bank transactions.  2. How to check Randomness There are two ways to check randomness 2.1 Uniform Distribution : The frequency of occurrences of one and zero should be approximately equal. 2.2 Independence : No one subsequence in the sequence can be inferred  from the other. 3. How to Evaluate Random Number : 3.1 The function should be full period generating function. That is, the function should generate all the numbers from 0 through m-1 before repeating.  3.2 The generated sequence should appear random. 3.3 The function should implement efficiently with 32 bit arithmetic.  4. True Random Number Generation (TRNG) : It takes an Input as source which is effectively random source o...