Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jl projection #25

Draft
wants to merge 36 commits into
base: main
Choose a base branch
from
Draft

Jl projection #25

wants to merge 36 commits into from

Conversation

mattsuffern
Copy link
Collaborator

@mattsuffern mattsuffern commented Feb 24, 2025

Draft PR of current progress in Johnson Lindenstrauss Projection

The tests in the jl.rs file are there to show that the current implementation is not working

(closes #10)

mattsuffern and others added 30 commits February 12, 2025 16:22
Implement Zq struct representing elements in ℤ/(2³²)ℤ ring arithmetic
with native u32 operations. Key features:

-  Fully derived Debug, Clone, Copy, PartialEq, Eq, and Default traits
-  Implements Add/Sub/Mul operator traits with implicit modulo reduction
-  Provides Assign variants for in-place operations (AddAssign, etc)
-  Macro-generated trait impls ensuring DRY principle adherence
-  Display trait for formatted output in user interfaces
-  Extensive test coverage including edge cases:
  - Additive/multiplicative identity properties
  - Wrapping overflow/underflow behavior
  - Assignment operator correctness
  - u32 conversion invariants
  - Display formatting checks

Enables safe, zero-cost abstraction for cryptographic primitives
requiring modular arithmetic (e.g., FHE schemes, lattice-based crypto).
Leverages:
-  Rust's wrapping arithmetic for constant-time operations
-  Type-safe API preventing raw integer misuse

Performance characteristics:
-  All operations compile to single CPU instructions
-  No heap allocations

Issue-URL: #17
@mattsuffern mattsuffern marked this pull request as draft February 24, 2025 13:09
@mattsuffern mattsuffern requested a review from NiDimi February 24, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Modular Johnson-Lindenstrauss Lemma
2 participants