Copyright | Vergara Technologies 2025 |
---|---|
License | MIT |
Maintainer | contact@vergara.tech |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Frost.Sign
Description
This module contains the functions needed to perform a FROST signature
ceremony with multiple participants. Any participant can act as the
coordinator and signal the other participants to begin the ceremony by using
generateCommits
. The generated SigningCommitments
need to be shared
with the coordinator and each participant keeps their SigningNonces
for
the rest of the process.
The coordinator creates the SigningPackage
using generateSigningPackage
and distributes it to all participants. Participants should validate that
the message in the SigningPackage
is the message they intend to sign. The
message should be validated by each participant.
Each participant signs the SigningPackage
using sign
and their
respective key shard and then returns the SignatureShare
to the
coordinator.
The coordinator combines each participant's SignatureShare
with the
aggregate
function to produce the full FROST Signature
.
For more details, see the FROST book.
Synopsis
- generateCommits :: KeyPackage -> Maybe SigningPkgR1
- generateSigningPackage :: Text -> [SignPayload] -> PublicKeyPackage -> Maybe SigningPkgR2
- getMessage :: SigningPackage -> Maybe ByteString
- sign :: SigningPackage -> SigningNonces -> KeyPackage -> Randomizer -> Maybe SignatureShare
- aggregate :: SigningPackage -> [AggregatePayload] -> PublicKeyPackage -> Randomizer -> Maybe Signature
- verify :: PublicKeyPackage -> ByteString -> Signature -> Randomizer -> Bool
Documentation
Arguments
:: KeyPackage | The private key shard for the participant |
-> Maybe SigningPkgR1 |
Generates the SigningNonces
and SigningCommitments
for the first round of signing
Arguments
:: Text | The message to sign |
-> [SignPayload] | A list of the participants' commitments and their corresponding |
-> PublicKeyPackage | The public key package created by the key generation ceremony |
-> Maybe SigningPkgR2 |
Generates the signing package required to create SignatureShare
s on the next round
Arguments
:: SigningPackage | The signing package created by the coordinator |
-> Maybe ByteString |
Extracts the message used in the SigningPkgR2
Arguments
:: SigningPackage | The signing package created by the coordinator |
-> SigningNonces | The signing nonces created by the participant during the first round |
-> KeyPackage | The participant's secret key shard |
-> Randomizer | The randomizer used by the coordinator to create the signing package |
-> Maybe SignatureShare |
Signs the SigningPackage
provided by the coordinator with the participant's key shard
Arguments
:: SigningPackage | The signing package created by the coordinator |
-> [AggregatePayload] | The list of |
-> PublicKeyPackage | The public key package created by the key generation ceremony |
-> Randomizer | The randomizer used by the coordinator to create the signing package |
-> Maybe Signature |
Aggregates the participants' SignatureShare
s into a full FROST signature
Arguments
:: PublicKeyPackage | The public key package created by the key generation ceremony |
-> ByteString | The message that was signed |
-> Signature | The FROST signature to validate |
-> Randomizer | The randomizer used by the coordinator to create the signing package |
-> Bool |
Verify a FROST signature