MODULE 2 NOTES_RSA
MODULE 2 NOTES_RSA
3. If Bob wishes to send a confidential message to Alice, Bob encrypts the message
using Alice’s public key.
4. When Alice receives the message, she decrypts it using her private key. No
other recipient can decrypt the message because only Alice knows Alice’s
private key.
There is some source A that produces a message in plaintext X = [X1, X2, . . . ,XM].
The M elements of X are letters in some finite alphabet. The message is intended for destination B. B
generates a related pair of keys: a public key, PUb, and a private key, PRb. PRb is known only to B, whereas
PUb is publicly available and therefore accessible by A.
The intended receiver, in possession of the matching private key, is able to invert the transformation:
In this case,A prepares a message to B and encrypts it using A’s private key
before transmitting it. B can decrypt the message using A’s public key.
Because the message was encrypted using A’s private key, only A could have
prepared the message. Therefore, the entire encrypted message serves as a
digital signature.
It is impossible to alter the message without access to A’s private key, so the message
is authenticated both in terms of source and in terms of data integrity.
In this case, we begin as before by encrypting a message, using the sender’s private
key. This provides the digital signature. Next, we encrypt again, using the receiver’s
public key. The final ciphertext can be decrypted only by the intended receiver, who
alone has the matching private key. Thus, confidentiality is provided.
RSA
Requirements:
The RSA algorithm to be satisfactory for public key encryption, the following
requirementsmust be met:
1. It is possible to find values of e, d n such that “ Med mod n =M ” for all M<n
2. It is relatively easy to calculate “ Me mod n “ and “ Cd mod n “for M<n
3. It is infeasible to determine “d” given ‘e’ & ‘n’. The “ Med mod n =M ” relationship
holds if ‘e’ & ‘d’ are multiplicative inverses modulo Ø(n).
Ø(n) Euler Totient function
For p,q primes where p*q and p≠q.
Ø(n)= Ø(pq)=(p-1)(q-1)
by using
The resulting keys are public key PU = {7, 187} and private key PR = {23, 187}.
The example shows the use of these keys for a plaintext input of M= 88. For encryption,
Are distinct and consist of the integers form 1 through P-1 in some
permutation.
For any integer ‘b’ and ‘a’, here ‘a’ is a primitive root of prime number P, then
b≡ ai mod P 0 ≤ i ≤ (P-1)
The exponent i is refer as discrete logarithm or index of b for the base a,
mod P. The value denoted as ind a,p(b)
the key as
Step 4 two calculation produce identical results
Example:
proceeds as follows.
1. ‘D’ prepares for the attack by generating two random private keys XD1 & XD2
and thencomputing the corresponding public keys YD1 and YD2.
2. ‘A’ transmits ‘YA’ to ‘B’
3. ‘D’ intercepts YA and transmits YD1 to ‘B’. and D also calculates
At this point, Bob and Alice think that they share a secret key, but instead Bob and
Darth share secret key K1 and Alice and Darth share secret key K2. All future
communication between Bob and Alice is compromised in the following way.