Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger committed Mar 27, 2024
1 parent 966883d commit 2cce8f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions starknet-crypto-codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ proc-macro = true
[dependencies]
starknet-curve = { version = "0.4.2", path = "../starknet-curve" }
syn = { version = "2.0.15", default-features = false }
starknet-types-core = "0.0.10"
3 changes: 3 additions & 0 deletions starknet-crypto/src/pedersen_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ pub fn pedersen_hash(x: &Felt, y: &Felt) -> Felt {
add_points(&mut acc, &y[..248], &CURVE_CONSTS_P2); // Add b_low * P3
add_points(&mut acc, &y[248..252], &CURVE_CONSTS_P3); // Add b_high * P4

// Convert to affine
let result = AffinePoint::from(&acc);

// Return x-coordinate
result.x
}
Expand Down

0 comments on commit 2cce8f4

Please sign in to comment.