frost-haskell
CopyrightVergara Technologies LLC 2025
LicenseMIT
Maintainercontact@vergara.tech
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Frost.DKG

Description

This module contains the functions needed to perform a FROST Distributed Key Generation ceremony. To ensure security, the Identifiers 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 PackageR2s, one for each other participant in the ceremony. These PackageR2s need to be provided to the corresponding participant, based on the Identifier.

Each participant collects the PackageR2s received from the other participants, the PackageR1s from the previous round and the SecretPackageR2 and uses generateKeyShare to create their individual private key share and the group public key.

Synopsis

Documentation

generateIdentifier #

Arguments

:: Text

A string used to derive the identifier

-> Maybe Identifier 

Generates an Identifier for participants in the key generation ceremony

generateDkgPkg1 #

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.

generateDkgPkg2 #

Arguments

:: SecretPackageR1

The Round 1 secret package in DkgPkg1 generated with generateDkgPkg1

-> [PayloadR1]

The list of Round 1 public packages from the other participants, including their Identifier

-> Maybe DkgPkg2 

Generate the Round 2 package. See DkgPkg2 for details.

generateKeyShare #

Arguments

:: SecretPackageR2

The Round 2 secret package in DkgPkg2 generated with generateDkgPkg2

-> [PayloadR1]

The list of Round 1 public packages from the other participants, including their Identifier

-> [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.