Module 4 - SC
Module 4 - SC
Module 4 - SC
SECURE COMMUNICATION
Module 4: Public Key Cryptography, RSA and Key Management
R
Key management, Distribution of public keys, Publicly available
directory, Public key authority, public key certificates,
A
Distribution of secret keys using public key
ra
cryptography
a
sh
Public-Key Cryptosystems
A public-key encryption scheme has six ingredients
Bu
R
1. Each user generates a pair of keys to be used for the
A
encryption and decryption of messages.
2. Each user places one of the two keys in a public register or
a
other accessible file. This is the public key.
ar
The companion key is kept private.
sh
❖Y = E(PUb, X)
❖The intended receiver, in possession of the matching
private key, is able to invert the transformation:
❖X = D(PRb, Y)
R
A
a ra
sh
Bu
Public-Key Cryptosystem: Authentication
R
A
ra
❖A prepares a message to B and encrypts it using A's
a
R
A
a
ar
R
1. Encryption/decryption: The sender encrypts a message
A
with the recipient's public key.
2. Digital signature: The sender "signs" a message with its
a
private key. Signing is achieved by a cryptographic
ar
algorithm applied to the message or to a small block of
sh
R
A
1. It is computationally easy for a party B to generate a pair
(public key PUb, private key PRb).
a
ar
2. It is computationally easy for a sender A, knowing the
sh
C = E(PUb, M)
R
4. RSA ALGORITHM
RSA algorithm is a public key encryption technique and is
A
considered as the most secure way of encryption. It was
a
invented by Rivest, Shamir and Adleman in year 1978 and
hence name RSA algorithm.
ar
2. Calculate n = pq = 17 x 11 = 187.
3. Calculate φ(n) = (p - 1)(q - 1) = 16 x 10 = 160.
Bu
R
887 mod 187 = [(884 mod 187) x (882 mod 187) x (881 mod 187)]
mod 187
881 mod 187 = 88
A
a
882 mod 187 = 7744 mod 187 = 77
ar
884 mod 187 = 59,969,536 mod 187 = 132
887 mod 187 = (88 x 77 x 132) mod 187 = 894,432 mod 187 = 11
sh
1123 mod 187 = [(111 mod 187) x (112 mod 187) x (114 mod 187) x
(118 mod 187) x (118 mod 187)] mod 187
R
A
………………………………………………………………………………………………………………………………………………………
a
Euler's Totient Function
ar
sh
n.
By convention, φ(1) = 1.
φ(10) = ?
Determine φ(37) and φ(35).
1, 2, 3, 4, 6, 8, 9, 11, 12, 13, 16, 17, 18, 19, 22, 23, 24, 26, 27, 29, 31, 32,
33, 34.
R
A
There are 24 numbers on the list, so φ(35) = 24.
a
It should be clear that for a prime number p, φ(p) = p-1
ar
sh
aφ(n) ≡ 1 (mod n)
Or aφ(n) (mod n) = 1
R
a = 3; n = 10; φ(10) = 4 aφ(n) =
34 = 81 (mod 10) = 1
φ(10) = 4 {1, 3, 7, 9}
A
a
ar
a = 2; n = 11; φ(11) = 10
aφ(n) = 210 = 1024 (mod 11) = 1
sh
Bu
Fermat’s theorem
R
Eg: a=2, p=3
A
aP-1 = 22 (mod 3) = 1
a
aP = 23 (mod 3) = 8 mod 3 = 2
ar
sh
Bu
Key management - Distribution of public keys,
Publicly available directory, Public key authority
R
● Public-key authority
● Public-key certificates
A
a
Public Announcement of Public Keys
ar
community at large.
major weakness : Anyone can forge such a public announcement.
That is, some user could pretend to be user A and send a
public key to another participant or broadcast such a public
key.
R
A
a
ar
1. The authority maintains a directory with a {name, public
sh
authority.
3. A participant may replace the existing key with a new one
at any time.
4. Participants could also access the directory electronically.
This scheme is clearly more secure than individual public announcements but still
has vulnerabilities. If an adversary succeeds in obtaining or computing the private
key of the directory authority, the adversary could authoritatively pass out
counterfeit public keys and subsequently impersonate any participant and
eavesdrop on messages sent to any participant.
Public-Key Authority
R
A
a ra
sh
R
A
a ra
sh
Public-Key Certificates
R
A
a ra
sh
Bu
R
A
a ra
sh
Bu
Distribution of Secret Keys Using Public-Key
Cryptography
R
A
ra
1. A generates a public/private key pair {PUa, PRa} and transmits a
message to B consisting of PUa and an identifier of A, IDA.
a
R
A
ra
1. A uses B's public key to encrypt a message to B containing an
identifier of A (IDA) and a nonce (N1), which is used to
a
R
➕please subscribe
ra
A
a
sh
Bu