Skip to content

Commit

Permalink
chore: add benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Nov 30, 2024
1 parent 514a121 commit 259a251
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/lib.nr
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,26 @@ mod test {
}

}

mod bench {
use super::{assert_valid_signature, verify_signature};
use std::embedded_curve_ops::EmbeddedCurvePoint;

#[export]
pub fn bench_verify_signature(
public_key: EmbeddedCurvePoint,
signature: [u8; 64],
message: [u8; 32],
) -> bool {
verify_signature(public_key, signature, message)
}

#[export]
pub fn bench_assert_valid_signature(
public_key: EmbeddedCurvePoint,
signature: [u8; 64],
message: [u8; 32],
) {
assert_valid_signature(public_key, signature, message)
}
}

0 comments on commit 259a251

Please sign in to comment.