Copyright | Vergara Technologies LLC 2025 |
---|---|
License | MIT |
Maintainer | contact@vergara.tech |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Frost.DKG
Description
This module contains the functions needed to perform a FROST Distributed Key
Generation ceremony. To ensure security, the Identifier
s should be generated
from values that are unique and that the participants can authenticate.
First, a round 1 package is created for each participant using their
Identifier
. The public package is shared with other participants and the
private package is kept for the next round.
For round 2, each participant uses the other participants' public packages from
round 1 and their SecretPackageR1
to create their SecretPackageR2
and a
list of PackageR2
s, one for each other participant in the ceremony. These
PackageR2
s need to be provided to the corresponding participant, based on the
Identifier
.
Each participant collects the PackageR2
s received from the other
participants, the PackageR1
s from the previous round and the
SecretPackageR2
and uses generateKeyShare
to create their individual private key
share and the group public key.
Synopsis
- testDkgPkg1 :: Text -> Text
- generateIdentifier :: Text -> Maybe Identifier
- generateDkgPkg1 :: Int16 -> Int16 -> Identifier -> Maybe DkgPkg1
- generateDkgPkg2 :: SecretPackageR1 -> [PayloadR1] -> Maybe DkgPkg2
- generateKeyShare :: SecretPackageR2 -> [PayloadR1] -> [PayloadR2] -> Maybe DkgKeyPackage
Documentation
testDkgPkg1 :: Text -> Text #
Arguments
:: Text | A string used to derive the identifier |
-> Maybe Identifier |
Generates an Identifier for participants in the key generation ceremony
Arguments
:: Int16 | The max number of signers. Should be greater than 2. |
-> Int16 | The min number of signers. Should be greater than 2 and less than or equal to the max signers. |
-> Identifier | The identifier that will represent this participant during DKG. |
-> Maybe DkgPkg1 |
Generate the Round 1 package. See DkgPkg1
for details.
Arguments
:: SecretPackageR1 | The Round 1 secret package in |
-> [PayloadR1] | The list of Round 1 public packages from the other participants, including their |
-> Maybe DkgPkg2 |
Generate the Round 2 package. See DkgPkg2
for details.
Arguments
:: SecretPackageR2 | The Round 2 secret package in |
-> [PayloadR1] | The list of Round 1 public packages from the other participants, including their |
-> [PayloadR2] | The list of Round 2 packages generated by the other participants sent to this participant. |
-> Maybe DkgKeyPackage |
Generate the participant's FROST key share. See DkgKeyPackage
for details.