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

fix: add hook for ed decompress #1829

Merged
merged 4 commits into from
Nov 29, 2024
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
fix: copy bytes
  • Loading branch information
nhtyy committed Nov 29, 2024
commit 8cb9dad12bf8f8446c99638f4330591b220f2131
9 changes: 3 additions & 6 deletions examples/patch-testing/program/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,11 @@ fn test_curve25519_dalek() {

// This y-coordinate is not square, and therefore not on the curve
let limbs: [u64; 4] =
[8083970408152925034, 11907700107021980321, 16259949789167878387, 5695861037411660086];
[8083970408152925034, 11907700107021980321, 16259949789167878387, 5645861033211660086];

// convert to bytes
let mut input_failing = [0u8; 32];
for (i, limb) in limbs.iter().enumerate() {
let bytes = limb.to_be_bytes();
input_failing[i..i + 8].copy_from_slice(&bytes);
}
let input_failing: [u8; 32] =
limbs.iter().flat_map(|l| l.to_be_bytes()).collect::<Vec<u8>>().try_into().unwrap();

let y_passing = CompressedEdwardsY_dalek(input_passing);

Expand Down
Loading