Skip to main content

What is Diffie Hellman key exchange algorithm

What is Diffie Hellman algorithm ?

  • this algorithm use for security purpose and cryptographic analysis
  • diffie hellman algorithm popular for key exchange algorithm  
  • this algorithm used for communication purpose and security providing for massage passing 
  • this algorithm in two key are use for communication 
  • sender use personal key and receiver use personal key

Difffie Hellman Algorithm:-

step-1 : choose two large prime number N and Q.

step-2 : sender choose large number X and  calculate .A = Q^X mod N

step-3 : sender send A ----> receiver .

step-4 : receiver choose large number Y and calculate.B = Q^Y mod N 

step-5 : receiver send B ----> sender .

step-6 : and now sender calculate K1 using B.
              K1 = B^X mod N

step-7 : and then receiver calculate K2 using A.
              K2 = A^Y mod N

step-8 : if K = K1 = K2

Example of Diffie Hellman Algorithm :-

there for Q= 13 and N = 7

Sender Side :                                           Receiver Side :

X = 6                                                       Y = 2

A = G^X mod N                                     B = G^Y mod N
A = 13^6 mod 7                                      B = 13^2 mod 7
A = 1                                                       B =1

sender send ------------------A--------------> A=1
        B = 1 <-----------------B----------------Receiver send

K1 = B^X mod N                                   K2 = A^Y mod N
K1 = 1^6 mod 7                                     K2 = 1^2 mod 7
K1 = 1                                                    K2 = 1

                               K1 == K2  diffie hellman proved 

NOTE --- Children have ease, so Q and N are taken small really work on algorithm Q and N large .

This algorithm in mid-in-the-middle attack possible


Popular posts from this blog

Explain Playfair Cipher and with examples

What is playfair cipher :- The Playfair cipher was the first techniques of inversions encrypted massage.  playfair cipher is also known as substitution techniques  playfair cipher is use in simple text to convert to a cipher text.cipher text is not human understandable massage form it is also encrypted form  The scheme given by Charles Wheatstone in 1854.but was named after Lord Playfair who promoted the use of the cipher. this techniques are easy and secure for attackers and hackers for some important areas.

1)Generate the key Matrix(5×5):The key Matrix is a 5×5 of alphabets that acts as the key for encrypting the plaintext. Each of the 25 alphabets must be unique and one letter of the alphabet is omitted from the table. If the plaintext contains J, then it is replaced by I.
The initial alphabets in the key square are the unique alphabets of the key in the order in which they appear followed by the remaining letters of the alphabet in order.
2)Algorithm to encrypt the plain text:The plai…

how to work Caesar Cipher real time

what is Caesar Cipher: -  The Caesar Cipher technique is one of the earliest and simplest method of encryption technique.Caesar cipher is also known as primary techniques for substitution techniques.This techniques are easy and normally change of massage secure but no then of any other techniques Caesar cipher in mainly swift 2,3 or 4 elements this techniques are easy to identify and easy to found which number of elements are swift.hacker and attacker easy to encrypted massage gain for this technique uses.Caesar cipher is very easy to use and simple techniques it is this technique are not use real time.    used in elements A=0, B=1, C=3, ............... Z=25.predefined cipher text. Algorithm for Caesar Cipher:Input:A String of lower case letters, called Text.An Integer between 0-25 denoting the required shift.
first of all text and cipher text defend for first step.than see the plain text of given in definition .and first step in defend plain text to convert cipher text.