package tezos-base

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

PVSS construction, based on a cyclic group G of prime order

module type ENCODED = sig ... end
module Public_key : sig ... end
module Secret_key : sig ... end
type proof
val proof_encoding : proof Data_encoding.t
val dealer_shares_and_proof : secret:Secret_key.t -> threshold:int -> public_keys:Public_key.t list -> Encrypted_share.t list * Commitment.t list * proof

Lets a dealer share a secret with a set of participant by breaking it into pieces, encrypting it with the participant's public keys, and publishing these encrypted shares. Any t = threshold participants can reconstruct the secret. A zero-knowledge proof is produced showing that the dealer correctly followed the protocol, making the protocol publicly verifiable.

val check_dealer_proof : Encrypted_share.t list -> Commitment.t list -> proof:proof -> public_keys:Public_key.t list -> bool

Checks the proof produced by the dealer, given the encrypted shares, the commitment list, the proof, and the participant's public keys.

val reveal_share : Encrypted_share.t -> secret_key:Secret_key.t -> public_key:Public_key.t -> Clear_share.t * proof

Lets a participant provably decrypt an encrypted share.

val check_revealed_share : Encrypted_share.t -> Clear_share.t -> public_key:Public_key.t -> proof -> bool

Checks that the participant honestly decrypted its share.

val reconstruct : Clear_share.t list -> int list -> Public_key.t
OCaml

Innovation. Community. Security.