package secp256k1-internal

  1. Overview
  2. Docs

Module External.KeySource

Sourcetype secret
Sourcetype public
Sourcetype _ t
Sourceval buffer : _ t -> Bigstring.t

buffer k is the underlying buffer of k. DO NOT MODIFY.

Sourceval secret_bytes : int

Length of a secret key in memory: 32 bytes

Sourceval public_bytes : int

Length of a public key in memory: 64 bytes

Sourceval compressed_pk_bytes : int

Length of the compressed serialization of a public key: 33 bytes

Sourceval uncompressed_pk_bytes : int

Length of the uncompressed serialization of a public key: 65 bytes

Sourceval bytes : _ t -> int

bytes k is the length of k in memory (the length of the underlying Bigstring.t).

Sourceval serialized_bytes : ?compressed:bool -> _ t -> int

serialized_bytes ?compressed k is the length of the serialization (compressed) of k.

Sourceval equal : 'a t -> 'a t -> bool
Sourceval copy : 'a t -> 'a t

Aritmetic operations

Sourceval negate : Context.t -> 'a t -> 'a t
Sourceval add_tweak : Context.t -> 'a t -> Bigstring.t -> 'a t
Sourceval mul_tweak : Context.t -> 'a t -> Bigstring.t -> 'a t
Sourceval neuterize : Context.t -> _ t -> public t option
Sourceval neuterize_exn : Context.t -> _ t -> public t
Sourceval combine : Context.t -> _ t list -> public t option
Sourceval combine_exn : Context.t -> _ t list -> public t

Input/Output

Sourceval read_sk : Context.t -> Bigstring.t -> (secret t, string) result
Sourceval read_sk_exn : Context.t -> Bigstring.t -> secret t
Sourceval read_pk : Context.t -> Bigstring.t -> (public t, string) result
Sourceval read_pk_exn : Context.t -> Bigstring.t -> public t
Sourceval write : ?compress:bool -> Context.t -> ?pos:int -> Bigstring.t -> _ t -> int
Sourceval to_bytes : ?compress:bool -> Context.t -> _ t -> Bigstring.t
OCaml

Innovation. Community. Security.