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

Add Rescue Prime Optimized #930

Merged
merged 25 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6c8fa67
first commit
jotabulacios Sep 19, 2024
7b30c24
first draft, save work
jotabulacios Sep 19, 2024
6a9979c
first working commit, passes all tests. Save work
jotabulacios Sep 24, 2024
ccfcdca
save work
jotabulacios Sep 24, 2024
5174b11
save work
jotabulacios Sep 25, 2024
6c4d06f
fixed padding, now all test pass
jotabulacios Oct 15, 2024
10878f2
refactor
jotabulacios Oct 15, 2024
d5b9c91
more refactor
jotabulacios Oct 15, 2024
2a0338f
added precomputed values for 160 security level
jotabulacios Oct 16, 2024
ca9d36b
fix typos
jotabulacios Oct 16, 2024
37417c2
Merge branch 'main' into add_rescue_prime
jotabulacios Oct 16, 2024
cabe504
fix clippy and wasm
jotabulacios Oct 16, 2024
29e0e08
Merge branch 'add_rescue_prime' of https://github.com/lambdaclass/lam…
jotabulacios Oct 16, 2024
fd293b2
add std feature when needed
jotabulacios Oct 16, 2024
cbd20dd
save work, refactor and solved some comments
jotabulacios Oct 21, 2024
0e4c45f
save work
jotabulacios Oct 23, 2024
209a636
Merge branch 'main' into add_rescue_prime
diegokingston Oct 23, 2024
855e277
Merge branch 'main' into add_rescue_prime
jotabulacios Oct 23, 2024
da7ab0e
move Mds enum and removed commented code
jotabulacios Oct 23, 2024
1556450
Merge branch 'add_rescue_prime' of https://github.com/lambdaclass/lam…
jotabulacios Oct 23, 2024
d50852d
Merge branch 'main' into add_rescue_prime
diegokingston Oct 24, 2024
8ee7116
remove unnecessary match
jotabulacios Oct 30, 2024
1c2db51
Merge branch 'main' into add_rescue_prime
jotabulacios Nov 4, 2024
c385cbb
removed commented code
jotabulacios Nov 4, 2024
ea8267d
Merge branch 'add_rescue_prime' of https://github.com/lambdaclass/lam…
jotabulacios Nov 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ license.workspace = true
lambdaworks-math = { workspace = true, features = ["alloc"] }
sha3 = { version = "0.10", default-features = false }
sha2 = { version = "0.10", default-features = false }

# Optional
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"], optional = true }
serde = { version = "1.0", default-features = false, features = [
"derive",
"alloc",
], optional = true }
rayon = { version = "1.8.0", optional = true }

[dev-dependencies]
Expand All @@ -40,9 +42,9 @@ name = "iai_merkle"
harness = false

[[bench]]
name= "criterion_poseidon"
harness=false
name = "criterion_poseidon"
harness = false

[[bench]]
name= "criterion_pedersen"
harness=false
name = "criterion_pedersen"
harness = false
1 change: 1 addition & 0 deletions crypto/src/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ pub mod hash_to_field;
pub mod monolith;
pub mod pedersen;
pub mod poseidon;
pub mod rescue_prime;
pub mod sha3;
11 changes: 11 additions & 0 deletions crypto/src/hash/rescue_prime/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mod parameters;
mod rescue_prime_optimized;
mod utils;

pub use rescue_prime_optimized::MdsMethod;
pub use rescue_prime_optimized::RescuePrimeOptimized;

use lambdaworks_math::field::element::FieldElement;
use lambdaworks_math::field::fields::u64_goldilocks_field::Goldilocks64Field;

pub type Fp = FieldElement<Goldilocks64Field>;
Loading
Loading