mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
commit
0a6b2f6eb5
6 changed files with 15 additions and 13 deletions
|
|
@ -427,6 +427,7 @@ macro_rules! new_curve_impl {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::suspicious_arithmetic_impl)]
|
||||
impl<'a, 'b> Mul<&'b $scalar> for &'a $name {
|
||||
type Output = $name;
|
||||
|
||||
|
|
@ -537,6 +538,7 @@ macro_rules! new_curve_impl {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::suspicious_arithmetic_impl)]
|
||||
impl<'a, 'b> Mul<&'b $scalar> for &'a $name_affine {
|
||||
type Output = $name;
|
||||
|
||||
|
|
@ -730,13 +732,13 @@ macro_rules! new_curve_impl {
|
|||
Self::identity()
|
||||
}
|
||||
fn group_add(&mut self, rhs: &Self) {
|
||||
*self = *self + *rhs;
|
||||
*self += *rhs;
|
||||
}
|
||||
fn group_sub(&mut self, rhs: &Self) {
|
||||
*self = *self - *rhs;
|
||||
*self -= *rhs;
|
||||
}
|
||||
fn group_scale(&mut self, by: &Self::Scalar) {
|
||||
*self = *self * (*by);
|
||||
*self *= *by;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -307,6 +307,7 @@ impl Fp {
|
|||
Fp::montgomery_reduce(r0, r1, r2, r3, r4, r5, r6, r7)
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[inline(always)]
|
||||
const fn montgomery_reduce(
|
||||
r0: u64,
|
||||
|
|
@ -451,13 +452,13 @@ impl Group for Fp {
|
|||
Self::zero()
|
||||
}
|
||||
fn group_add(&mut self, rhs: &Self) {
|
||||
*self = *self + *rhs;
|
||||
*self += *rhs;
|
||||
}
|
||||
fn group_sub(&mut self, rhs: &Self) {
|
||||
*self = *self - *rhs;
|
||||
*self -= *rhs;
|
||||
}
|
||||
fn group_scale(&mut self, by: &Self::Scalar) {
|
||||
*self = *self * (*by);
|
||||
*self *= *by;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -307,6 +307,7 @@ impl Fq {
|
|||
Fq::montgomery_reduce(r0, r1, r2, r3, r4, r5, r6, r7)
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[inline(always)]
|
||||
const fn montgomery_reduce(
|
||||
r0: u64,
|
||||
|
|
@ -451,13 +452,13 @@ impl Group for Fq {
|
|||
Self::zero()
|
||||
}
|
||||
fn group_add(&mut self, rhs: &Self) {
|
||||
*self = *self + *rhs;
|
||||
*self += *rhs;
|
||||
}
|
||||
fn group_sub(&mut self, rhs: &Self) {
|
||||
*self = *self - *rhs;
|
||||
*self -= *rhs;
|
||||
}
|
||||
fn group_scale(&mut self, by: &Self::Scalar) {
|
||||
*self = *self * (*by);
|
||||
*self *= *by;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ pub fn iso_map<F: FieldExt, C: CurveExt<Base = F>, I: CurveExt<Base = F>>(
|
|||
C::new_jacobian(xo, yo, zo).unwrap()
|
||||
}
|
||||
|
||||
#[allow(clippy::many_single_char_names)]
|
||||
pub fn map_to_curve_simple_swu<F: FieldExt, C: CurveExt<Base = F>, I: CurveExt<Base = F>>(
|
||||
u: &F,
|
||||
theta: F,
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@
|
|||
#![allow(unknown_lints)]
|
||||
#![allow(
|
||||
clippy::op_ref,
|
||||
clippy::assign_op_pattern,
|
||||
clippy::too_many_arguments,
|
||||
clippy::suspicious_arithmetic_impl,
|
||||
clippy::many_single_char_names,
|
||||
clippy::same_item_push,
|
||||
clippy::upper_case_acronyms,
|
||||
clippy::unknown_clippy_lints
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ pub type Point = Ep;
|
|||
pub type Affine = EpAffine;
|
||||
|
||||
#[test]
|
||||
#[allow(clippy::many_single_char_names)]
|
||||
fn test_iso_map() {
|
||||
use crate::arithmetic::CurveExt;
|
||||
use group::Group;
|
||||
|
|
|
|||
Loading…
Reference in a new issue