package octez-proto-libs

  1. Overview
  2. Docs
Octez protocol libraries

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.1.tar.gz
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053

doc/octez-proto-libs.protocol-environment/Tezos_protocol_environment/V4/Make/Bls_signature/index.html

Module Make.Bls_signatureSource

Sourcetype pk = Bls12_381_signature.MinPk.pk

Type of the public keys

Sourcetype signature = Bytes.t

Build a value of type pk without performing any check on the input. It is safe to use this function when verifying a signature as the signature function verifies if the point is in the prime subgroup. Using unsafe_pk_of_bytes removes a verification performed twice when used pk_of_bytes_exn or pk_of_bytes_opt.

The expected bytes format are the compressed form of a point on G1.

Sourceval unsafe_pk_of_bytes : Bytes.t -> pk
Sourceval pk_of_bytes_opt : Bytes.t -> pk option

Build a value of type pk safely, i.e. the function checks the bytes given in parameters represents a point on the curve and in the prime subgroup. Return None if the bytes are not in the correct format or does not represent a point in the prime subgroup.

The expected bytes format are the compressed form of a point on G1.

Sourceval pk_to_bytes : pk -> Bytes.t

Returns a bytes representation of a value of type pk. The output is the compressed form a the point G1.t the pk represents.

Sourceval aggregate_signature_opt : Bytes.t list -> Bytes.t option

aggregate_signature_opt signatures aggregates the signatures signatures, following https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-bls-signature-04#section-2.8. Return None if INVALID is expected in the specification

Sourceval verify : pk -> Bytes.t -> signature -> bool
Sourceval aggregate_verify : (pk * Bytes.t) list -> signature -> bool
OCaml

Innovation. Community. Security.