Skip to content

Internet Security - Programming Assignment #1

Notifications You must be signed in to change notification settings

BECATRUE/is-pa1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

M1522.002300 Internet Security (Fall 2022)

Programming Assignment #1: RSA Encryption/Decryption

This can be download from Github at https://github.com/BECATRUE/is-pa1/.

Student info

0. Compile

$ make

1. Generate keys

$ ./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 and q must be prime numbers.
  • The generated keys are stored in ./key.

2. Encrypt

$ ./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.

3. Decrypt

$ ./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.

About

Internet Security - Programming Assignment #1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published