This can be download from Github at https://github.com/BECATRUE/is-pa1/.
- ID: 2020-10015
- Name: Jaehun You (유재훈)
- Email: jaehun0121@snu.ac.kr
- Phone: 010-3894-9521
$ make
$ ./rsa -keygen [p] [q]
$ ./rsa -keygen 112349 203431
Public key
e: 203449
n: 22855269419
Private key
d: 22020622969
The generated keys are stored in ./key.
- Both
p
andq
must be prime numbers. - The generated keys are stored in ./key.
$ ./rsa -encrypt
Plaintext
: 202010015
Encrypted ciphertext
: 9239585899
The encrypted ciphertext is stored in ./text/ciphertext.
- The plaintext must be stored in ./text/plaintext.
- The plaintext must be a positive integer.
- The keys must be stored in ./key.
$ ./rsa -decrypt
Ciphertext
: 9239585899
Decrypted plaintext
: 202010015
Original plaintext (identical)
: 202010015
The decrypted plaintext is stored in ./text/plaintext.
- The ciphertext must be stored in ./text/ciphertext.
- The keys must be stored in ./key.