@@ -43,9 +43,23 @@ pub struct GeneralizedXMSSSignatureScheme<
4343#[ derive( Serialize , Deserialize , Clone ) ]
4444#[ serde( bound = "" ) ]
4545pub struct GeneralizedXMSSSignature < IE : IncomparableEncoding , TH : TweakableHash > {
46- pub path : HashTreeOpening < TH > ,
47- pub rho : IE :: Randomness ,
48- pub hashes : Vec < TH :: Domain > ,
46+ path : HashTreeOpening < TH > ,
47+ rho : IE :: Randomness ,
48+ hashes : Vec < TH :: Domain > ,
49+ }
50+
51+ impl < IE : IncomparableEncoding , TH : TweakableHash > GeneralizedXMSSSignature < IE , TH > {
52+ pub const fn path ( & self ) -> & HashTreeOpening < TH > {
53+ & self . path
54+ }
55+
56+ pub const fn rho ( & self ) -> & IE :: Randomness {
57+ & self . rho
58+ }
59+
60+ pub const fn hashes ( & self ) -> & Vec < TH :: Domain > {
61+ & self . hashes
62+ }
4963}
5064
5165impl < IE : IncomparableEncoding , TH : TweakableHash > Encode for GeneralizedXMSSSignature < IE , TH > {
@@ -176,8 +190,18 @@ impl<IE: IncomparableEncoding, TH: TweakableHash> Decode for GeneralizedXMSSSign
176190/// It contains a Merkle root and a parameter for the tweakable hash
177191#[ derive( Serialize , Deserialize , Clone ) ]
178192pub struct GeneralizedXMSSPublicKey < TH : TweakableHash > {
179- pub root : TH :: Domain ,
180- pub parameter : TH :: Parameter ,
193+ root : TH :: Domain ,
194+ parameter : TH :: Parameter ,
195+ }
196+
197+ impl < TH : TweakableHash > GeneralizedXMSSPublicKey < TH > {
198+ pub const fn root ( & self ) -> & TH :: Domain {
199+ & self . root
200+ }
201+
202+ pub const fn parameter ( & self ) -> & TH :: Parameter {
203+ & self . parameter
204+ }
181205}
182206
183207/// Secret key for GeneralizedXMSSSignatureScheme
0 commit comments