Compute the a suitable (for instance, FFT-friendly over F) matrix with at least poly_len entries. The return pair (n, m) corresponds to the dimensions n x m. FIXME: Maybe, there should be some checks for making sure the extended row can have an FFT.
(&self, poly_len: usize)
| 116 | /// The return pair (n, m) corresponds to the dimensions n x m. |
| 117 | /// FIXME: Maybe, there should be some checks for making sure the extended row can have an FFT. |
| 118 | fn compute_dimensions(&self, poly_len: usize) -> (usize, usize) { |
| 119 | assert_eq!( |
| 120 | (poly_len as f64) as usize, |
| 121 | poly_len, |
| 122 | "n cannot be converted to f64: aborting" |
| 123 | ); |
| 124 | let t = calculate_t::<F>(self.sec_param(), self.distance(), poly_len).unwrap(); |
| 125 | let n = 1 << log2((ceil_div(2 * poly_len, t) as f64).sqrt().ceil() as usize); |
| 126 | let m = ceil_div(poly_len, n); |
| 127 | (n, m) |
| 128 | } |
| 129 | |
| 130 | fn leaf_hash_param(&self) -> &<<C as Config>::LeafHash as CRHScheme>::Parameters { |
| 131 | &self.leaf_hash_param |
no test coverage detected