Skip to content

awnonbhowmik/RSA-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RSA-Python

The RSA algorithm coded in Python

Created in collaboration with Unnikrishnan Menon

RSA Algorithm

  • Pick two large primes $p,q$.
  • Compute $n=pq$ and $\varphi(n)=\mathrm{lcm}(p-1,q-1)$
  • Choose a public key $e$ such that $1< e< \varphi(n)$ and $\gcd(e,\varphi(n))=1$
  • Calculate $d$ such that $de\equiv 1 \pmod\varphi(n)$
  • Let the message key be $m$
  • **Encrypt: ** $c\equiv m^e\pmod n$
  • **Decrypt: ** $m\equiv c^d\pmod n$

image

And this is what a code says…. rsa

Note that you may have to setup an external dependency environment in some cases, it would create a big chunk of files that are not here due to exceeding the maximum number of files to upload.

About

The RSA algorithm coded in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages