pub struct CommonOps {
num_limbs: usize,
q: Modulus,
n: Elem<Q, Unencoded>,
pub a: Elem<Q, R>,
pub b: Elem<Q, R>,
elem_mul_mont: unsafe extern "C" fn(r: *mut u64, a: *const u64, b: *const u64),
elem_sqr_mont: unsafe extern "C" fn(r: *mut u64, a: *const u64),
point_add_jacobian_impl: unsafe extern "C" fn(r: *mut u64, a: *const u64, b: *const u64),
}
Expand description
Operations and values needed by all curve operations.
Fields§
§num_limbs: usize
§q: Modulus
§n: Elem<Q, Unencoded>
§a: Elem<Q, R>
§b: Elem<Q, R>
§elem_mul_mont: unsafe extern "C" fn(r: *mut u64, a: *const u64, b: *const u64)
§elem_sqr_mont: unsafe extern "C" fn(r: *mut u64, a: *const u64)
§point_add_jacobian_impl: unsafe extern "C" fn(r: *mut u64, a: *const u64, b: *const u64)
Implementations§
source§impl CommonOps
impl CommonOps
pub fn len(&self) -> usize
pub fn elem_add<E: Encoding>(&self, a: &mut Elem<Q, E>, b: &Elem<Q, E>)
pub fn elems_are_equal(&self, a: &Elem<Q, R>, b: &Elem<Q, R>) -> LimbMask
pub fn elem_unencoded(&self, a: &Elem<Q, R>) -> Elem<Q, Unencoded>
pub fn elem_mul(&self, a: &mut Elem<Q, R>, b: &Elem<Q, R>)
pub fn elem_product<EA: Encoding, EB: Encoding>(
&self,
a: &Elem<Q, EA>,
b: &Elem<Q, EB>,
) -> Elem<Q, <(EA, EB) as ProductEncoding>::Output>where
(EA, EB): ProductEncoding,
pub fn elem_square(&self, a: &mut Elem<Q, R>)
pub fn elem_squared(&self, a: &Elem<Q, R>) -> Elem<Q, R>
pub fn is_zero<M, E: Encoding>(&self, a: &Elem<M, E>) -> bool
pub fn elem_verify_is_not_zero(&self, a: &Elem<Q, R>) -> Result<(), Unspecified>
pub fn point_sum(&self, a: &Point, b: &Point) -> Point
pub fn point_x(&self, p: &Point) -> Elem<Q, R>
pub fn point_y(&self, p: &Point) -> Elem<Q, R>
pub fn point_z(&self, p: &Point) -> Elem<Q, R>
Auto Trait Implementations§
impl Freeze for CommonOps
impl RefUnwindSafe for CommonOps
impl Send for CommonOps
impl Sync for CommonOps
impl Unpin for CommonOps
impl UnwindSafe for CommonOps
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more