Skip to content

Commit

Permalink
Merge pull request #44 from plume-sig/18
Browse files Browse the repository at this point in the history
Solve #18
  • Loading branch information
Divide-By-0 authored Sep 25, 2023
2 parents f787cb3 + 1866268 commit dd76c26
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ If you would like to get a grant to create PLUME applications or help to fix bug

## Contributions

If you'd like to contribute, we offer $50 bounties in Eth/DAI for resolving any of the bugs in our issues! Each of them is quite small. That includes [#28](https://github.com/plume-sig/zk-nullifier-sig/issues/28), [#24](https://github.com/plume-sig/zk-nullifier-sig/issues/24), [#22](https://github.com/plume-sig/zk-nullifier-sig/issues/22), [#20](https://github.com/plume-sig/zk-nullifier-sig/issues/20), [#19](https://github.com/plume-sig/zk-nullifier-sig/issues/19), [#18](https://github.com/plume-sig/zk-nullifier-sig/issues/18), [#17](https://github.com/plume-sig/zk-nullifier-sig/issues/17), [#16](https://github.com/plume-sig/zk-nullifier-sig/issues/16), [#15](https://github.com/plume-sig/zk-nullifier-sig/issues/15), [#14](https://github.com/plume-sig/zk-nullifier-sig/issues/14),and [#13](https://github.com/plume-sig/zk-nullifier-sig/issues/13).
If you'd like to contribute, we offer $50 bounties in Eth/DAI for resolving any of the bugs in our issues! Each of them is quite small. That includes [#28](https://github.com/plume-sig/zk-nullifier-sig/issues/28), [#24](https://github.com/plume-sig/zk-nullifier-sig/issues/24), [#22](https://github.com/plume-sig/zk-nullifier-sig/issues/22), [#20](https://github.com/plume-sig/zk-nullifier-sig/issues/20), [#19](https://github.com/plume-sig/zk-nullifier-sig/issues/19), [#17](https://github.com/plume-sig/zk-nullifier-sig/issues/17), [#16](https://github.com/plume-sig/zk-nullifier-sig/issues/16), [#15](https://github.com/plume-sig/zk-nullifier-sig/issues/15), [#14](https://github.com/plume-sig/zk-nullifier-sig/issues/14),and [#13](https://github.com/plume-sig/zk-nullifier-sig/issues/13).

## Implementations

Expand Down
2 changes: 1 addition & 1 deletion rust-arkworks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ark-ec = "0.3.0"
ark-ec = "~0.3.0"
ark-ff = "0.3.0"
ark-std = "0.3.0"
ark-serialize = "0.3.0"
Expand Down
7 changes: 3 additions & 4 deletions rust-arkworks/src/hash_to_curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::error::CryptoError;
use ark_ec::{AffineCurve, ProjectiveCurve};
use tiny_keccak::{Hasher, Shake, Xof};
use elliptic_curve::hash2curve::{ExpandMsgXmd, GroupDigest};
use k256::{AffinePoint};
use k256::AffinePoint;
use k256::sha2::Sha256;
use elliptic_curve::sec1::ToEncodedPoint;
use ark_ec::short_weierstrass_jacobian::GroupAffine;
Expand Down Expand Up @@ -31,18 +31,17 @@ pub fn hash_to_curve<

let pt_affine = pt.to_affine();

k256_affine_to_arkworks_secp256k1_affine::<Fp, P>(pt_affine)
k256_affine_to_arkworks_secp256k1_affine::<P>(pt_affine)
}

pub fn k256_affine_to_arkworks_secp256k1_affine<
Fp: ark_ff::PrimeField,
P: ark_ec::SWModelParameters
>(
k_pt: AffinePoint,
) -> GroupAffine<P> {
let encoded_pt = k_pt.to_encoded_point(false);

let num_field_bytes = 320;
let num_field_bytes = 40;

// extract k_pt.x
let k_pt_x_bytes = encoded_pt.x().unwrap();
Expand Down
1 change: 0 additions & 1 deletion rust-arkworks/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ pub fn test_k256_affine_to_arkworks_secp256k1_affine() {

// Convert k256_pt to an arkworks point
let converted_pt = k256_affine_to_arkworks_secp256k1_affine::<
secp256k1::fields::Fq,
Secp256k1Parameters
>(k256_pt.to_affine());

Expand Down

0 comments on commit dd76c26

Please sign in to comment.