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

Ripemd160 implementation #46

Merged
merged 49 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ba8bc53
Implemented ripemd160
Sh0g0-1758 Mar 11, 2024
536887a
Implement ripemd160
Sh0g0-1758 Mar 11, 2024
3dbacf2
modified cargo.toml
Sh0g0-1758 Mar 11, 2024
a67c903
Revert
Sh0g0-1758 Mar 11, 2024
2f09b04
final computation
harry2855 Mar 11, 2024
0f10288
Update Cargo.toml
Sh0g0-1758 Mar 13, 2024
d440d9a
Moved logic to Utils and ran tests
Sh0g0-1758 Mar 13, 2024
d6aa61e
Added space
Sh0g0-1758 Mar 13, 2024
ebc66d2
Ran fmt
Sh0g0-1758 Mar 13, 2024
4719b84
Modifications as code changed to util
Sh0g0-1758 Mar 14, 2024
007865c
Made code less verbose
Sh0g0-1758 Mar 14, 2024
5c1cbfd
Ran fmt
Sh0g0-1758 Mar 14, 2024
e4ce424
Revamp R1CS
Sh0g0-1758 Mar 15, 2024
46353c1
Minor Changes
Sh0g0-1758 Mar 15, 2024
6b040da
Optimised Code and added a test
Sh0g0-1758 Mar 16, 2024
90dc165
Minor Changes
Sh0g0-1758 Mar 16, 2024
aac1c29
corrected logic
harry2855 Mar 18, 2024
967f3e2
added utility function
Sh0g0-1758 Mar 18, 2024
deea976
Updated tests
Sh0g0-1758 Mar 18, 2024
8f62440
Resolved merge conflict
Sh0g0-1758 Mar 18, 2024
180864a
Update Cargo.toml
Sh0g0-1758 Mar 19, 2024
d261d49
Merge branch 'main' into main
Sh0g0-1758 Mar 19, 2024
568e81a
Update Cargo.toml
harry2855 Mar 19, 2024
a035af5
Added helper function to handle endianness
avras Mar 28, 2024
2cb9cd6
cargo fmt
avras Mar 28, 2024
27ea448
Remove repeated initial value
avras Mar 28, 2024
47403f3
Simpler rotate left implementation
avras Mar 28, 2024
89aee5e
Simpler implementations of ripemd160_d1/d2
avras Mar 28, 2024
27bf2f5
Simplify implementation
avras Mar 28, 2024
888db4f
Improve readability and remove some redundancy
avras Mar 29, 2024
e44cc72
Shorten test code using a macro
avras Mar 29, 2024
7710cd5
Added tests with constraint counts
avras Mar 29, 2024
0237515
Add author
avras Mar 29, 2024
3c25ab5
Renaming variables for clarity
avras Mar 29, 2024
5e67c6e
Improve readability
avras Mar 29, 2024
5a80ae0
Merge branch 'lurk-lab:main' into main
Sh0g0-1758 Apr 2, 2024
7cd89f0
Merge branch 'ripemd-160' of github.com:avras/bellpepper-gadgets
Sh0g0-1758 Apr 2, 2024
18bbd18
Added space
Sh0g0-1758 Apr 2, 2024
46bc6d5
Fix xclippy warnings
avras Apr 3, 2024
e7a4ef9
Avoid some unwraps
avras Apr 3, 2024
ae39300
Revert "Fix xclippy warnings"
Sh0g0-1758 Apr 3, 2024
0434e69
Revert "Revert "Fix xclippy warnings""
Sh0g0-1758 Apr 3, 2024
a67eff9
Modified package name, added README and license files
avras Apr 3, 2024
64b6aa1
Add randomized test using out-of-circuit ripem160
avras Apr 8, 2024
8b6dcc4
Change visibility of util functions and inline some
avras Apr 8, 2024
4c7507f
Cleaner way to swap endianness of bytes
avras Apr 8, 2024
08e844d
Passing inputs to triop by value
avras Apr 8, 2024
b5348f7
Avoid repeated push into vector
avras Apr 8, 2024
427b718
Remove the swap_byte_endianness method
avras Apr 8, 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
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ members = [
"crates/merkle-inclusion",
"crates/chunk",
"crates/uint64",
"crates/ripemd160",
]

[workspace.package]
Expand Down
19 changes: 19 additions & 0 deletions crates/ripemd160/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "bellpepper-ripemd160"
authors = ["Shourya Goel <[email protected]>", "Himanshu Raheja <[email protected]>", "Saravanan Vijayakumaran <[email protected]>"]
version = "0.1.0"
edition = "2021"
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
bellpepper-core = { workspace = true }
bellpepper = { workspace = true }
ff = { workspace = true }

[dev-dependencies]
pasta_curves = { workspace = true }
hex-literal = "0.4.1"
rand_core = { workspace = true }
rand_xorshift = { workspace = true }
1 change: 1 addition & 0 deletions crates/ripemd160/LICENSE-APACHE
1 change: 1 addition & 0 deletions crates/ripemd160/LICENSE-MIT
19 changes: 19 additions & 0 deletions crates/ripemd160/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# bellpepper-ripemd160
A [bellpepper](https://github.com/lurk-lab/bellpepper) gadget for the RIPEMD-160 hash function

## License

Licensed under either of

* Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.

## Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.
2 changes: 2 additions & 0 deletions crates/ripemd160/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod ripemd160;
pub mod util;
Loading
Loading