Intercompatibility with k256
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 24/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
- Domain
- cryptography
Research direction
Start by comparing the signature and group-key conversion shown in the issue with the verification requirements of the ZCash FROST crate; the report names no repository files or tests. Check whether the converted WSTS signature and public key match the verifier’s expected formats and signing conventions. Done means identifying why verification fails or documenting a compatible no-std verification path; the thread has had no reply for over two years.
Written by the indexing model from the issue text.
Description
We are using the frost-secp256k1 crate for verification of WSTS-generated signatures: frost-secp256k1 { git = "https://github.com/LIT-Protocol/frost" }.
In theory, the math should be identical to this repo's use of Schnorr. Signatures in both crates use R and z values. This is how we convert from a WSTS signature to a ZCash FROST signature:
let wsts_sig = sig_agg
.sign(&msg, &party_nonces, &signature_shares, &party_key_ids)
.map_err(|err| JobError {
reason: err.to_string(),
})?;
// Convert the signature to a FROST-compatible format for pallet-verification
let z_scalar_p = ScalarPrimitive::from_slice(&wsts_sig.z.to_bytes())
.expect("Should be a valid 32-byte scalar");
let z = k256::Scalar::from(&z_scalar_p);
let x_generic_array = GenericArray::from(wsts_sig.R.x().to_bytes());
let y_generic_array = GenericArray::from(wsts_sig.R.y().to_bytes());
let R_encoded_point =
EncodedPoint::from_affine_coordinates(&x_generic_array, &y_generic_array, true);
let R = k256::ProjectivePoint::from_encoded_point(&R_encoded_point)
.expect("Should be a valid encoded point");
let frost_signature = frost_secp256k1::Signature::new(R, z);
And, this is how we convert from a WSTS group public key to a ZCash FROST group public key:
let party: PartyState = party.save();
// Convert the WSTS group key into a FROST-compatible format
let group_point = party.group_key;
let x_generic_array = GenericArray::from(group_point.x().to_bytes());
let y_generic_array = GenericArray::from(group_point.y().to_bytes());
let encoded_point =
EncodedPoint::from_affine_coordinates(&x_generic_array, &y_generic_array, true);
let projective_point = k256::ProjectivePoint::from_encoded_point(&encoded_point)
.expect("Should be a valid encoded point");
let verifying_key = VerifyingKey::new(projective_point);
let public_key_frost_format = verifying_key.serialize().as_ref().to_vec();
Note: We are using wsts=3.0.0.
The to_bytes() function returns in big-endian. All functions that receive these big-endian bytes also expect a big-endian input. I have verified that the sizes are all correct, and, that none of this code panics.
However, when we attempt to verify using ZCash FROST, we get an invalid signature. I know this question may be outside of the scope of this repo, however, we do need to use wsts for our DKG and later use a no-std friendly crate for Schnorr signature verifications (specifically over secp256k1). Are there any ideas as to what we're doing wrong, or, if this is even possible? Thanks!
- Dominant language
- Rust
- Stars
- 34
- Forks
- 19
- Avg merge
- 9h 19m
- Merged PRs (30d)
- 12
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from xoloki/wsts
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
xoloki/wsts#256 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
My Caps shows "Shared" on private Caps that were never sharedPossibly taken @AksharP5 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
CapSoftware/Cap#4569 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Document Web UIOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
parquet: reject truncated BYTE_STREAM_SPLIT numeric pages instead of silently fabricating valuesOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day