OpenAgentID documentation
Source referencesRust module referenceaegis-keys

aegis-keys · threshold

Declared module signatures, types, configuration, and source documentation.

Source: aegis/aegis-keys/src/threshold.rs. SHA-256: eb57d17d0e98d3cd7804edb24fa1ddeb9ac82eeaaa46f2495595d4f5fe48b8a0.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

threshold::ThresholdKeyPackages

Result of threshold key generation.

pub struct ThresholdKeyPackages {
/// Per-participant key packages (one per signer).

pub key_packages: BTreeMap<frost::Identifier, frost::keys::KeyPackage>,
/// The group public key (verifying key for the threshold group).

pub public_key_package: frost::keys::PublicKeyPackage
}

Source line: 15.

threshold::generate_shares

Generate threshold key shares using FROST trusted dealer.

Creates a t-of-n threshold key setup where min_signers (t) out of max_signers (n) participants are required to produce a valid signature.

Arguments

  • min_signers - Minimum number of signers required (threshold t)
  • max_signers - Total number of participants (n)

Errors

Returns KeyError::GenerationFailed if FROST key generation fails.

pub fn generate_shares(
    min_signers: u16,
    max_signers: u16,
) -> Result<ThresholdKeyPackages, KeyError>;

Source line: 33.

threshold::sign_with_threshold

Perform a complete threshold signing round (for testing/single-process use).

In production, each step would happen on a separate machine. This function runs the full 2-round FROST protocol in a single process for validation.

Arguments

  • message - The message bytes to sign
  • key_packages - Per-participant key packages (at least t of them)
  • public_key_package - The group public key package

Errors

Returns KeyError::SigningFailed if any round fails.

pub fn sign_with_threshold(
    message: &[u8],
    key_packages: &BTreeMap<frost::Identifier, frost::keys::KeyPackage>,
    public_key_package: &frost::keys::PublicKeyPackage,
) -> Result<frost::Signature, KeyError>;

Source line: 77.

threshold::verify_threshold_signature

Verify a FROST threshold signature against the group public key.

Arguments

  • message - The original message bytes
  • signature - The aggregated FROST signature
  • public_key_package - The group public key package

Returns

true if the signature is valid, false otherwise.

pub fn verify_threshold_signature(
    message: &[u8],
    signature: &frost::Signature,
    public_key_package: &frost::keys::PublicKeyPackage,
) -> bool;

Source line: 130.

On this page