ligo/src/proto/environment/ed25519.mli

37 lines
972 B
OCaml
Raw Normal View History

2016-09-08 21:13:10 +04:00
(** Tezos - Ed25519 cryptography *)
(** {2 Signature} ************************************************************)
(** An Ed25519 public key *)
type public_key
(** An Ed25519 secret key *)
type secret_key
(** The result of signing a sequence of bytes with a secret key *)
type signature
(** Signs a sequence of bytes with a secret key *)
val sign : secret_key -> MBytes.t -> signature
(** Checks a signature *)
val check_signature : public_key -> signature -> MBytes.t -> bool
(** {2 Hashed public keys for user ID} ***************************************)
module Public_key_hash : Hash.HASH
(** Hashes an Ed25519 public key *)
val hash : public_key -> Public_key_hash.t
2016-09-08 21:13:10 +04:00
(** {2 Serializers} **********************************************************)
val public_key_encoding : public_key Data_encoding.t
val secret_key_encoding : secret_key Data_encoding.t
val signature_encoding : signature Data_encoding.t
2017-02-24 18:38:42 +04:00
val public_key_of_bytes : Bytes.t -> public_key