Skip to content

CPerezz/rust-rsa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust-rsa

This is an implementation of the RSA algorithm in Rust.

DISCLAIMER: THIS IS A PERSONAL PROJECT JUST FOR FUN. DO NOT USE THIS LIBRARY ON PRODUCTION ENVOIRMENTS SINCE IS NOT DESIGNED FOR THAT KIND OF PURPOSES

TODO:

  • Generate big numbers of 1024 bits and 2048 bits.
  • Implement modular exponentiation operation needed by Rabin-Miller algorithm. (TESTED AND WORKING)
  • Implement Rabin Miller algorithm. (TESTED AND WORKING)
  • Implement Extended Euclides Algorithm to search for mcd of two suposed prime numbers.
  • Generate valid KeyPairs of a deterministic lenght. (TESTED AND WORKING. RECOMMENDED THRESHOLD:DEFAULT // RECOMENDED KEYPAIR SIZE: 512 OR 1024 BITS)
  • Encrypt messages with Public Key.
  • Decrypt messages with Secret Key. (TESTED AND WORKING)
  • Implement From trait for Public, Secret and KeyPair.
  • Implement Parallel computations of p & q prime original numbers to increase performance. (Increased performance (Still depending of randomness and Prime proximity))
  • Implement Hybrid encryption process using AES-128/256 (to determine).
  • Optimize Rabin-Miller algorithm by discarting multiples of [3, 5, 7, 9, 11, 13, 15, 19] before start computing the algorythm. (Increased performance)
  • Paralelize Rabin-Miller Iterations to increase Key Generation performance.
  • Brenchmark Rabin-Miller vs. Fermat's Primality test (see: https://en.wikipedia.org/wiki/Fermat_primality_test. Not considering Baillie–PSW since relies on Rabin-Miller.
  • Sign messages.
  • Implement Paddings (PKCS1, PKCS7, PKCS-OAP)
  • Order and write better tests.

About

This is an implementation of the RSA algorithm made in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages