Skip to content

carougen/exploring-cryptography-with-rust

Repository files navigation

Exploring Cryptography With Rust

Project Logo

Stars Join Discord Watchers

Tests Passing Format & Lint Docs Deployed API Docs MIT License

A collection of concise chapter summaries, exercises, and Rust implementations for leading cryptography books.

🗂️ Table of Contents


📂 Project Structure

exploring-cryptography-with-rust/                         # Repository root
├── README.md                                             # Project overview and usage
├── crates/                                               # Rust crates grouped by textbook
│   ├── docs/                                             # Used for online docs
│   ├── visualizer/                                       # Used to help visualize things (elliptic curves, ...)
│   ├── proofs_arguments_zeroknowledge/
│   │   ├── fingerprint/                                  # Reed–Solomon encoding and interpolation
│   │   └── freivalds/                                    # Freivalds' algorithm crate
│   ├── introduction_to_modern_cryptography/
│   ├── ...
│   └── serious_cryptography/
├── book/                                                 # mdBook documentation
│   └── src/
│       ├── en/
│       │    ├── SUMMARY.md                               # Table of contents (links to each book)
│       │    ├── intro.md                                 # Project introduction and usage
│       │    ├── proofs_arguments_zeroknowledge/
│       │    │   ├── index.md                             # Overview of the book
│       │    │   ├── examples/                            # Code snippets for documentation
│       │    │   ├── courses/                             # Notes of the book
│       │    │   ├── exercices/                           # Exercices of the book
│       │    │   └── images/                              # (Optional) diagrams, visual content
│       │    ├── introduction_to_modern_cryptography/
│       │    ├── ...
│       │    └── serious_cryptography/
│       └── fr/                                           # Other languages
└── .github/                                              # CI pipeline: formatting, lint, test, mdBook + deploy       

🛠️ Prerequisites

This project uses mdBook v0.4.45 to ensure compatibility with mdbook-katex.

  • mdBook and KaTeX support:
    cargo install mdbook --version 0.4.45
    cargo install mdbook-katex
    
    or
    
    chmod +x ./setup.sh
    ./setup.sh

🚀 Quick Start

git clone https://github.com/carougen/exploring-cryptography-with-rust.git
cd exploring-cryptography-with-rust

cargo build --all
mdbook serve book

📦 Build & Tests & Benchmarks

# Compile all crates
cargo build --all

# Run test for a specific package
cargo test -p freivalds freivalds_test

# Run all tests
cargo test --all

# Generate the HTML for the book
cd book
mdbook build

# Run benchmark for a specific package
cargo bench --package freivalds --bench freivalds_bench

# Run benchmark for all packages
cargo bench --workspace --all-targets

▶️ Running Examples

From "Proofs, Arguments, and Zero-Knowledge"

fingerprint

cargo run -p fingerprint --example rs_lagrange
cargo run -p fingerprint --example rs_polynomial

freivalds

cargo run -p freivalds --example freivalds

📖 Documentation & mdBook

To serve the docs locally with live reload:

cd book
mdbook serve

Then open: http://localhost:3000


🤝 Contributing

Want to add a new book or exercises? See CONTRIBUTING.md for guidelines.


📜 License

This project is released under the MIT License.


📬 Contact

Maintained by Nolan CAROUGE.
For questions, open an issue or reach out on GitHub.

About

Self-contained Rust crates and chapter summaries for hands-on learning of modern cryptography.

Resources

License

Code of conduct

Stars

Watchers

Forks