This commit is contained in:
swrup 2026-02-05 18:03:45 +01:00
parent 47925c05da
commit a3a8e1788d
4 changed files with 8 additions and 8 deletions

View file

@ -782,7 +782,8 @@ module ExchangeKeySet = struct
(* purpose.purpose = TALER_SIGNATURE_EXCHANGE_KEY_SET *)
type r = {
list_issue_date: TimestampNBO.t;
hc: Hash_64.t;
(* hash over a concatenation of master_sigs *)
hc: H64.t;
}
let bin =
@ -791,7 +792,7 @@ module ExchangeKeySet = struct
record (fun _purpose list_issue_date hc -> { list_issue_date; hc })
|+ Purpose.field _purpose
|+ field TimestampNBO.bin (fun t -> t.list_issue_date)
|+ field Hash_64.bin (fun t -> t.hc)
|+ field H64.bin (fun t -> t.hc)
|> sealr
end

View file

@ -182,7 +182,7 @@ let mk_keys ~db_conn (module Sm : Secmod.S) ~last_issue_date =
|> List.filter_map (fun v -> v.Denom_data.master_sig)
|> List.map Bin_sig.DenominationKeyValidity.to_octets
|> String.concat ""
|> Hash.Hash_64.hash
|> Hash.H64.hash
in
let open Bin_sig.ExchangeKeySet in
sign_f ~f:(Sm.sign_with_signkey ~pub:exchange_pub) R.{ list_issue_date; hc }

View file

@ -146,7 +146,7 @@ let enable_auditor ~output ~master_key ~auditor_url ~auditor_name ~auditor_pub
{
start_date= validity_start;
auditor_pub;
h_auditor_url= Hash_64_cstr.hash auditor_url;
h_auditor_url= Hash.Cstring.H64.hash auditor_url;
}
in
let v =
@ -177,7 +177,7 @@ let wire_fee ~output ~master_key ~wire_method ~fee_start ~fee_end ~closing_fee
let open Bin_sig.MasterWireFee in
sign_f ~f:(EddsaSignature.sign ~key)
{
h_wire_method= Hash_64_cstr.hash wire_method;
h_wire_method= Hash.Cstring.H64.hash wire_method;
start_date= fee_start;
end_date= fee_end;
closing_fee;
@ -210,7 +210,7 @@ let drain ~output ~master_key ~debit_account_section ~credit_payto_uri ~wtid
wtid;
date;
amount;
h_section= Hash_64_cstr.hash debit_account_section;
h_section= Hash.Cstring.H64.hash debit_account_section;
h_payto= FullPaytoHash.hash credit_payto_uri;
}
in

View file

@ -1,5 +1,4 @@
open Crypto
open Hash
open Api
let verify_future_keys_response =
@ -22,7 +21,7 @@ let verify_future_keys_response =
let h_denom_pub =
DenominationHash.hash (DenominationKey.to_octets denom_pub)
in
let h_section_name = Hash_64_cstr.hash section_name in
let h_section_name = Hash.Cstring.H64.hash section_name in
let anchor_time = stamp_start in
let duration_withdraw = Timestamp.diff stamp_start stamp_expire_withdraw in
let open Bin_sig.DenominationKeyAnnouncement in