Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p and q are primes that are randomly chosen and used to create public and private key
- e1 private key
- e2 public key
- p=7 q=11 generates keys: e1=13 e2=37
- n = pq = 77 (gets used at encryption and decryption as [mod n])
- necessary verification assuring that encryption and decryption will work with this two primes and two keys
- (7-1)(11-1)=60 (gets used at verification as [mod 60] that has to be 1)
- 13 mod 60 x 37 mod 60 = 481 mod 60 = 1
- Example:
- decrypted message: 2
- encrypted message: 30
- encryption: e1 2^13 = 30 mod 77 = 30
- decryption: e2 30^37 = 2 mod 77 = 2
- RSA calculator (key creation and encryption)
- https://www.cs.drexel.edu/~jpopyack/IntroCS/HW/RSAWorksheet.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement