@@ -8,29 +8,17 @@ use hashsig::{
88 signature:: {
99 SignatureScheme , SignatureSchemeSecretKey ,
1010 generalized_xmss:: instantiations_poseidon:: {
11- lifetime_2_to_the_18:: {
12- target_sum:: {
13- SIGTargetSumLifetime18W1NoOff , SIGTargetSumLifetime18W1Off10 ,
14- SIGTargetSumLifetime18W2NoOff , SIGTargetSumLifetime18W2Off10 ,
15- SIGTargetSumLifetime18W4NoOff , SIGTargetSumLifetime18W4Off10 ,
16- SIGTargetSumLifetime18W8NoOff , SIGTargetSumLifetime18W8Off10 ,
17- } ,
18- winternitz:: {
19- SIGWinternitzLifetime18W1 , SIGWinternitzLifetime18W2 ,
20- SIGWinternitzLifetime18W4 , SIGWinternitzLifetime18W8 ,
21- } ,
11+ lifetime_2_to_the_18:: target_sum:: {
12+ SIGTargetSumLifetime18W1NoOff , SIGTargetSumLifetime18W1Off10 ,
13+ SIGTargetSumLifetime18W2NoOff , SIGTargetSumLifetime18W2Off10 ,
14+ SIGTargetSumLifetime18W4NoOff , SIGTargetSumLifetime18W4Off10 ,
15+ SIGTargetSumLifetime18W8NoOff , SIGTargetSumLifetime18W8Off10 ,
2216 } ,
23- lifetime_2_to_the_20:: {
24- target_sum:: {
25- SIGTargetSumLifetime20W1NoOff , SIGTargetSumLifetime20W1Off10 ,
26- SIGTargetSumLifetime20W2NoOff , SIGTargetSumLifetime20W2Off10 ,
27- SIGTargetSumLifetime20W4NoOff , SIGTargetSumLifetime20W4Off10 ,
28- SIGTargetSumLifetime20W8NoOff , SIGTargetSumLifetime20W8Off10 ,
29- } ,
30- winternitz:: {
31- SIGWinternitzLifetime20W1 , SIGWinternitzLifetime20W2 ,
32- SIGWinternitzLifetime20W4 , SIGWinternitzLifetime20W8 ,
33- } ,
17+ lifetime_2_to_the_20:: target_sum:: {
18+ SIGTargetSumLifetime20W1NoOff , SIGTargetSumLifetime20W1Off10 ,
19+ SIGTargetSumLifetime20W2NoOff , SIGTargetSumLifetime20W2Off10 ,
20+ SIGTargetSumLifetime20W4NoOff , SIGTargetSumLifetime20W4Off10 ,
21+ SIGTargetSumLifetime20W8NoOff , SIGTargetSumLifetime20W8Off10 ,
3422 } ,
3523 } ,
3624 } ,
@@ -108,22 +96,6 @@ pub fn benchmark_signature_scheme<S: SignatureScheme>(c: &mut Criterion, descrip
10896 group. finish ( ) ;
10997}
11098
111- /// Benchmarking Lifetime 2^18 for Winternitz Encoding
112- fn bench_lifetime18_winternitz ( c : & mut Criterion ) {
113- benchmark_signature_scheme :: < SIGWinternitzLifetime18W1 > ( c, "Winternitz, Lifetime 2^18, w = 1" ) ;
114- benchmark_signature_scheme :: < SIGWinternitzLifetime18W2 > ( c, "Winternitz, Lifetime 2^18, w = 2" ) ;
115- benchmark_signature_scheme :: < SIGWinternitzLifetime18W4 > ( c, "Winternitz, Lifetime 2^18, w = 4" ) ;
116- benchmark_signature_scheme :: < SIGWinternitzLifetime18W8 > ( c, "Winternitz, Lifetime 2^18, w = 8" ) ;
117- }
118-
119- /// Benchmarking Lifetime 2^20 for Winternitz Encoding
120- fn bench_lifetime20_winternitz ( c : & mut Criterion ) {
121- benchmark_signature_scheme :: < SIGWinternitzLifetime20W1 > ( c, "Winternitz, Lifetime 2^20, w = 1" ) ;
122- benchmark_signature_scheme :: < SIGWinternitzLifetime20W2 > ( c, "Winternitz, Lifetime 2^20, w = 2" ) ;
123- benchmark_signature_scheme :: < SIGWinternitzLifetime20W4 > ( c, "Winternitz, Lifetime 2^20, w = 4" ) ;
124- benchmark_signature_scheme :: < SIGWinternitzLifetime20W8 > ( c, "Winternitz, Lifetime 2^20, w = 8" ) ;
125- }
126-
12799/// Benchmarking Lifetime 2^18 for Target Sum Encoding
128100fn bench_lifetime18_target_sum ( c : & mut Criterion ) {
129101 benchmark_signature_scheme :: < SIGTargetSumLifetime18W1NoOff > (
@@ -203,15 +175,9 @@ fn bench_lifetime20_target_sum(c: &mut Criterion) {
203175}
204176
205177pub fn bench_function_poseidon ( c : & mut Criterion ) {
206- // benchmarking lifetime 2^18 - Winternitz
207- bench_lifetime18_winternitz ( c) ;
208-
209178 // benchmarking lifetime 2^18 - Target Sum
210179 bench_lifetime18_target_sum ( c) ;
211180
212- // benchmarking lifetime 2^20 - Winternitz
213- bench_lifetime20_winternitz ( c) ;
214-
215181 // benchmarking lifetime 2^20 - Target Sum
216182 bench_lifetime20_target_sum ( c) ;
217183}
0 commit comments