Skip to content

alvaro-cuesta/rustopals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rustopals

Rust Rust docs

Solutions for Cryptopals Crypto Challenges implemented in Rust.

The final product should be a library of cryptographic primitives (see documentation), implementing as much crypto as possible (instead of using libraries). Code should be as generic as possible. Usage of traits and generics instead of concrete types is encouraged.

The challenges will serve only as integration tests cases: the actual library code is not organized around sets. If you want to review a specific challenge, find it under the /tests/ folder and explore the used functions.

This is not a crypto library (don't roll your own crypto!) but it should serve as a real-world exercise.

Running

  • Running tests:

    cargo test

    Some tests are ignored due to long running time (and are not run in the CI). You can run those (probably you want them in release mode):

    cargo test --release -- --ignored

    You can also run tests only for specific sets/tests. E.g. for set 1, challenge 2:

    cargo test set1::challenge2

    And run the documentation examples as tests:

    cargo test --doc
  • Generate and open documentation:

    cargo doc --open

Progress (44/64)

Set 8: Abstract Algebra (Not publicly released!)

  • ⬛ Diffie-Hellman Revisited: Small Subgroup Confinement
  • ⬛ Pollard's Method for Catching Kangaroos
  • ⬛ Elliptic Curve Diffie-Hellman and Invalid-Curve Attacks
  • ⬛ Single-Coordinate Ladders and Insecure Twists
  • ⬛ Duplicate-Signature Key Selection in ECDSA (and RSA)
  • ⬛ Key-Recovery Attacks on ECDSA with Biased Nonces
  • ⬛ Key-Recovery Attacks on GCM with Repeated Nonces
  • ⬛ Key-Recovery Attacks on GCM with a Truncated MAC

License

To be done (sorry!). Need to review licenses compatible with dependencies.

About

My Cryptopals solutions in Rust

Resources

Stars

Watchers

Forks

Languages