Git Product home page Git Product logo

is-pa1's Introduction

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

  • ID: 2020-10015
  • Name: Jaehun You (유재훈)
  • Email: [email protected]
  • Phone: 010-3894-9521

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.

is-pa1's People

Contributors

becatrue avatar

Watchers

 avatar

is-pa1's Issues

2. Generate key

Todo List

  • Validate whether two inputs are valid
  • Compute n = pq
  • Compute phi(n) = (p - 1)(q - 1)
  • Choose an integer e s.t. 1 < e < phi(n) & gcd(e, phi(n)) = 1
  • Determine d as d = e^(-1) (mod phi(n))
  • Save keys

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.