Raw.Ciphertext
type t = {
cv : CV.t;
epk : DH.epk;
payload_enc : Stdlib.Bytes.t;
nonce_enc : Mavryk_crypto.Crypto_box.nonce;
payload_out : Stdlib.Bytes.t;
nonce_out : Mavryk_crypto.Crypto_box.nonce;
}
val encoding : t Data_encoding.encoding
type plaintext = {
diversifier : Viewing_key.diversifier;
amount : int64;
rcm : Rcm.t;
memo : Stdlib.Bytes.t;
}
val plaintext_encoding : plaintext Data_encoding.encoding
val get_memo_size : t -> int
val encrypt_aux :
Mavryk_crypto.Crypto_box.Secretbox.key ->
int64 ->
Viewing_key.address ->
Rcm.t ->
Stdlib.Bytes.t ->
R.esk ->
CV.t ->
t
val encrypt :
int64 ->
Viewing_key.address ->
Viewing_key.t ->
Rcm.t ->
Stdlib.Bytes.t ->
(R.cv * R.commitment * R.epk) ->
R.esk ->
t
val encrypt_without_ovk :
int64 ->
Viewing_key.address ->
Rcm.t ->
Stdlib.Bytes.t ->
R.esk ->
CV.t ->
t
val decrypt :
t ->
Viewing_key.t ->
(Viewing_key.address * int64 * Rcm.t * Stdlib.Bytes.t) option
val decrypt_ovk :
t ->
R.ovk ->
(R.commitment * R.epk) ->
(Viewing_key.address * int64 * Rcm.t * Stdlib.Bytes.t) option