mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Tweak multiexp to Zeroize points when invoked in constant time, not just scalars
This commit is contained in:
@@ -18,7 +18,7 @@ mod batch;
|
||||
use batch::test_batch;
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn benchmark_internal<G: Group<Scalar: PrimeFieldBits + Zeroize>>(straus_bool: bool) {
|
||||
fn benchmark_internal<G: Zeroize + Group<Scalar: Zeroize + PrimeFieldBits>>(straus_bool: bool) {
|
||||
let runs: usize = 20;
|
||||
|
||||
let mut start = 0;
|
||||
@@ -83,7 +83,7 @@ fn benchmark_internal<G: Group<Scalar: PrimeFieldBits + Zeroize>>(straus_bool: b
|
||||
}
|
||||
}
|
||||
|
||||
fn test_multiexp<G: Group<Scalar: PrimeFieldBits + Zeroize>>() {
|
||||
fn test_multiexp<G: Zeroize + Group<Scalar: Zeroize + PrimeFieldBits>>() {
|
||||
let test = |pairs: &[_], sum| {
|
||||
// These should automatically determine the best algorithm
|
||||
assert_eq!(multiexp(pairs), sum);
|
||||
|
||||
Reference in New Issue
Block a user