**1 Answer**

written 4.5 years ago by | • modified 4.5 years ago |

**a. Email Security :**

i. PGP (Pretty Good Privacy) :

It provides email with privacy, integrity & authentication.

It can be used to create a secure email message or to store a file securely for future retrieval.

PGP provides following service -

a. Message integrity

b. Message compression

c. Confidentiality with one time session key

d. Code conversion

e. Segmentation

**Working of PGP**

In PGP, the sends of the message needs to include the identifiers of the algorithm used in the message along with the value of the keys.

The broad-level steps are illustrated in the fig. below

As shown in the fig. PGP starts with a digital signature which is followed by compression, then by encryption then by digital enveloping & finally by base encoding.

PGP allows for four security options when sending an email message, these options are:

a. Signature only

b. Signature & base 64 encoding

c. Signature encryption enveloping

d. Base 64 encoding

ii. SIMIME (Secure Multipurpose Internet Mail Extension) :

SIMIME is similar to PGP, like PGP it also for digital signature & encryption of email messages.

In respect of the encryptographic algorithm, it prefers the usage of the following algorithms :

a. Digital signature standard (DSS) for algorithm digital signatures.

b. Define Hellman for encrypting the symmetric session keys.

c. RSA for either digital signatures or for encrypting the symmetric session keys.

d. DES-3 for symmetric key decryption .

**b. Diffie Hellman Algorithm :**

It is a way of generating a shared secret between two people in such a way that the secret can't be seen by overseeing the communication.

steps:-

A & B agree to use Modules p=23 & base g =5.

A chooses a secret unit a=4 & sends it to B, i.e.

A=$g^{a}$mod p = $5^{4}$mod 23 = 4

- B chooses a secret unit b=3 & sends it to A be

B=$g^{b}$mod p = $5^{3}$mod 23 = 10

- A computes S (secret key)

S=$B^{a}$mod p = $10^{4}$mod 23 = 18

- B computes S (secret key)

S=$A^{b}$mod p = $4^{3}$mod 23 = 18

Now they share a secret no. 18

$A^{b}$ mod p=$B^{a}$ mod p=$g^{ab}$ mod p

**c. El-Gamal Algorithm :**

- El-Gamal Crytography

El-Gamal cryptography works in 3 steps

a. Key generation

b. El-gamal encryption

c. El -gamal decryption

**a. Key generation :**

Select a large prime number 'p'

Select encryption key 'E'

Select decryption key 'D'

Select encryption key '$E_{2}$' such that

$E_{2}$ = $E_{1}$ mod P

from the set ($E_{1}$,$E_{2}$,P) & D

**b. El-gamal key encryption :**

steps:-

Select a random number 'r'.

Compare the first part of uphertext '$C_{1}$'.

$C_{1}$ =$E_{1}^{r}$mod P

- Compute the second part of uphertext '$C_{2}$'

$C_{2}$ =($E_{2}^{r}$mod P)* P

**c. El-gamal key decryption :**

1.Calculate the plaintext

$P_{T}$ =($C_{2}$ * ($C_{1}^{D-1}$)) mod P

Eg let PT = F

$E_{1}$ = 2

D=3

Random no. r = 4

- Key generation:

P=11,E=2,D=3

$E_{2}$ =$E_{1}^{P}$mod P =$2^{3}$mod 11 = 8 mod 11= 8

2.Encryption:

Random no. r=4

$C_{1}$ =$E_{1}^{r}$mod P=$2^{4}$mod 11 = 16 mod 11= 5

$C_{2}$ =$E_{2}^{r}$mod P * PT=7($8^{4}$mod 11) = 28672 mod 11= 6

Decryption:

PT =($C_{2}^{D-1} * C_{2}$)mod P=($5_{3-1} * 6$) mod 11 = 216 mod 11= 7