package octez-proto-libs

  1. Overview
  2. Docs
Octez protocol libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.0.tar.gz
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a

doc/octez-proto-libs.protocol-environment/Tezos_protocol_environment/V10/Make/Timelock/index.html

Module Make.TimelockSource

type chest = Tezos_crypto.Timelock.chest

Contains a value (the decryption of the ciphertext) that can be provably recovered in time sequential operation or with the rsa secret.

val chest_encoding : chest Data_encoding.t
type chest_key = Tezos_crypto.Timelock.chest_key

Provably opens a chest in a short time.

val chest_key_encoding : chest_key Data_encoding.t
type opening_result = Tezos_crypto.Timelock.opening_result =
  1. | Correct of Bytes.t
  2. | Bogus_opening

Result of the opening of a chest. The opening can fail if one provides a false unlocked_value or unlocked_proof, in which case we return Bogus_opening and the provider of the chest key is at fault. Otherwise we return Correct payload where payload was what had originally been put in the chest.

val open_chest : chest -> chest_key -> time:int -> opening_result

Takes a chest, chest key and time and tries to recover the underlying plaintext. See the documentation of opening_result.

val get_plaintext_size : chest -> int

Gives the size of the underlying plaintext in a chest in bytes. Used for gas accounting

OCaml

Innovation. Community. Security.