Description:
Version 1
- Replace each letter of a message with two digits: A = 01, B = 02, C = 03, … , Z = 26.
- For example, “victory” is translated to 22 09 03 20 15 18 25.
- Adding (a few) number to make it prime, i.e., 22 09 03 20 15 18 25 13.
- Beforehand Sender and Receiver agree on a secret key, a prime k.
- Encryption The sender encrypts: m^=m⋅k
- Decryption The receiver decrypts: m=m^/k
- However, If attack got 2 messages, they can find gcd(m^1,m^2) to have k
Version 2
- Beforehand: Sender and Receiver agree on a large prime n, which can be public, and a secret key, a prime k<n.
- Encryption: The sender encrypts a message m<n, which is a large prime: m^=m⋅nk
- Decryption: The receiver know both n and k, so can compute j, an inverse of k modulo n, and decrypts: j⋅nm^=j⋅nk⋅nm=m (as m<n)
- Problem:
- if the attacker know both encrypted and unencrypted message, i.e., m and m^=m⋅nk
- Attacker can compute j, an inverse of m modulo n
- Then compute j⋅nm^=j⋅nm⋅nk=k