package octez-proto-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053
doc/octez-proto-libs.protocol-environment/Tezos_protocol_environment/V7/Make/Timelock/index.html
Module Make.Timelock
Source
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
val chest_key_encoding : chest_key Data_encoding.t
type opening_result = Tezos_crypto.Timelock_legacy.opening_result =
| Correct of Bytes.t
| Bogus_cipher
| Bogus_opening
Result of the opening of a chest. The opening can fail in two way which we distinguish to blame the right person. One can provide 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, one can lock the wrong key or put garbage in the ciphertext in which case we return Bogus_cipher
and the provider of the chest 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