add more binary modules
This commit is contained in:
parent
7cc01ca1e4
commit
f61be975ec
1 changed files with 80 additions and 0 deletions
|
|
@ -95,6 +95,86 @@ module Blinded_coin_hash = MAKE_H (Hash_code)
|
||||||
module Coin_pub_hash = MAKE_H (Hash_code)
|
module Coin_pub_hash = MAKE_H (Hash_code)
|
||||||
module Output_commitment_hash = MAKE_H (Hash_code)
|
module Output_commitment_hash = MAKE_H (Hash_code)
|
||||||
|
|
||||||
|
module Ecdh_ephemeral_public_key_p = struct
|
||||||
|
type t = { ecdh_pub: string (* = uint8_t ecdh_pub[32] *) }
|
||||||
|
|
||||||
|
let bin =
|
||||||
|
let open Bin in
|
||||||
|
record (fun ecdh_pub -> { ecdh_pub })
|
||||||
|
|+ field (bytes 32) (fun t -> t.ecdh_pub)
|
||||||
|
|> sealr
|
||||||
|
end
|
||||||
|
|
||||||
|
module Reserve_public_key_p = struct
|
||||||
|
type t = { eddsa_pub: string }
|
||||||
|
|
||||||
|
let bin =
|
||||||
|
let open Bin in
|
||||||
|
record (fun eddsa_pub -> { eddsa_pub })
|
||||||
|
|+ field (bytes 32) (fun t -> t.eddsa_pub)
|
||||||
|
|> sealr
|
||||||
|
end
|
||||||
|
|
||||||
|
module Reserve_private_key_p = struct
|
||||||
|
type t = { eddsa_priv: string }
|
||||||
|
|
||||||
|
let bin =
|
||||||
|
let open Bin in
|
||||||
|
record (fun eddsa_priv -> { eddsa_priv })
|
||||||
|
|+ field (bytes 32) (fun t -> t.eddsa_priv)
|
||||||
|
|> sealr
|
||||||
|
end
|
||||||
|
|
||||||
|
module Reserve_signature_p = struct
|
||||||
|
type t = { eddsa_signature: string }
|
||||||
|
|
||||||
|
let bin =
|
||||||
|
let open Bin in
|
||||||
|
record (fun eddsa_signature -> { eddsa_signature })
|
||||||
|
|+ field (bytes 64) (fun t -> t.eddsa_signature)
|
||||||
|
|> sealr
|
||||||
|
end
|
||||||
|
|
||||||
|
module Merchant_public_key_p = struct
|
||||||
|
type t = { eddsa_pub: string }
|
||||||
|
|
||||||
|
let bin =
|
||||||
|
let open Bin in
|
||||||
|
record (fun eddsa_pub -> { eddsa_pub })
|
||||||
|
|+ field (bytes 32) (fun t -> t.eddsa_pub)
|
||||||
|
|> sealr
|
||||||
|
end
|
||||||
|
|
||||||
|
module Merchant_private_key_p = struct
|
||||||
|
type t = { eddsa_priv: string }
|
||||||
|
|
||||||
|
let bin =
|
||||||
|
let open Bin in
|
||||||
|
record (fun eddsa_priv -> { eddsa_priv })
|
||||||
|
|+ field (bytes 32) (fun t -> t.eddsa_priv)
|
||||||
|
|> sealr
|
||||||
|
end
|
||||||
|
|
||||||
|
module Transfert_public_key_p = struct
|
||||||
|
type t = { ecdhe_pub: string }
|
||||||
|
|
||||||
|
let bin =
|
||||||
|
let open Bin in
|
||||||
|
record (fun ecdhe_pub -> { ecdhe_pub })
|
||||||
|
|+ field (bytes 32) (fun t -> t.ecdhe_pub)
|
||||||
|
|> sealr
|
||||||
|
end
|
||||||
|
|
||||||
|
module Transfert_private_key_p = struct
|
||||||
|
type t = { ecdhe_priv: string }
|
||||||
|
|
||||||
|
let bin =
|
||||||
|
let open Bin in
|
||||||
|
record (fun ecdhe_priv -> { ecdhe_priv })
|
||||||
|
|+ field (bytes 32) (fun t -> t.ecdhe_priv)
|
||||||
|
|> sealr
|
||||||
|
end
|
||||||
|
|
||||||
(* -- Signatures -- *)
|
(* -- Signatures -- *)
|
||||||
|
|
||||||
module Purpose = struct
|
module Purpose = struct
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue