[][src]Struct sm2::ecc::EccCtx

pub struct EccCtx {
    pub n: BigUint,
    // some fields omitted
}

Fields

n: BigUint

Methods

impl EccCtx[src]

pub fn new() -> EccCtx[src]

pub fn get_a(&self) -> Vec<u8>[src]

pub fn get_b(&self) -> Vec<u8>[src]

pub fn get_n(&self) -> BigUint[src]

pub fn inv_n(&self, x: &BigUint) -> BigUint[src]

pub fn new_point(&self, x: &FieldElem, y: &FieldElem) -> Result<Point, String>[src]

pub fn new_jacobian(
    &self,
    x: &FieldElem,
    y: &FieldElem,
    z: &FieldElem
) -> Result<Point, String>
[src]

pub fn generator(&self) -> Point[src]

pub fn zero(&self) -> Point[src]

pub fn to_affine(&self, p: &Point) -> (FieldElem, FieldElem)[src]

pub fn neg(&self, p: &Point) -> Point[src]

pub fn add(&self, p1: &Point, p2: &Point) -> Point[src]

pub fn double(&self, p: &Point) -> Point[src]

pub fn mul(&self, m: &BigUint, p: &Point) -> Point[src]

pub fn mul_raw(&self, m: &[u32], p: &Point) -> Point[src]

pub fn g_mul(&self, m: &BigUint) -> Point[src]

pub fn eq(&self, p1: &Point, p2: &Point) -> bool[src]

pub fn random_uint(&self) -> BigUint[src]

pub fn point_to_bytes(&self, p: &Point, compress: bool) -> Vec<u8>[src]

pub fn bytes_to_point(&self, b: &[u8]) -> Result<Point, bool>[src]

Auto Trait Implementations

impl RefUnwindSafe for EccCtx

impl Send for EccCtx

impl Sync for EccCtx

impl Unpin for EccCtx

impl UnwindSafe for EccCtx

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,