package octez-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13
doc/octez-libs.bls12-381-signature/Bls12_381_signature/MinSig/index.html
Module Bls12_381_signature.MinSig
Source
BLS signatures instantiation minimizing the size of the signatures (48 bytes) but use longer public keys (96 bytes).
Type of the public keys
The size of a serialized value pk
Build a value of type pk
without performing any check on the input (hence the unsafe prefix because it might not give a correct inhabitant of the type pk
). 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 G2.
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. Raise Invalid_argument
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 G2.
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 G2.
Returns a bytes representation of a value of type pk
. The output is the compressed form of the point Bls12_381.Bls12_381.G2.t
the pk
represents.
Type of the signatures
The size of a serialized value signature
Build a value of type signature
without performing any check on the input (hence the unsafe prefix because it might not give a correct inhabitant of the type signature
). 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_signature_of_bytes
removes a verification performed twice when used signature_of_bytes_exn
or signature_of_bytes_opt
.
The expected bytes format are the compressed form of a point on G1.
Build a value of type signature
safely, i.e. the function checks the bytes given in parameters represents a point on the curve and in the prime subgroup. Raise Invalid_argument
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.
Build a value of type signature
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.
Returns a bytes representation of a value of type signature
. The output is the compressed form a the point Bls12_381.G1.t
the signature
represents.
aggregate_signature_opt signatures
aggregates the signatures signatures
, following section 2.8. Return None
if INVALID
is expected in the specification
Basic scheme described in section 3.1
Augmentation scheme described in section 3.2
Follow section 3.3.