written 5.2 years ago by | • modified 5.2 years ago |

**Subject**: Mobile Computing

**Difficulty**: Medium

**Marks**: 8 Marks

**1 Answer**

0

1.8kviews

What is public key cryptography and what are its components ? Explain the Diffie-Hellman Algorithm.

written 5.2 years ago by | • modified 5.2 years ago |

**Subject**: Mobile Computing

**Difficulty**: Medium

**Marks**: 8 Marks

ADD COMMENT
EDIT

0

20views

written 5.2 years ago by | • modified 5.2 years ago |

**Public key Cryptography:**
In this cryptography two different keys are used for encryption and decryption. Thos is also
called as Asymmetric key cryptography. It is based on mathematical functions rather than
permutation & substitution. The encryption key and decryption key form a key pair. One of the
key from the key pair is made public and the other is kept private or secret.
There are six main components

**Plaintext:**
Human readable message or data given to public key algorithm as input for encryption.

**Ciphertext:**

This is the scrambled data produced as output of the format of data produced as output of the encryption algorithm. This is unique data and depends only on the unique key used for encryption.

**Encryption Algorithm:**
It does computation and various transformations on the input plain text. The output of the
transformation is too garbled to be decipherable for an intruder.

**Decryption Algorithm:**
This algorithm does the reverse function of the encryption algorithm. This function accepts the
cipher text as input and does some transformation on the data so that the original data is
recovered.

**Public Key:**
This is one of the keys from the key pair. This key can be used either for encryption or
decryption.

**Private key:**
This is the other key from the key pair. This key is called the private key, because this is kept
secret. This can be used either for encryption or decryption.

**Diffie Hellman Algorithm:**

Consider Alice and Bob want to exchange the key

- Firstly, Alice and Bob agree on two large prime numbers, n and g. These two integers need not be kept secret. Alice and Bob can use an insecure channel to agree to them
- Alice chooses another large random number x, and calculates A such that : A =$g^{x}$ mod n
- Alice sends the number A to Bob.
- Bob independently chooses another large random integer y and calculates B such that: B =$g^{y}$ mod n
- Bob sends the number B to Alice.
- A now computers the secret key K1 as follows: K1= $B^{x}$ mod n
- B now computers the secret key K2 as follows: K2= $A^{y}$ mod n

ADD COMMENT
EDIT

Please log in to add an answer.