Beruflich Dokumente
Kultur Dokumente
Shamir
Adleman
1
RSA: Algorithm
Just like the public key cryptography, in RSA the encryption
key is public and the decryption key is private, which is
kept secret. In RSA, this asymmetry is based on the
practical difficulty of factoring the product of two
large prime numbers.
RSA gets its security from the difficulty of factoring
large numbers. The public and private keys are functions
of a pair of large prime numbers (100 to 200 digits or even
larger).
A user of RSA creates and then publishes a public key
based on the two large prime numbers, along with an
auxiliary value. The prime numbers must be kept secret.
Anyone can use the public key to encrypt a message, but
with currently published methods. If the public key is large
enough, only someone with knowledge of the prime
numbers can feasibly decode the message.
RSA: Algorithm
The RSA algorithm can be analyzed in three
phases:
1.
2.
3.
4.
KB
KB
6
Analyze: Key
Generation
RSA Example:
Consider that Alice wants to a message whose
equivalent binary bit pattern is 00001100 to Alice
Now Alice chooses p=5, q=7. Then n=35, z=24.
e=5 (so e, z relatively prime).
d=29 (so ed-1 exactly divisible by z).
Encrypting 8-bit messages.
encrypt:
bit pattern
me
00001100
12
24832
c = me mod n
17
RSA Example:
Now at the receiver end Bob receives 17 as the
ciphertext. Then Bob decrypt the ciphertext to
recover the plaintext.
decrypt:
c
17
d
c
m = cd mod n
481968572106750915091411825223071697
12
11
RSA Example
= m1 mod n
=m
13
14
References
http://en.wikipedia.org/wiki/
Applied Cryptography by Bruce Schneier; 10th
Anniversary edition
16