@@ -63,6 +63,20 @@ pub fn bench_ntt_dilithium_params_with_ntt(c: &mut Criterion) {
6363 ) ;
6464}
6565
66+ /// benchmark multiplication in typical dilithium parameter set with NTT & Transforms
67+ /// `n=256`, `q = 2^23 - 2^13 + 1` and `zeta = 1753`
68+ pub fn bench_ntt_dilithium_params_with_ntt_and_transforms ( c : & mut Criterion ) {
69+ let modulus = get_dilithium_setup ( ) ;
70+
71+ let p1 = PolynomialRingZq :: sample_uniform ( & modulus) ;
72+ let p2 = PolynomialRingZq :: sample_uniform ( & modulus) ;
73+
74+ c. bench_function (
75+ "PolynomialRingZq Multiplication with NTT + Transforms (Dilithium)" ,
76+ |b| b. iter ( || PolynomialRingZq :: mul_ntt ( & p1, & p2) ) ,
77+ ) ;
78+ }
79+
6680/// benchmark multiplication in typical dilithium parameter set without NTT
6781/// `n=1024`, `q = 2^23 - 2^13 + 1` and `zeta = 1735`
6882pub fn bench_ntt_dilithium_params_without_ntt ( c : & mut Criterion ) {
@@ -94,6 +108,19 @@ pub fn bench_ntt_hawk1024_params_with_ntt(c: &mut Criterion) {
94108 } ) ;
95109}
96110
111+ /// benchmark multiplication in typical HAWK1024 parameter set with NTT and Transforms
112+ /// `n=256`, `q = 12289` and `zeta = 1945`
113+ pub fn bench_ntt_hawk1024_params_with_ntt_and_transforms ( c : & mut Criterion ) {
114+ let modulus = get_hawk1024_setup ( ) ;
115+
116+ let p1 = PolynomialRingZq :: sample_uniform ( & modulus) ;
117+ let p2 = PolynomialRingZq :: sample_uniform ( & modulus) ;
118+
119+ c. bench_function ( "PolynomialRingZq Multiplication with NTT + Transforms (HAWK1024)" , |b| {
120+ b. iter ( || PolynomialRingZq :: mul_ntt ( & p1, & p2) )
121+ } ) ;
122+ }
123+
97124/// benchmark multiplication in typical HAWK1024 parameter set without NTT
98125/// `n=256`, `q = 12289` and `zeta = 1945`
99126pub fn bench_ntt_hawk1024_params_without_ntt ( c : & mut Criterion ) {
@@ -111,7 +138,9 @@ pub fn bench_ntt_hawk1024_params_without_ntt(c: &mut Criterion) {
111138criterion_group ! (
112139 benches,
113140 bench_ntt_dilithium_params_with_ntt,
141+ bench_ntt_dilithium_params_with_ntt_and_transforms,
114142 bench_ntt_dilithium_params_without_ntt,
115143 bench_ntt_hawk1024_params_with_ntt,
116- bench_ntt_hawk1024_params_without_ntt
144+ bench_ntt_hawk1024_params_with_ntt_and_transforms,
145+ bench_ntt_hawk1024_params_without_ntt,
117146) ;
0 commit comments