Put variable-length fields last (#103)
This helps prevent parsing issues in other implementations.
This commit is contained in:
parent
4cec6f87b4
commit
f7c153575b
14
src/frost.rs
14
src/frost.rs
|
@ -100,15 +100,15 @@ pub struct GroupCommitment(jubjub::ExtendedPoint);
|
|||
/// To derive a FROST keypair, the receiver of the [`SharePackage`] *must* call
|
||||
/// .into(), which under the hood also performs validation.
|
||||
pub struct SharePackage {
|
||||
/// The public signing key that represents the entire group.
|
||||
pub(crate) group_public: VerificationKey<SpendAuth>,
|
||||
/// Denotes the participant index each share is owned by. We implicitly
|
||||
/// restrict the number of participants to 255.
|
||||
pub index: u8,
|
||||
/// This participant's share.
|
||||
pub(crate) share: Share,
|
||||
/// This participant's public key.
|
||||
pub(crate) public: Public,
|
||||
/// The public signing key that represents the entire group.
|
||||
pub(crate) group_public: VerificationKey<SpendAuth>,
|
||||
/// This participant's share.
|
||||
pub(crate) share: Share,
|
||||
}
|
||||
|
||||
impl TryFrom<SharePackage> for KeyPackage {
|
||||
|
@ -379,11 +379,13 @@ impl From<(u8, &SigningNonces)> for SigningCommitments {
|
|||
/// Generated by the coordinator of the signing operation and distributed to
|
||||
/// each signing party.
|
||||
pub struct SigningPackage {
|
||||
/// Message which each participant will sign
|
||||
pub message: &'static [u8],
|
||||
/// The set of commitments participants published in the first round of the
|
||||
/// protocol.
|
||||
pub signing_commitments: Vec<SigningCommitments>,
|
||||
/// Message which each participant will sign.
|
||||
///
|
||||
/// Each signer should perform protocol-specific verification on the message.
|
||||
pub message: &'static [u8],
|
||||
}
|
||||
|
||||
/// A participant's signature share, which the coordinator will use to aggregate
|
||||
|
|
Loading…
Reference in New Issue