Include the group public key in computing the binding factor (#410)

* Prelim implementation of including the group public key in computing the binding factor

Needs updated test vectors from the spec PoC and updated tests

* update test vectors

* add integration_test.rs to gencode which we forgot to do before

---------

Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
This commit is contained in:
Deirdre Connolly 2023-07-05 09:19:19 -04:00 committed by GitHub
parent b2c605aac1
commit 404cc361fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 3141 additions and 1700 deletions

View File

@ -26,7 +26,8 @@ pub mod round1;
pub mod round2;
use crate::{
scalar_mul::VartimeMultiscalarMul, Ciphersuite, Element, Error, Field, Group, Scalar, Signature,
scalar_mul::VartimeMultiscalarMul, Ciphersuite, Element, Error, Field, Group, Scalar,
Signature, VerifyingKey,
};
pub use self::identifier::Identifier;
@ -112,12 +113,13 @@ where
#[cfg_attr(feature = "internals", visibility::make(pub))]
pub(crate) fn compute_binding_factor_list<C>(
signing_package: &SigningPackage<C>,
group_public: &VerifyingKey<C>,
additional_prefix: &[u8],
) -> BindingFactorList<C>
where
C: Ciphersuite,
{
let preimages = signing_package.binding_factor_preimages(additional_prefix);
let preimages = signing_package.binding_factor_preimages(group_public, additional_prefix);
BindingFactorList(
preimages
@ -244,10 +246,18 @@ where
#[cfg_attr(feature = "internals", visibility::make(pub))]
pub fn binding_factor_preimages(
&self,
group_public: &VerifyingKey<C>,
additional_prefix: &[u8],
) -> Vec<(Identifier<C>, Vec<u8>)> {
let mut binding_factor_input_prefix = vec![];
// The length of a serialized verifying key of the same cipersuite does
// not change between runs of the protocol, so we don't need to hash to
// get a fixed length.
//
// TODO: when serde serialization merges, change this to be simpler?
binding_factor_input_prefix.extend_from_slice(group_public.serialize().as_ref());
// The message is hashed with H4 to force the variable-length message
// into a fixed-length byte string, same for hashing the variable-sized
// (between runs of the protocol) set of group commitments, but with H5.
@ -372,7 +382,7 @@ where
// Encodes the signing commitment list produced in round one as part of generating [`BindingFactor`], the
// binding factor.
let binding_factor_list: BindingFactorList<C> =
compute_binding_factor_list(signing_package, &[]);
compute_binding_factor_list(signing_package, &pubkeys.group_public, &[]);
// Compute the group commitment from signing commitments produced in round one.
let group_commitment = compute_group_commitment(signing_package, &binding_factor_list)?;

View File

@ -530,7 +530,7 @@ pub struct KeyPackage<C: Ciphersuite> {
/// This participant's public key.
#[zeroize(skip)]
pub(crate) public: VerifyingShare<C>,
/// The public signing key that represents the entire group.
/// The public verifying key that represents the entire group.
#[zeroize(skip)]
pub(crate) group_public: VerifyingKey<C>,
/// Ciphersuite ID for serialization

View File

@ -190,7 +190,7 @@ pub fn sign<C: Ciphersuite>(
// Encodes the signing commitment list produced in round one as part of generating [`BindingFactor`], the
// binding factor.
let binding_factor_list: BindingFactorList<C> =
compute_binding_factor_list(signing_package, &[]);
compute_binding_factor_list(signing_package, &key_package.group_public, &[]);
let binding_factor: frost::BindingFactor<C> =
binding_factor_list[key_package.identifier].clone();

View File

@ -1,8 +1,5 @@
//! Helper function for testing with test vectors.
use std::{
collections::{BTreeMap, HashMap},
str::FromStr,
};
use std::collections::{BTreeMap, HashMap};
use debugless_unwrap::DebuglessUnwrap;
use hex::{self, FromHex};
@ -55,26 +52,23 @@ pub fn parse_test_vectors<C: Ciphersuite>(json_vectors: &Value) -> TestVectors<C
let mut key_packages: HashMap<Identifier<C>, KeyPackage<C>> = HashMap::new();
let possible_participants = json_vectors["inputs"]["participants"]
.as_object()
let possible_participants = json_vectors["inputs"].as_object().unwrap()["participant_shares"]
.as_array()
.unwrap()
.iter();
let group_public =
VerifyingKey::<C>::from_hex(inputs["group_public_key"].as_str().unwrap()).unwrap();
for (i, secret_share) in possible_participants {
for secret_share in possible_participants {
let i = secret_share["identifier"].as_u64().unwrap() as u16;
let secret =
SigningShare::<C>::from_hex(secret_share["participant_share"].as_str().unwrap())
.unwrap();
let signer_public = secret.into();
let key_package = KeyPackage::<C>::new(
u16::from_str(i).unwrap().try_into().unwrap(),
secret,
signer_public,
group_public,
);
let key_package =
KeyPackage::<C>::new(i.try_into().unwrap(), secret, signer_public, group_public);
key_packages.insert(*key_package.identifier(), key_package);
}
@ -90,12 +84,9 @@ pub fn parse_test_vectors<C: Ciphersuite>(json_vectors: &Value) -> TestVectors<C
let mut binding_factor_inputs: HashMap<Identifier<C>, Vec<u8>> = HashMap::new();
let mut binding_factors: HashMap<Identifier<C>, BindingFactor<C>> = HashMap::new();
for (i, signer) in round_one_outputs["participants"]
.as_object()
.unwrap()
.iter()
{
let identifier = u16::from_str(i).unwrap().try_into().unwrap();
for signer in round_one_outputs["outputs"].as_array().unwrap().iter() {
let i = signer["identifier"].as_u64().unwrap() as u16;
let identifier = i.try_into().unwrap();
let hiding_nonce_randomness =
hex::decode(signer["hiding_nonce_randomness"].as_str().unwrap()).unwrap();
@ -137,11 +128,8 @@ pub fn parse_test_vectors<C: Ciphersuite>(json_vectors: &Value) -> TestVectors<C
let mut signature_shares: HashMap<Identifier<C>, SignatureShare<C>> = HashMap::new();
for (i, signer) in round_two_outputs["participants"]
.as_object()
.unwrap()
.iter()
{
for signer in round_two_outputs["outputs"].as_array().unwrap().iter() {
let i = signer["identifier"].as_u64().unwrap() as u16;
let sig_share = <<C::Group as Group>::Field as Field>::Serialization::try_from(
hex::decode(signer["sig_share"].as_str().unwrap()).unwrap(),
)
@ -149,10 +137,7 @@ pub fn parse_test_vectors<C: Ciphersuite>(json_vectors: &Value) -> TestVectors<C
let signature_share = SignatureShare::<C>::deserialize(sig_share).unwrap();
signature_shares.insert(
u16::from_str(i).unwrap().try_into().unwrap(),
signature_share,
);
signature_shares.insert(i.try_into().unwrap(), signature_share);
}
// Final output
@ -270,12 +255,15 @@ pub fn check_sign_with_test_vectors<C: Ciphersuite>(json_vectors: &Value) {
let signing_package = frost::SigningPackage::new(signer_commitments, &message_bytes);
for (identifier, input) in signing_package.binding_factor_preimages(&[]).iter() {
for (identifier, input) in signing_package
.binding_factor_preimages(&group_public, &[])
.iter()
{
assert_eq!(*input, binding_factor_inputs[identifier]);
}
let binding_factor_list: frost::BindingFactorList<C> =
compute_binding_factor_list(&signing_package, &[]);
compute_binding_factor_list(&signing_package, &group_public, &[]);
for (identifier, binding_factor) in binding_factor_list.iter() {
assert_eq!(*binding_factor, binding_factors[identifier]);

File diff suppressed because it is too large Load Diff

View File

@ -8,61 +8,70 @@
"hash": "SHA-512"
},
"inputs": {
"participant_list": [
1,
3
],
"group_secret_key": "7b1c33d3f5291d85de664833beb1ad469f7fb6025a0ec78b3a790c6e13a98304",
"group_public_key": "15d21ccd7ee42959562fc8aa63224c8851fb3ec85a3faf66040d380fb9738673",
"message": "74657374",
"share_polynomial_coefficients": [
"178199860edd8c62f5212ee91eff1295d0d670ab4ed4506866bae57e7030b204"
],
"participants": {
"1": {
"participant_shares": [
{
"identifier": 1,
"participant_share": "929dcc590407aae7d388761cddb0c0db6f5627aea8e217f4a033f2ec83d93509"
},
"2": {
{
"identifier": 2,
"participant_share": "a91e66e012e4364ac9aaa405fcafd370402d9859f7b6685c07eed76bf409e80d"
},
"3": {
{
"identifier": 3,
"participant_share": "d3cb090a075eb154e82fdb4b3cb507f110040905468bb9c46da8bdea643a9a02"
}
}
]
},
"round_one_outputs": {
"participant_list": "1,3",
"participants": {
"1": {
"hiding_nonce_randomness": "9d06a6381c7a4493929761a73692776772b274236fb5cfcc7d1b48ac3a9c249f",
"binding_nonce_randomness": "db184d7bc01a3417fe1f2eb3cf5479bb027145e6369a5f879f32d334ab256b23",
"hiding_nonce": "70652da3e8d7533a0e4b9e9104f01b48c396b5b553717784ed8d05c6a36b9609",
"binding_nonce": "4f9e1ad260b5c0e4fe0e0719c6324f89fecd053758f77c957f56967e634a710e",
"hiding_nonce_commitment": "44105304351ceddc58e15ddea35b2cb48e60ced54ceb22c3b0e5d42d098aa1d8",
"binding_nonce_commitment": "b8274b18a12f2cef74ae42f876cec1e31daab5cb162f95a56cd2487409c9d1dd",
"binding_factor_input": "c5b95020cba31a9035835f074f718d0c3af02a318d6b4723bbd1c088f4889dd7b9ff8e79f9a67a9d27605144259a7af18b7cca2539ffa5c4f1366a98645da8f4e077d604fff64f20e2377a37e5a10ce152194d62fe856ef4cd935d4f1cb0088c2083a2722ad3f5a84d778e257da0df2a7cadb004b1f5528352af778b94ee1c2a0100000000000000000000000000000000000000000000000000000000000000",
"binding_factor": "2d5630c36d33258b1208c4205fa759b762d09bfa06b29cf792cf98758c0b3305"
"outputs": [
{
"identifier": 1,
"hiding_nonce_randomness": "486e5404f57bd43fc5330db63afd53608af242ece541e5a390867c1b278b2ddc",
"binding_nonce_randomness": "73b8564c3d342e061c334b2e05a43d844730fa0066db5bc9c3e63fabe2ddbaa9",
"hiding_nonce": "5d54055f078d811dbfd8b54d389f23e24afa1e1c3cd8372880b240834b6b1205",
"binding_nonce": "3c46be47532e40c99e2734261bd05292647776ca1c16943ebe93d62fa1e2ec06",
"hiding_nonce_commitment": "5078f5c6d679654bb88a8887242d49cc21a553ed26caed4d52570c6656fb9b92",
"binding_nonce_commitment": "936b660d3008d8298b0a7220a327a0813ffedd9d07604bdc73d7cffef63c0da0",
"binding_factor_input": "15d21ccd7ee42959562fc8aa63224c8851fb3ec85a3faf66040d380fb9738673c5b95020cba31a9035835f074f718d0c3af02a318d6b4723bbd1c088f4889dd7b9ff8e79f9a67a9d27605144259a7af18b7cca2539ffa5c4f1366a98645da8f4983d08b25a656f4ac53202ee8f9d6ddbdc9e21653d6af47f40eb7790a6de5b8c5041c21736c36099b509cdd88136e4f75a665d598385e544fd142c78c8ba2c3a0100000000000000000000000000000000000000000000000000000000000000",
"binding_factor": "6f42e90aa7386259e7a9b79049f156f876aec506e49c334093d67b310bd9140f"
},
"3": {
"hiding_nonce_randomness": "31ca9b07936d6b342a43d97f23b7bec5a5f5a09575a075393868dd8df5c05a54",
"binding_nonce_randomness": "c1db96a85d8b593e14fdb869c0955625478afa6a987ad217e7f2261dcab26819",
"hiding_nonce": "233adcb0ec0eddba5f1cc5268f3f4e6fc1dd97fb1e4a1754e6ddc92ed834ca0b",
"binding_nonce": "b59fc8a32fe02ec0a44c4671f3d1f82ea3924b7c7c0179398fc9137e82757803",
"hiding_nonce_commitment": "d31bd81ce216b1c83912803a574a0285796275cb8b14f6dc92c8b09a6951f0a2",
"binding_nonce_commitment": "e1c863cfd08df775b6747ef2456e9bf9a03cc281a479a95261dc39137fcf0967",
"binding_factor_input": "c5b95020cba31a9035835f074f718d0c3af02a318d6b4723bbd1c088f4889dd7b9ff8e79f9a67a9d27605144259a7af18b7cca2539ffa5c4f1366a98645da8f4e077d604fff64f20e2377a37e5a10ce152194d62fe856ef4cd935d4f1cb0088c2083a2722ad3f5a84d778e257da0df2a7cadb004b1f5528352af778b94ee1c2a0300000000000000000000000000000000000000000000000000000000000000",
"binding_factor": "1137be5cdf3d18e44367acee8485e9a66c3164077af80619b6291e3943bbef04"
{
"identifier": 3,
"hiding_nonce_randomness": "8f1a8975c234912a0316f201fbf53b8931dd2a90c77ba8979afd8459c5c97a2f",
"binding_nonce_randomness": "80b01da1e0d1b7a18f87858176c0c213d5dc5ee6a2fb7e2336cb9a17f51aa8dd",
"hiding_nonce": "06b0bf76e90e151e9c5d22b0437f1b01c5968525ca4b001572f37aa99bc4b70c",
"binding_nonce": "b08d6f1da38d9dec1943e83940984a0797bac0b77949913761c990cb5cd0a504",
"hiding_nonce_commitment": "91c2469b501fe5af8493f9ae77c8f57999460af317f2d9f2d4378ae0e665860e",
"binding_nonce_commitment": "c225618accff2266a45d87dc3219b04c774ca26c8629c4fa483e7e87da820007",
"binding_factor_input": "15d21ccd7ee42959562fc8aa63224c8851fb3ec85a3faf66040d380fb9738673c5b95020cba31a9035835f074f718d0c3af02a318d6b4723bbd1c088f4889dd7b9ff8e79f9a67a9d27605144259a7af18b7cca2539ffa5c4f1366a98645da8f4983d08b25a656f4ac53202ee8f9d6ddbdc9e21653d6af47f40eb7790a6de5b8c5041c21736c36099b509cdd88136e4f75a665d598385e544fd142c78c8ba2c3a0300000000000000000000000000000000000000000000000000000000000000",
"binding_factor": "e5c59a171351c8f526186ea57719e4e07d6791662ca049d3a8848af5ce0dae07"
}
}
]
},
"round_two_outputs": {
"participant_list": "1,3",
"participants": {
"1": {
"sig_share": "c4b26af1e91fbc8440a0dad253e72620da624553c5b625fd51e6ea179fc09f05"
"outputs": [
{
"identifier": 1,
"sig_share": "b97409beff18861f0959530db091a64b812e3fefaa87e1e3d2c039f11d96cc09"
},
"3": {
"sig_share": "9369640967d0cb98f4dedfde58a845e0e18e0a7164396358439060ed282b4e08"
{
"identifier": 3,
"sig_share": "9816a14e7cdecfcb240976f564cf98c5640e596b6ddf270379efbef4e9f7db0b"
}
}
]
},
"final_output": {
"sig": "ae11c539fdc709b78fef5ee1f5a2250297e3e1b62a86a86c26d93c389934ba0e571ccffa50f0871d357fbab1ac8f6c00bcf14fc429f0885595764b05c8ebed0d"
"sig": "72c948a63797c693e8e978fdb703a1f5a7590472a539da13b71dd6c2b8c1b2a664b7b4af6194439357c5d15f366760fce53c985a186709e74bb0f8e5078ea805"
}
}

View File

@ -44,12 +44,31 @@ lazy_static! {
#[test]
fn check_sign_with_test_vectors() {
frost_core::tests::vectors::check_sign_with_test_vectors::<Ed25519Sha512>(&VECTORS);
}
#[test]
fn check_sign_with_test_vectors_with_big_identifiers() {
frost_core::tests::vectors::check_sign_with_test_vectors::<Ed25519Sha512>(
&VECTORS_BIG_IDENTIFIER,
);
}
#[test]
fn check_error_culprit() {
frost_core::tests::ciphersuite_generic::check_error_culprit::<Ed25519Sha512>();
}
#[test]
fn check_identifier_derivation() {
frost_core::tests::ciphersuite_generic::check_identifier_derivation::<Ed25519Sha512>();
}
#[test]
fn check_sign_with_dealer_and_identifiers() {
let rng = thread_rng();
frost_core::tests::ciphersuite_generic::check_sign_with_dealer_and_identifiers::<
Ed25519Sha512,
_,
>(rng);
}

File diff suppressed because it is too large Load Diff

View File

@ -8,61 +8,70 @@
"hash": "SHAKE256"
},
"inputs": {
"participant_list": [
1,
3
],
"group_secret_key": "6298e1eef3c379392caaed061ed8a31033c9e9e3420726f23b404158a401cd9df24632adfe6b418dc942d8a091817dd8bd70e1c72ba52f3c00",
"group_public_key": "3832f82fda00ff5365b0376df705675b63d2a93c24c6e81d40801ba265632be10f443f95968fadb70d10786827f30dc001c8d0f9b7c1d1b000",
"message": "74657374",
"share_polynomial_coefficients": [
"dbd7a514f7a731976620f0436bd135fe8dddc3fadd6e0d13dbd58a1981e587d377d48e0b7ce4e0092967c5e85884d0275a7a740b6abdcd0500"
],
"participants": {
"1": {
"participant_shares": [
{
"identifier": 1,
"participant_share": "4a2b2f5858a932ad3d3b18bd16e76ced3070d72fd79ae4402df201f525e754716a1bc1b87a502297f2a99d89ea054e0018eb55d39562fd0100"
},
"2": {
{
"identifier": 2,
"participant_share": "2503d56c4f516444a45b080182b8a2ebbe4d9b2ab509f25308c88c0ea7ccdc44e2ef4fc4f63403a11b116372438a1e287265cadeff1fcb0700"
},
"3": {
{
"identifier": 3,
"participant_share": "00db7a8146f995db0a7cf844ed89d8e94c2b5f259378ff66e39d172828b264185ac4decf7219e4aa4478285b9c0eef4fccdf3eea69dd980d00"
}
}
]
},
"round_one_outputs": {
"participant_list": "1,3",
"participants": {
"1": {
"hiding_nonce_randomness": "89bf16040081ff2990336b200613787937ebe1f024b8cdff90eb6f1c741d91c1",
"binding_nonce_randomness": "cd646348bb98fd2a4b2f27fb7d6da18201c161847352576b4bf125190e965483",
"hiding_nonce": "67a6f023e77361707c6e894c625e809e80f33fdb310810053ae29e28e7011f3193b9020e73c183a98cc3a519160ed759376dd92c9483162200",
"binding_nonce": "4812e8d7c8b7a50ced80b507902d074ef8647bc1146979683da8d0fecd93fa3c8230cade2fb4344600aa04bd4b7a21d046c5b63ee865b12a00",
"hiding_nonce_commitment": "649c6a53b109897d962d033f23d01fd4e1053dddf3746d2ddce9bd66aea38ccfc3df061df03ca399eb806312ab3037c0c31523142956ada780",
"binding_nonce_commitment": "0064cc729a8e2fcf417e43788ecec37b10e9e1dcb3ae90854efbfaad00a0ef3cdd52e18d56f073c8ff0947cb71ff0bb17c3d45d096409ddb00",
"binding_factor_input": "106dadce87ca867018702d69a02effd165e1ac1a511c957cff1897ceff2e34ca212fe798d84f0bde6054bf0fa77fd4cd4bc4853d6dc8dbd19d340923f0ebbbb35172df4ab865a45d55af31fa0e6606ea97cf8513022b2b133d0f9f6b8d3be184221fc4592bf12bd7fb4127bb67e51a6dc9e5f1ed5243362fb46a6da552418ca967d43d9bc811a21917a3018de58f11c25f6b9ad8bec3699e06b87dd3ab67a7326c30878c7c55ec1a45802af65da193ce99634158539e38c232a627895c5f14e2e20d487382ccc9c99cd0a0df266a292f283bb9b6854e344ecc32d5e1852fdde5fde77798010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"binding_factor": "3412ac894a91a6bc0e3e7c790f3e8ef5d1288e54de780aba384cbb3081b602dd188010e5b0c9ac2b5dca0aae54cfd0f5c391cece8092131d00"
"outputs": [
{
"identifier": 1,
"hiding_nonce_randomness": "6a46e7107cbcc28fd1f8f5787020e001b181d946a9699b7d7bec8c3377d12412",
"binding_nonce_randomness": "24622fb4ae41a0f4f040e6ab14b1e9f0b9c8322386196e1a19dd7f8ba19d1f96",
"hiding_nonce": "6154417981da6b4a298c16c22ceb4c9c3f57aa6b4b7514b3ce4e73b4c5ea7e8ef1a71451b51f90d72ff01bf54fb4b2673e5533a18a9ca82500",
"binding_nonce": "454c9887dd3e810653c191e334ed43aa62f6a2a5cd215f3906e732c9106014fe28d6c635aa0d937f595284318e29f2cd00e9a3821f34542b00",
"hiding_nonce_commitment": "e15bf037a625d923e1fbe550594a47d08591f8b0213afd48fc802c2452ab364e77f31b3d3a64b8f65ab47e521f6cbf093fa0b5c07c9f81de00",
"binding_nonce_commitment": "44f4fb84e0d90ebb9dbb84c2d13f46905e25742b42e158e348ce65b363b3f1a7bb8bb5dcb07b96256b6bdbfc3a5905b24ffb771c4be2ea4780",
"binding_factor_input": "3832f82fda00ff5365b0376df705675b63d2a93c24c6e81d40801ba265632be10f443f95968fadb70d10786827f30dc001c8d0f9b7c1d1b000106dadce87ca867018702d69a02effd165e1ac1a511c957cff1897ceff2e34ca212fe798d84f0bde6054bf0fa77fd4cd4bc4853d6dc8dbd19d340923f0ebbbb35172df4ab865a45d55af31fa0e6606ea97cf8513022b2b133d0f9f6b8d3be184221fc4592bf12bd7fb4127bb67e51a6dc9e5637db62b249b236f09a4a0696a6c272f808b018da3eded6622a2cda4431ced451452541624ecf6a72aeebec807719bb2ccdfbe8990dc01f30402cea8704e1723a1cbb8a25614dcd4d7a965b4ccb0f1c5c679c36ead86441cbaba5482468442c6526b33777dfcbed92913d6e6890d3839c1ff010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"binding_factor": "424b017c7020a995b6b85717199e858616191a0f566178bc66b7261582fdecf029c0c3ee50be34f3e6b73e03299e7457bb536d59f417f13d00"
},
"3": {
"hiding_nonce_randomness": "3718dabb4fd3d7dd9adad4878c6de8b33c8841cfe7cc95a85592952a2c9c554d",
"binding_nonce_randomness": "3becbc90798211a0f52543dd1f24869a143fdf743409581af4db30f045773d64",
"hiding_nonce": "4f2666770317d14ec9f7fd6690c075c34b4cde7f6d9bceda9e9433ec8c0f2dc983ff1622c3a54916ce7c161381d263fad62539cddab2101600",
"binding_nonce": "88f66df8bb66389932721a40de4aa5754f632cac114abc1052688104d19f3b1a010880ebcd0c4c0f8cf567d887e5b0c3c0dc78821166550f00",
"hiding_nonce_commitment": "8dcf049167e28d5f53fa7ebbbd136abcaf2be9f2c02448c8979002f92577b22027640def7ddd5b98f9540c2280f36a92d4747bbade0b0c4280",
"binding_nonce_commitment": "12e837b89a2c085481fcf0ca640a17a24b6fc96b032d40e4301c78e7232a9f49ffdcad2c21acbc992e79dfc3c6c07cb94e4680b3dcc9935580",
"binding_factor_input": "106dadce87ca867018702d69a02effd165e1ac1a511c957cff1897ceff2e34ca212fe798d84f0bde6054bf0fa77fd4cd4bc4853d6dc8dbd19d340923f0ebbbb35172df4ab865a45d55af31fa0e6606ea97cf8513022b2b133d0f9f6b8d3be184221fc4592bf12bd7fb4127bb67e51a6dc9e5f1ed5243362fb46a6da552418ca967d43d9bc811a21917a3018de58f11c25f6b9ad8bec3699e06b87dd3ab67a7326c30878c7c55ec1a45802af65da193ce99634158539e38c232a627895c5f14e2e20d487382ccc9c99cd0a0df266a292f283bb9b6854e344ecc32d5e1852fdde5fde77798030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"binding_factor": "6aa48a3635d7b962489283ee1ccda8ea66e5677b1e17f2f475eb565e3ae8ea73360f24c04e3775dadd1f2923adcda3d105536ad28c3c561100"
{
"identifier": 3,
"hiding_nonce_randomness": "2b0a62afc4de1361cb09ba81f726511fdae8f1a30c71d4c760c76109a51031aa",
"binding_nonce_randomness": "9ae4957a4835c06f89c26195bca980ab1283fd0bdd97ec40db66d089978b4bb2",
"hiding_nonce": "472ab44961e5d8f2203ba0309ba3ca2d6bafa2e5d46ffd299f9ea4ff6e0a3f3eb443e2ca28c41b3bebab4d5a2e05f8098a949b66dc45aa3b00",
"binding_nonce": "1ef3339a966479219491bdadf081b55919165120b68edde33554d3a4ccce451f142ea5b86952d7e2994f578a72bce5a27c08ba9b5b15b13900",
"hiding_nonce_commitment": "1dc6dded71485ba80d6efd27b0e5d147e5184771fed065178da516a8d128e250bb213f61ed1c041496f0507f43b65f1d367b803576d5839280",
"binding_nonce_commitment": "ebf28407a07ee23191a9f1ba1d48d29e0a2262bd2c671a95906948222fa4ad9c6c03900dbded195730984b9eb24249566e33e1900053acfc80",
"binding_factor_input": "3832f82fda00ff5365b0376df705675b63d2a93c24c6e81d40801ba265632be10f443f95968fadb70d10786827f30dc001c8d0f9b7c1d1b000106dadce87ca867018702d69a02effd165e1ac1a511c957cff1897ceff2e34ca212fe798d84f0bde6054bf0fa77fd4cd4bc4853d6dc8dbd19d340923f0ebbbb35172df4ab865a45d55af31fa0e6606ea97cf8513022b2b133d0f9f6b8d3be184221fc4592bf12bd7fb4127bb67e51a6dc9e5637db62b249b236f09a4a0696a6c272f808b018da3eded6622a2cda4431ced451452541624ecf6a72aeebec807719bb2ccdfbe8990dc01f30402cea8704e1723a1cbb8a25614dcd4d7a965b4ccb0f1c5c679c36ead86441cbaba5482468442c6526b33777dfcbed92913d6e6890d3839c1ff030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"binding_factor": "68c0fa9226027efb64574782bd6e1f11e7e836adf20f1c7e1b3f57984039f07cc4cfdeaed6e87188ebac699b5726111f05abffb8ec2fad3d00"
}
}
]
},
"round_two_outputs": {
"participant_list": "1,3",
"participants": {
"1": {
"sig_share": "c5057c80d13e565545dac6f3aa333065c809a14a94fea3c8e4e87e386a9cb89602de7355c5d19ebb09d553b100ef1858104fc7c43992d83400"
"outputs": [
{
"identifier": 1,
"sig_share": "92641d2881fe04daf120497902a19ef2e05e5b3ccfedd0dafbeac9fab2a41ed22db8aa0cba23195b90d0a10e995cf9fbfa095644e76d811000"
},
"3": {
"sig_share": "2b490ea08411f78c620c668fff8ba70b25b7c89436f20cc45419213de70f93fb6c9094c79293697d72e741b68d2e493446005145d0b7fc3500"
{
"identifier": 3,
"sig_share": "d85010a45c06786b3c453e8861015676eaafb51df32d123021bcdbafe8345ffc4a96508cab576ccf86d6e316de5b40aa9ea3c8de5628880900"
}
}
]
},
"final_output": {
"sig": "83ac141d289a5171bc894b058aee2890316280719a870fc5c1608b77403023155d7a9dc15a2b7920bb5826dd540bf76336be99536cebe36280fd093275c38dd4be525767f537fd6a4f5d8a9330811562c84fded5f851ac4b926f6e081d586508397cbc95678e1d628c564f180a0a4ad52a00"
"sig": "e5609865bc23dc352690645e8e76f008f6a6438958914f2d2c5804b66329c42b403ba2a55362aab3d0153b8b69a8a3b4db9ce847143e9241806ab52dccdd047d452e66870164a2f468cb0e115ac21be30a1da7a5aa9bd97dce784efb98657b852a17a7852577b839a699ad1e233e96091a00"
}
}

View File

@ -44,11 +44,25 @@ lazy_static! {
#[test]
fn check_sign_with_test_vectors() {
frost_core::tests::vectors::check_sign_with_test_vectors::<Ed448Shake256>(&VECTORS);
}
#[test]
fn check_sign_with_test_vectors_with_big_identifiers() {
frost_core::tests::vectors::check_sign_with_test_vectors::<Ed448Shake256>(
&VECTORS_BIG_IDENTIFIER,
);
}
#[test]
fn check_error_culprit() {
frost_core::tests::ciphersuite_generic::check_error_culprit::<Ed448Shake256>();
}
#[test]
fn check_identifier_derivation() {
frost_core::tests::ciphersuite_generic::check_identifier_derivation::<Ed448Shake256>();
}
#[test]
fn check_sign_with_dealer_and_identifiers() {
let rng = thread_rng();

File diff suppressed because it is too large Load Diff

View File

@ -8,61 +8,70 @@
"hash": "SHA-256"
},
"inputs": {
"participant_list": [
1,
3
],
"group_secret_key": "8ba9bba2e0fd8c4767154d35a0b7562244a4aaf6f36c8fb8735fa48b301bd8de",
"group_public_key": "023a309ad94e9fe8a7ba45dfc58f38bf091959d3c99cfbd02b4dc00585ec45ab70",
"message": "74657374",
"share_polynomial_coefficients": [
"80f25e6c0709353e46bfbe882a11bdbb1f8097e46340eb8673b7e14556e6c3a4"
],
"participants": {
"1": {
"participant_shares": [
{
"identifier": 1,
"participant_share": "0c9c1a0fe806c184add50bbdcac913dda73e482daf95dcb9f35dbb0d8a9f7731"
},
"2": {
{
"identifier": 2,
"participant_share": "8d8e787bef0ff6c2f494ca45f4dad198c6bee01212d6c84067159c52e1863ad5"
},
"3": {
{
"identifier": 3,
"participant_share": "0e80d6e8f6192c003b5488ce1eec8f5429587d48cf001541e713b2d53c09d928"
}
}
]
},
"round_one_outputs": {
"participant_list": "1,3",
"participants": {
"1": {
"hiding_nonce_randomness": "f4e8cf80aec3f888d997900ac7e3e349944b5a6b47649fc32186d2f1238103c6",
"binding_nonce_randomness": "a7f220770b6f10ff54ec6afa55f99bd08cc92fa1a488c86e9bf493e9cb894cdf",
"hiding_nonce": "f871dfcf6bcd199342651adc361b92c941cb6a0d8c8c1a3b91d79e2c1bf3722d",
"binding_nonce": "bd3ece3634a1b303dea0586ed67a91fe68510f11ebe66e8868309b1551ef2388",
"hiding_nonce_commitment": "03987febbc67a8ed735affdff4d3a5adf22c05c80f97f311ab7437a3027372deb3",
"binding_nonce_commitment": "02a1960477d139035b986d6adcb06491378beb92ccd097ad94e76291c52343849d",
"binding_factor_input": "350c8b523feea9bb35720e9fbe0405ed48d78caa4fb60869f34367e144c68bb0fc77bf512409ad8b91e2ace4909229891a446c45683f5eb2f843dbec224527dc0000000000000000000000000000000000000000000000000000000000000001",
"binding_factor": "cb415dd1d866493ee7d2db7cb33929d7e430e84d80c58070e2bbb1fdbf76a9c8"
"outputs": [
{
"identifier": 1,
"hiding_nonce_randomness": "33c1270dea110665050fbc267a63aca53720d73bc7fc260fb1adcf322a5cfb87",
"binding_nonce_randomness": "aa07652d614a11a53e5307d3b1571efe42c7b2b8d76665df9df097ee9a623926",
"hiding_nonce": "1bbec0bfe9064ac5beba6d4b16c97d073169034db6be9739b926b9952c455407",
"binding_nonce": "7a0a250368f5c9938eef9fe33d1d9e0edfdd0926d65383c46e8bfd8361071f31",
"hiding_nonce_commitment": "03d4be662788b2f7e87f7b6ea14d28e1c65ca823fcd57eb7a85976f99b9d88cf17",
"binding_nonce_commitment": "03647507519b6a822ca8e6b3ec18c4584a9559b7deeb220c559820f8729f5470bd",
"binding_factor_input": "023a309ad94e9fe8a7ba45dfc58f38bf091959d3c99cfbd02b4dc00585ec45ab70350c8b523feea9bb35720e9fbe0405ed48d78caa4fb60869f34367e144c68bb0e22ae0546b7b9525ef382322fc02a746fad19e76464948c6670cd27ff0301da10000000000000000000000000000000000000000000000000000000000000001",
"binding_factor": "cfbba583b314888a1ca65654b9c198535b9bca937986ce3f3e0759f44d263afb"
},
"3": {
"hiding_nonce_randomness": "1b6149d252a0a0a6618b8d22a1c49897f9b0d23a48f19598e191e05dc7b7ae33",
"binding_nonce_randomness": "e13994bb75aafe337c32afdbfd08ae60dd108fc768845edaa871992044cabf1b",
"hiding_nonce": "802e9321f9f63688c6c1a9681a4a4661f71770e0cef92b8a5997155d18fb82ef",
"binding_nonce": "8b6b692ae634a24536f45dda95b2398af71cd605fb7a0bbdd9408d211ab99eba",
"hiding_nonce_commitment": "0212cac45ebd4100c97506939391f9be4ffc3ca2960e2ef95aeaa38abdede204ca",
"binding_nonce_commitment": "03017ce754d310eabda0f5681e61ce3d713cdd337070faa6a68471af49694a4e7e",
"binding_factor_input": "350c8b523feea9bb35720e9fbe0405ed48d78caa4fb60869f34367e144c68bb0fc77bf512409ad8b91e2ace4909229891a446c45683f5eb2f843dbec224527dc0000000000000000000000000000000000000000000000000000000000000003",
"binding_factor": "dfd82467569334e952edecb10d92adf85b8e299db0b40be3131a12efdfa3e796"
{
"identifier": 3,
"hiding_nonce_randomness": "943e64532c3ef5710bfd67945befd72205ed31f83de1df53dfb97fa58e08500d",
"binding_nonce_randomness": "22e88993adde960fdd7b6846288a56b87c4f7209ecd285ba4374b2636c5f5bb4",
"hiding_nonce": "f7979a769e7a80b2b636c8c9034efdba8c8643bf1a8b439ad1c37b8ff1a26710",
"binding_nonce": "48ad5e524512b337225c64735edb201ad15e41858b4a1cc7bfc9034c31a28d29",
"hiding_nonce_commitment": "034341c84a3cc97696b080938b5cb51da596d8dad7c78d1b34d0cf6f43753b1a8d",
"binding_nonce_commitment": "027e7950dcb446e4995521406a7ea00f9c4adecd505dad7f3f7da597f70a9b6216",
"binding_factor_input": "023a309ad94e9fe8a7ba45dfc58f38bf091959d3c99cfbd02b4dc00585ec45ab70350c8b523feea9bb35720e9fbe0405ed48d78caa4fb60869f34367e144c68bb0e22ae0546b7b9525ef382322fc02a746fad19e76464948c6670cd27ff0301da10000000000000000000000000000000000000000000000000000000000000003",
"binding_factor": "8036f2e50bbbe60415dd5f2dd167f3056ba8b33c86721b0edbfc5a05e5bd4acb"
}
}
]
},
"round_two_outputs": {
"participant_list": "1,3",
"participants": {
"1": {
"sig_share": "c5acd980310aaf87cb7a9a90428698ef3e6b1e5860f7fb06329bc0efe3f14ca5"
"outputs": [
{
"identifier": 1,
"sig_share": "18a95625cf125f7140bc209d4d9c9f64c737e600b5eb50096c3796516958295e"
},
"3": {
"sig_share": "1e064fbd35467377eb3fe161ff975e9ec3ed8e2e0d4c73f3a6b0a023777e1264"
{
"identifier": 3,
"sig_share": "d8dbc8d2d5993717618bb68e2e85f3df2d100583a71ecd6d45614e49b4d643fa"
}
}
]
},
"final_output": {
"sig": "029e07d4171dbf9a730ed95e9d95bda06fa4db76c88c519f7f3ca5483019f46cb0e3b3293d665122ffb6ba7bf2421df78e0258ac866e446ef9d94c61135b6f5f09"
"sig": "0386fb03f164dc1fd1f94be224445fe4fd8e3c1067ffb86bf6a192c1a358f62fe0f1851ef8a4ab9688a247d72b7c229343f447eb845d0a1d76b198e49b1e2e6d58"
}
}

View File

@ -44,9 +44,23 @@ lazy_static! {
#[test]
fn check_sign_with_test_vectors() {
frost_core::tests::vectors::check_sign_with_test_vectors::<P256Sha256>(&VECTORS);
}
#[test]
fn check_sign_with_test_vectors_with_big_identifiers() {
frost_core::tests::vectors::check_sign_with_test_vectors::<P256Sha256>(&VECTORS_BIG_IDENTIFIER);
}
#[test]
fn check_error_culprit() {
frost_core::tests::ciphersuite_generic::check_error_culprit::<P256Sha256>();
}
#[test]
fn check_identifier_derivation() {
frost_core::tests::ciphersuite_generic::check_identifier_derivation::<P256Sha256>();
}
#[test]
fn check_sign_with_dealer_and_identifiers() {
let rng = thread_rng();

View File

@ -42,6 +42,7 @@ pub fn sign<C: Ciphersuite>(
// binding factor.
let binding_factor_list = frost::compute_binding_factor_list(
signing_package,
key_package.group_public(),
<C::Group as Group>::serialize(randomizer_point).as_ref(),
);
@ -106,6 +107,7 @@ where
// binding factor.
let binding_factor_list = frost::compute_binding_factor_list(
signing_package,
pubkeys.group_public(),
<C::Group as Group>::serialize(randomized_params.randomizer_point()).as_ref(),
);

File diff suppressed because it is too large Load Diff

View File

@ -8,61 +8,70 @@
"hash": "SHA-512"
},
"inputs": {
"participant_list": [
1,
3
],
"group_secret_key": "1b25a55e463cfd15cf14a5d3acc3d15053f08da49c8afcf3ab265f2ebc4f970b",
"group_public_key": "e2a62f39eede11269e3bd5a7d97554f5ca384f9f6d3dd9c3c0d05083c7254f57",
"message": "74657374",
"share_polynomial_coefficients": [
"410f8b744b19325891d73736923525a4f596c805d060dfb9c98009d34e3fec02"
],
"participants": {
"1": {
"participant_shares": [
{
"identifier": 1,
"participant_share": "5c3430d391552f6e60ecdc093ff9f6f4488756aa6cebdbad75a768010b8f830e"
},
"2": {
{
"identifier": 2,
"participant_share": "b06fc5eac20b4f6e1b271d9df2343d843e1e1fb03c4cbb673f2872d459ce6f01"
},
"3": {
{
"identifier": 3,
"participant_share": "f17e505f0e2581c6acfe54d3846a622834b5e7b50cad9a2109a97ba7a80d5c04"
}
}
]
},
"round_one_outputs": {
"participant_list": "1,3",
"participants": {
"1": {
"hiding_nonce_randomness": "81800157bb554f299fe0b6bd658e4c4591d74168b5177bf55e8dceed59dc80c7",
"binding_nonce_randomness": "e9b37de02fde28f601f09051ed9a277b02ac81c803a5c72492d58635001fe355",
"hiding_nonce": "40f58e8df202b21c94f826e76e4647efdb0ea3ca7ae7e3689bc0cbe2e2f6660c",
"binding_nonce": "373dd42b5fe80e88edddf82e03744b6a12d59256f546de612d4bbd91a6b1df06",
"hiding_nonce_commitment": "b8c7319a56b296537436e5a6f509a871a3c74eff1534ec1e2f539ccd8b322411",
"binding_nonce_commitment": "7af5d4bece8763ce3630370adbd978699402f624fd3a7d2c71ea5839efc3cf54",
"binding_factor_input": "9c245d5fc2e451c5c5a617cc6f2a20629fb317d9b1c1915ab4bfa319d4ebf922c54dd1a5b3b754550c72734ac9255db8107a2b01f361754d9f13f428c2f6de9e4f609ae0dbe8bd1f95bee9f9ea219154d567ef174390bac737bb67ee1787c8a34279728d4aa99a6de2d5ce6deb86afe6bc68178f01223bb5eb934c8a23b6354e0100000000000000000000000000000000000000000000000000000000000000",
"binding_factor": "607df5e2e3a8b5e2704716693e18f548100a32b86a5685d3932a774c3f107e06"
"outputs": [
{
"identifier": 1,
"hiding_nonce_randomness": "e1f20967628cc118ede6a340bbec18f88a676d270823d443a6c03ddb4d5d9e24",
"binding_nonce_randomness": "b920c7bd488b42a3224299a4f245b2a1dc0bb1ad23c16b03432c5c1aafef06f6",
"hiding_nonce": "09b84762754062cee9b27373838c6b493cdd9c820f5a51620a43a0efae4ea101",
"binding_nonce": "06d4b840cadef85cd9404ee51c41212200c487423c1fe68590c24d83a3471707",
"hiding_nonce_commitment": "6c3356b8bf5e9e2c55ba903ad7f67ee7f082339cd598f7b8c04ad808155ce409",
"binding_nonce_commitment": "e011b45a279682bec3f8924117bf4a50bb5ca532a2c74fd41899811880731173",
"binding_factor_input": "e2a62f39eede11269e3bd5a7d97554f5ca384f9f6d3dd9c3c0d05083c7254f579c245d5fc2e451c5c5a617cc6f2a20629fb317d9b1c1915ab4bfa319d4ebf922c54dd1a5b3b754550c72734ac9255db8107a2b01f361754d9f13f428c2f6de9e5f5c38fa28d05010ef00438bbc8fedc1a50c46d265d53448558179f2a7574c012f70b4458b4b4c6582e397116d73ad2a001b06cf5701e466b1fbbe99572946570100000000000000000000000000000000000000000000000000000000000000",
"binding_factor": "376180fd0fa329212fbcf653d284caacf5a2857cb9dd06254a673c787c87d405"
},
"3": {
"hiding_nonce_randomness": "daeb223c4a913943cff2fb0b0e638dfcc281e1e8936ee6c3fef4d49ad9cbfaa0",
"binding_nonce_randomness": "c425768d952ab8f18b9720c54b93e612ba2cca170bb7518cac080896efa7429b",
"hiding_nonce": "491477c9dbe8717c77c6c1e2c5f4cec636c7c154313a44c91fea63e309f3e100",
"binding_nonce": "3ae1bba7d6f2076f81596912dd916efae5b3c2ef896956321194fdd2e52ebc0f",
"hiding_nonce_commitment": "e4466b7670ac4f9d9b7b67655860dd1ab341be18a654bb1966df53c76c85d511",
"binding_nonce_commitment": "ce47cd595d25d7effc3c095efa2a687a1728a5ecab402b39e0c0ad9a525ea54f",
"binding_factor_input": "9c245d5fc2e451c5c5a617cc6f2a20629fb317d9b1c1915ab4bfa319d4ebf922c54dd1a5b3b754550c72734ac9255db8107a2b01f361754d9f13f428c2f6de9e4f609ae0dbe8bd1f95bee9f9ea219154d567ef174390bac737bb67ee1787c8a34279728d4aa99a6de2d5ce6deb86afe6bc68178f01223bb5eb934c8a23b6354e0300000000000000000000000000000000000000000000000000000000000000",
"binding_factor": "2bd27271c28746eb93e2114d6778c12b44c9287d84b85dc780eb08da6f689900"
{
"identifier": 3,
"hiding_nonce_randomness": "054ddec7a2d303a915fda79f73e486639d759f2eae3929fd268e53c9672d45b3",
"binding_nonce_randomness": "95e9f6c87a8b5a580b8a019d5eb7d959d5ceb32dcf44d819340934520e8537ad",
"hiding_nonce": "fd8866d175ad3b6e945dd153980c1d696a9e34cd78f73c9b8941715e7f7e3c02",
"binding_nonce": "8a4dd5d19b85248dd2fadcb7649abbb897ac3a6e472540fac1f4cb3f39379802",
"hiding_nonce_commitment": "ba177131e0e5ae0ddcf0dd2284ae4c0b95e96c15c924d104c25d8a4ac60f1624",
"binding_nonce_commitment": "620e36f1c5f22a6f9667a75b54e33712b6c6c1b140225546be86c03224c68a16",
"binding_factor_input": "e2a62f39eede11269e3bd5a7d97554f5ca384f9f6d3dd9c3c0d05083c7254f579c245d5fc2e451c5c5a617cc6f2a20629fb317d9b1c1915ab4bfa319d4ebf922c54dd1a5b3b754550c72734ac9255db8107a2b01f361754d9f13f428c2f6de9e5f5c38fa28d05010ef00438bbc8fedc1a50c46d265d53448558179f2a7574c012f70b4458b4b4c6582e397116d73ad2a001b06cf5701e466b1fbbe99572946570300000000000000000000000000000000000000000000000000000000000000",
"binding_factor": "42f3993ed4f4f54d0e017d88c6e02f99d8549096a4db1ae6bc1b0637db083f0b"
}
}
]
},
"round_two_outputs": {
"participant_list": "1,3",
"participants": {
"1": {
"sig_share": "c38f438c325ce6bfa4272b37e7707caaeb57fa8c7ddcc05e0725acb8a7d9cd0c"
"outputs": [
{
"identifier": 1,
"sig_share": "4dfdf6c727011184cbd80324a1408b81ccc9cc99a52cf5078bd2e0ed8ff7b502"
},
"3": {
"sig_share": "4cb9917be3bd53f1d60f1c3d1a3ff563565fa15a391133e7f980e55d3aeb7904"
{
"identifier": 3,
"sig_share": "e9696a6100e56603eee88b83cb7ecf03bfe18ce5ac98ca0837539ddebdd7af01"
}
}
]
},
"final_output": {
"sig": "204d5d93aa486192ecf2f64ce7dbc1db76948fb1077d1a719ae1ecca6143501e2275dfaafbb62759a59a4fd122b692f941b79be7b6edf34501a69116e2c44701"
"sig": "cc03ccfd6252754619df0dc4e1890fe073c3ad3447480f0de9a4a220355294223667612928e67787b9c18fa76cbf5a858bab597f52c5bf10c2257ecc4dcf6504"
}
}

View File

@ -44,6 +44,10 @@ lazy_static! {
#[test]
fn check_sign_with_test_vectors() {
frost_core::tests::vectors::check_sign_with_test_vectors::<Ristretto255Sha512>(&VECTORS);
}
#[test]
fn check_sign_with_test_vectors_with_big_identifiers() {
frost_core::tests::vectors::check_sign_with_test_vectors::<Ristretto255Sha512>(
&VECTORS_BIG_IDENTIFIER,
);

File diff suppressed because it is too large Load Diff

View File

@ -8,61 +8,70 @@
"hash": "SHA-256"
},
"inputs": {
"participant_list": [
1,
3
],
"group_secret_key": "0d004150d27c3bf2a42f312683d35fac7394b1e9e318249c1bfe7f0795a83114",
"group_public_key": "02f37c34b66ced1fb51c34a90bdae006901f10625cc06c4f64663b0eae87d87b4f",
"message": "74657374",
"share_polynomial_coefficients": [
"fbf85eadae3058ea14f19148bb72b45e4399c0b16028acaf0395c9b03c823579"
],
"participants": {
"1": {
"participant_shares": [
{
"identifier": 1,
"participant_share": "08f89ffe80ac94dcb920c26f3f46140bfc7f95b493f8310f5fc1ea2b01f4254c"
},
"2": {
{
"identifier": 2,
"participant_share": "04f0feac2edcedc6ce1253b7fab8c86b856a797f44d83d82a385554e6e401984"
},
"3": {
{
"identifier": 3,
"participant_share": "00e95d59dd0d46b0e303e500b62b7ccb0e555d49f5b849f5e748c071da8c0dbc"
}
}
]
},
"round_one_outputs": {
"participant_list": "1,3",
"participants": {
"1": {
"hiding_nonce_randomness": "80cbea5e405d169999d8c4b30b755fedb26ab07ec8198cda4873ed8ce5e16773",
"binding_nonce_randomness": "f6d5b38197843046b68903048c1feba433e3500145281fa8bb1e26fdfeef5e7f",
"hiding_nonce": "acc83278035223c1ba464e2d11bfacfc872b2b23e1041cf5f6130da21e4d8068",
"binding_nonce": "c3ef169995bc3d2c2d48f30b83d0c63751e67ceb057695bcb2a6aa40ed5d926b",
"hiding_nonce_commitment": "036673d68a928793c33ae07776908eae8ea15dd947ed81284e939aaba118573a5e",
"binding_nonce_commitment": "03d2a96dd4ec1ee29dc22067109d1290dabd8016cb41856ee8ff9281c3fa1baffd",
"binding_factor_input": "a645d8249457bbcac34fa7b740f66bcce08fc39506b8bbf1a1c81092f6272eda82ae39234d714f87a7b91dd67d124a06561a36817c1ecaa255c3527d694fc4f10000000000000000000000000000000000000000000000000000000000000001",
"binding_factor": "d7bcbd29408dedc9e138262d99b09d8b5705d76eb5de2369d9103e4423f8ac79"
"outputs": [
{
"identifier": 1,
"hiding_nonce_randomness": "7cb32568d23bb6c75e341a0fcebc9471aea86ff1d049356761ebc2e950b9532f",
"binding_nonce_randomness": "bfcfbe6cc0f8ac29c6c727bc5bb8bf4433922b93553f59d92274ca62238bb392",
"hiding_nonce": "1cb8009dd46bd95028739e46019a2f72b3a7b1191c3c69227286b78baa9b7f84",
"binding_nonce": "c1cfdf7bd3dd6cba3b2c7636779dd8123327950356324fdbf069c9c057096a91",
"hiding_nonce_commitment": "03bd97bdd50a5f0de1a826b6f953b283014be515f1e6511b7877bc14353e138933",
"binding_nonce_commitment": "03a0e591354dac31abcf42fab5b33e15332ec64e94e1531e36727bfc57b3479b2b",
"binding_factor_input": "02f37c34b66ced1fb51c34a90bdae006901f10625cc06c4f64663b0eae87d87b4fa645d8249457bbcac34fa7b740f66bcce08fc39506b8bbf1a1c81092f6272edab58eadfcb68b028ec2de140ae16ed42e55acc32454a94c488b98b0a20495e80a0000000000000000000000000000000000000000000000000000000000000001",
"binding_factor": "68b412dbb0655bbf9d91ede1acc5dec71448ae6f65d4d75a4d578d4a861987ef"
},
"3": {
"hiding_nonce_randomness": "b9794047604beda0c5c0529ac9dfd83c0a80399a7bdf4c3e23cef2faf69cdcc3",
"binding_nonce_randomness": "c28ce6252631620b84c2702b34774fab365e286ebc77030a112ebccccbffa78b",
"hiding_nonce": "cb3387defef07fc9010c0564ba6495ed41876626ed86b886ca26cbbd3566ffbc",
"binding_nonce": "4559459735eb68e8c16319a9fd9a14016053957cb8cea273a24b7c7bc1ee26f6",
"hiding_nonce_commitment": "030278e6e6055fb963b40e0c3c37099f803f3f38930fc89092517f8ce1b47e8d6b",
"binding_nonce_commitment": "028eb6d238c6c0fc6216906706ad0ff9943c6c1d6079cdf74f674481ebb2485db3",
"binding_factor_input": "a645d8249457bbcac34fa7b740f66bcce08fc39506b8bbf1a1c81092f6272eda82ae39234d714f87a7b91dd67d124a06561a36817c1ecaa255c3527d694fc4f10000000000000000000000000000000000000000000000000000000000000003",
"binding_factor": "ecc057259f3c8b195308c9b73aaaf840660a37eb264ebce342412c58102ee437"
{
"identifier": 3,
"hiding_nonce_randomness": "c69b4b31b7fee771ded685f8356598d2294813e61355cd925530e4a330cd5b1b",
"binding_nonce_randomness": "5710a27cd72fda841321d86c211a5c99eb99bce3f093298e2bc188fb0f1af549",
"hiding_nonce": "d8e84f05afdf50109bbe89d11f619676d934c84320a51c856ee7b4cc460f2bb9",
"binding_nonce": "3f8ba2085123f8819cded2e12dbddbac0380a7294c247ad5d385ee8b0c65f8b4",
"hiding_nonce_commitment": "02b5a13f31c245b9b0c02ae0277833c298021ab3225786f461a7de7e7abc2a01c9",
"binding_nonce_commitment": "0259ad4280f6c477ac379350486df8696e8ae5a470ae04fea9cfad2905e751e19e",
"binding_factor_input": "02f37c34b66ced1fb51c34a90bdae006901f10625cc06c4f64663b0eae87d87b4fa645d8249457bbcac34fa7b740f66bcce08fc39506b8bbf1a1c81092f6272edab58eadfcb68b028ec2de140ae16ed42e55acc32454a94c488b98b0a20495e80a0000000000000000000000000000000000000000000000000000000000000003",
"binding_factor": "73643bffdf314bd7ab394a009515192a6f240e7ee16347b98f1202582e73ed92"
}
}
]
},
"round_two_outputs": {
"participant_list": "1,3",
"participants": {
"1": {
"sig_share": "1750b2a314a81b66fd81366583617aaafcffa68f14495204795aa0434b907aa3"
"outputs": [
{
"identifier": 1,
"sig_share": "d84d3c85959a968bf0f06245d5f746d23ca040db71232219e914eb9025c48804"
},
"3": {
"sig_share": "e4dbbbbbcb035eb3512918b0368c4ab2c836a92dccff3251efa7a4aacc7d3790"
{
"identifier": 3,
"sig_share": "16e10b99292455f8f0af08d3f17eff5526b63902543e652da94de13f39ff0ed3"
}
}
]
},
"final_output": {
"sig": "0259696aac722558e8638485d252bb2556f6241a7adfdf284c8c87a3428d46448dfc2c6e5edfab7a1a4eaa4f15b9edc55dc5364fbce1488456690244ee180db233"
"sig": "02a1263dcb051f0126192a77582ad78566d251b8454adaeb49497fee0f31f6200eef2e481ebebeec84e19f6b19c7764627635679ddc56187479262cccf5fc396d7"
}
}

View File

@ -44,11 +44,25 @@ lazy_static! {
#[test]
fn check_sign_with_test_vectors() {
frost_core::tests::vectors::check_sign_with_test_vectors::<Secp256K1Sha256>(&VECTORS);
}
#[test]
fn check_sign_with_test_vectors_with_big_identifiers() {
frost_core::tests::vectors::check_sign_with_test_vectors::<Secp256K1Sha256>(
&VECTORS_BIG_IDENTIFIER,
);
}
#[test]
fn check_error_culprit() {
frost_core::tests::ciphersuite_generic::check_error_culprit::<Secp256K1Sha256>();
}
#[test]
fn check_identifier_derivation() {
frost_core::tests::ciphersuite_generic::check_identifier_derivation::<Secp256K1Sha256>();
}
#[test]
fn check_sign_with_dealer_and_identifiers() {
let rng = thread_rng();

View File

@ -322,6 +322,7 @@ fn main() -> ExitCode {
"src/tests/proptests.rs",
"src/tests/vss_commitment.rs",
"tests/common_traits_tests.rs",
"tests/integration_tests.rs",
"tests/recreation_tests.rs",
"tests/serde_tests.rs",
"tests/helpers/samples.rs",