+ secmod; + .master_sig
This commit is contained in:
parent
bc6ea09a59
commit
aa2ff7b2f0
6 changed files with 66 additions and 43 deletions
|
|
@ -1,6 +1,7 @@
|
|||
open Types
|
||||
|
||||
type t = {
|
||||
pub: RsaPublicKey.t;
|
||||
section_name: string;
|
||||
value: Amount.t;
|
||||
stamp_start: Ptime.t;
|
||||
|
|
@ -11,8 +12,9 @@ type t = {
|
|||
fee_deposit: Amount.t;
|
||||
fee_refresh: Amount.t;
|
||||
fee_refund: Amount.t;
|
||||
pub: RsaPublicKey.t;
|
||||
h_pub: Binary_formats.DenominationHash.t;
|
||||
sign: string -> RsaSignature.t;
|
||||
master_sig: EddsaSignature.t option;
|
||||
}
|
||||
|
||||
let hash_pub _pub =
|
||||
|
|
@ -49,8 +51,11 @@ let make
|
|||
let open Mirage_crypto_pk.Rsa in
|
||||
let priv = generate ~bits:rsa_keysize () in
|
||||
let pub = pub_of_priv priv in
|
||||
let h_pub = Binary_formats.DenominationHash.hash pub in
|
||||
let sign = RsaSignature.sign ~key:priv in
|
||||
let master_sig = None in
|
||||
{
|
||||
pub;
|
||||
section_name;
|
||||
value;
|
||||
stamp_start;
|
||||
|
|
@ -61,6 +66,7 @@ let make
|
|||
fee_deposit;
|
||||
fee_refresh;
|
||||
fee_refund;
|
||||
pub;
|
||||
h_pub;
|
||||
sign;
|
||||
master_sig;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue