|
|
@ -17,10 +17,10 @@ pub type SWAffine = short_weierstrass::Affine; |
|
|
|
pub type SWProjective = short_weierstrass::Projective<BandersnatchParameters>;
|
|
|
|
|
|
|
|
/// `bandersnatch` is an incomplete twisted Edwards curve. These curves have equations of
|
|
|
|
/// the form: ax² + y² = 1 - dx²y².
|
|
|
|
/// the form: ax² + y² = 1 + dx²y².
|
|
|
|
/// over some base finite field Fq.
|
|
|
|
///
|
|
|
|
/// bandersnatch's curve equation: -5x² + y² = 1 - dx²y²
|
|
|
|
/// bandersnatch's curve equation: -5x² + y² = 1 + dx²y²
|
|
|
|
///
|
|
|
|
/// q = 52435875175126190479447740508185965837690552500527637822603658699938581184513.
|
|
|
|
///
|
|
|
@ -84,7 +84,7 @@ impl TECurveConfig for BandersnatchParameters { |
|
|
|
/// Multiplication by `a` is multiply by `-5`.
|
|
|
|
#[inline(always)]
|
|
|
|
fn mul_by_a(elem: Self::BaseField) -> Self::BaseField {
|
|
|
|
elem.double().double() * elem
|
|
|
|
-(elem.double().double() + elem)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|