mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-05 20:10:35 +00:00
parent
9154e59ec1
commit
51f59565f5
3 changed files with 4 additions and 4 deletions
|
|
@ -87,7 +87,7 @@ use field::FieldElement;
|
|||
use scalar::Scalar;
|
||||
use util::bytes_equal_ct;
|
||||
use util::CTAssignable;
|
||||
use util::CTNegateable;
|
||||
use util::CTNegatable;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Compressed points
|
||||
|
|
|
|||
|
|
@ -803,7 +803,7 @@ impl FieldElement {
|
|||
mod test {
|
||||
use field::*;
|
||||
use test::Bencher;
|
||||
use util::CTNegateable;
|
||||
use util::CTNegatable;
|
||||
|
||||
#[bench]
|
||||
fn bench_fieldelement_a_mul_a(b: &mut Bencher) {
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ pub trait CTAssignable {
|
|||
///
|
||||
/// Note: it is not necessary to implement this trait, as a generic
|
||||
/// implementation is provided.
|
||||
pub trait CTNegateable
|
||||
pub trait CTNegatable
|
||||
{
|
||||
/// Conditionally negate an element if `choice == 1u8`.
|
||||
fn conditional_negate(&mut self, choice: u8);
|
||||
}
|
||||
|
||||
impl<T> CTNegateable for T
|
||||
impl<T> CTNegatable for T
|
||||
where T: CTAssignable, for<'a> &'a T: Neg<Output=T>
|
||||
{
|
||||
fn conditional_negate(&mut self, choice: u8) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue