package bls12-381-signature

  1. Overview
  2. Docs
Implementation of BLS signatures for the pairing-friendly curve BLS12-381

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocaml-bls12-381-signature-0.0.1.tar.bz2
md5=cdbf6e9ebfbdb85d1c711d0e4e88ec92
sha512=25ecba471bebbc648f91476521680e4e93b6172c271797344b42d9f64100ef63efca133af1e1f6562d74d10a3d35db5d369033b97e468716fe5a1237ec267e1e

doc/bls12-381-signature/Bls12_381_signature/index.html

Module Bls12_381_signatureSource

Follow the BLS signature draft of CFRG, version 4

Sourcetype sk

Type of the secret keys.

Sourceval sk_size_in_bytes : int

The size of a serialized value sk

Sourceval sk_of_bytes_exn : Bytes.t -> sk

sk_of_bytes_exn bs attempts to deserialize bs into a secret key. bs must be the little endian representation of the secret key. In this case, secret keys are scalars of BLS12-381 and are encoded on 32 bytes. The bytes sequence might be less of 32 bytes and in this case, the bytes sequence is padded on the right by 0's.

Sourceval sk_of_bytes_opt : Bytes.t -> sk option

sk_of_bytes_opt bs is the same than sk_of_bytes_exn but returns an option instead of an exception.

Sourceval sk_to_bytes : sk -> Bytes.t

sk_to_bytes sk serialises the secret key into the little endian representation.

Sourceval generate_sk : ?key_info:Bytes.t -> Bytes.t -> sk

generate_sk ?key_info ikm generates a new (random) secret key. ikm must be at least 32 bytes (otherwise, raise Invalid_argument). The default value of key_info is the empty bytes sequence.

Sourcemodule MinPk : sig ... end

BLS signatures instantiation minimizing the size of the public keys (48 bytes) but use longer signatures (96 bytes).

Sourcemodule MinSig : sig ... end

BLS signatures instantiation minimizing the size of the signatures (48 bytes) but use longer public keys (96 bytes).