package octez-proto-libs

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

Size of a group element, also called form, in bytes

val discriminant_size_bytes : int

Size of the class group discriminant in bytes

type discriminant

Class group discriminant, prime number uniquely defining a class group

type challenge

VDF challenge

type result

VDF result

type proof

VDF proof

type difficulty = Int64.t

VDF difficulty, that is log of the number of group element compositions done in the prover

val discriminant_to_bytes : discriminant -> bytes
val discriminant_of_bytes_opt : bytes -> discriminant option
val challenge_to_bytes : challenge -> bytes
val challenge_of_bytes_opt : bytes -> challenge option
val result_to_bytes : result -> bytes
val result_of_bytes_opt : bytes -> result option
val proof_to_bytes : proof -> bytes
val proof_of_bytes_opt : bytes -> proof option
val generate_discriminant : ?seed:Bytes.t -> int -> discriminant

generate_discriminant ?seed size, function generating a discriminant/group

val generate_challenge : discriminant -> Bytes.t -> challenge

generate_challenge discriminant seed, function generating a class group element used as a VDF challenge

prove_vdf discriminant challenge difficulty, function taking a class group/discriminant, a vdf challenge and a difficulty and returning a vdf result and proof

val verify : discriminant -> challenge -> difficulty -> result -> proof -> bool

verify_vdf discriminant challenge difficulty result proof function taking a class group/discriminant, a vdf challenge, difficulty, result and proof and returning true if the proof verifies else false

OCaml

Innovation. Community. Security.