# Cryptography – Computer Networking

Cryptography – Computer Networking

#### Show Answer With Best Explanation

Explanation:
Caesar Cipher : The Caesar cipher is the simplest and oldest method of cryptography. The Caesar cipher method is based on a mono-alphabetic cipher and is also called a shift cipher or additive cipher. The Caesar cipher is a kind of replacement (substitution) cipher, where all letter of plain text is replaced by another letter. It is a type of substitution cipher in which each letter in the plain text is replaced by a letter some fixed number of positions down the alphabet. For example, with a left shift of 3, D would be replaced by A, E would become B, and so on.

Diffie-Hellman: Diffie–Hellman key exchange is a method of securely exchanging cryptographic keys over a public channel and was one of the first public-key protocols as conceived by Ralph Merkle and named after Whitfield Diffie and Martin Hellman. The Diffie–Hellman key exchange method allows two parties that have no prior knowledge of each other to jointly establish a shared secret key over an insecure channel. This key can then be used to encrypt subsequent communications using a symmetric key cipher.

#### Show Answer With Best Explanation

Explanation:
Step- 1. Choose two different random prime number p & q.
Step-2. Calculate n= pq.
Step-3. Calculate the totient: ϕ(n) = (p-1)(q-1).
Step-4. Choose an integer e such that 1< e < ϕ(n), e is co-prime to ϕ(n) i.e. e & ϕ(n) share no factors other than 1; gcd(e, ϕ(n))==1. e is released as the public key exponent
Step-5. Compute d to satisfy the congruence d*e ==1 mod(ϕ(n)). d is kept as the private key exponent.
Step-6. Computes the cipher text c=me mod n.
Step-1. Two prime number p = 3, q= 11.
Step-2. N = p*q = 3*11 = 33.
Step-3. ϕ(n)= (3-1)*(11-1) = 2*10 = 20.
Step-4. d*e ==1 mod(ϕ(n)).
7* 3==1 mod (20) , here value of e is 3.
Step-5. Cipher text c = me mod n
C = 193 mod 33
C = 6859 mod 33
C = 28
e(public key)=3
Cipher text c =28

error: Content is protected !!