JJ: Description from the destination commit:

different verify for master sigs

JJ: Description from source commit:
.
This commit is contained in:
swrup 2026-02-21 21:32:18 +01:00
parent 37ed47326a
commit 02ee110ffd
5 changed files with 108 additions and 138 deletions

View file

@ -145,20 +145,21 @@ end
(* --- Packed Signatures --- *)
module MK (R : sig
module type R = sig
type r
val bin : r Bin.t
end) : sig
end
module type SIGNATURE = sig
open Crypto
type r = R.r
type r
type t
val signf : (string -> EddsaSignature.t) -> r -> t
(* todo
- could have another functor with `verify`'s key set to config's master_public_key
- type for unknown/verified signatures? (nk/ok) *)
val verify : EddsaPublicKey.t -> t -> r -> (unit, string) result
val jsont : t Jsont.t
@ -166,10 +167,11 @@ end) : sig
(* escape hatch, only needed for /keys `exchange_sig` (signature over contatentation of all of the master_sigs) *)
val to_octets : t -> string
end = struct
end
module MK (R : R) : SIGNATURE with type r := R.r = struct
open Crypto
type r = R.r
type t = EddsaSignature.t
let to_string = Bin.to_string R.bin
@ -180,6 +182,14 @@ end = struct
let to_octets t = EddsaSignature.to_octets t
end
module MK_master_sig (R : R) = struct
include MK (R)
let verify = verify Config.Exchange.master_public_key
end
(* ---- *)
module DenominationKeyAnnouncement = struct
module R = struct
(* CS: use purpose TALER_SIGNATURE_SM_CS_DENOMINATION_KEY *)
@ -207,7 +217,6 @@ module DenominationKeyAnnouncement = struct
|> sealr
end
include R
include MK (R)
end
@ -232,7 +241,6 @@ module SigningKeyAnnouncement = struct
|> sealr
end
include R
include MK (R)
end
@ -301,8 +309,7 @@ module DenominationKeyValidity = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module ExchangeSigningKeyValidity = struct
@ -329,8 +336,7 @@ module ExchangeSigningKeyValidity = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module MasterDenominationKeyRevocation = struct
@ -348,8 +354,7 @@ module MasterDenominationKeyRevocation = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module MasterSigningKeyRevocation = struct
@ -367,8 +372,7 @@ module MasterSigningKeyRevocation = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module MasterAddAuditor = struct
@ -392,8 +396,7 @@ module MasterAddAuditor = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module MasterDelAuditor = struct
@ -414,8 +417,7 @@ module MasterDelAuditor = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module GlobalFees = struct
@ -470,8 +472,7 @@ module GlobalFees = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module MasterWireDetails = struct
@ -509,8 +510,7 @@ module MasterWireDetails = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module MasterAddWire = struct
@ -552,8 +552,7 @@ module MasterAddWire = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module MasterDelWire = struct
@ -574,8 +573,7 @@ module MasterDelWire = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module MasterDrainProfit = struct
@ -603,8 +601,7 @@ module MasterDrainProfit = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module MasterAmlOfficerStatus = struct
@ -630,8 +627,7 @@ module MasterAmlOfficerStatus = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module PartnerConfiguration = struct
@ -670,8 +666,7 @@ module PartnerConfiguration = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module WadPartnerSignature = struct
@ -718,7 +713,6 @@ module WadPartnerSignature = struct
|> sealr
end
include R
include MK (R)
end
@ -748,8 +742,7 @@ module MasterWireFee = struct
|> sealr
end
include R
include MK (R)
include MK_master_sig (R)
end
module ExchangeKeyValidity = struct
@ -815,7 +808,6 @@ module ExchangeKeyValidity = struct
|> sealr
end
include R
include MK (R)
end
@ -838,7 +830,6 @@ module ExchangeKeySet = struct
|> sealr
end
include R
include MK (R)
end