pub struct CurveParameters {
pub p: FieldElement,
pub n: BigUint,
pub a: FieldElement,
pub b: FieldElement,
pub h: BigUint,
pub g_point: Point,
pub rr: BigInt,
pub rr_pp: BigInt,
pub r: BigInt,
pub q: BigInt,
}Expand description
ecc equation: y^2 == x^3 +ax + b (mod p)
Fields§
§p: FieldElementp:大于3的素数
n: BigUintn:基点G的阶(n是#E(Fq)的素因子)
a: FieldElementa:Fq中的元素,它们定义Fq上的一条椭圆曲线E
b: FieldElementb:Fq中的元素,它们定义Fq上的一条椭圆曲线E
h: BigUintThe Cofactor, the recommended value is 1 余因子,h = #E(Fq)/n,其中n是基点G的阶
g_point: PointG:椭圆曲线的一个基点,其阶为素数
rr: BigInt§rr_pp: BigInt§r: BigInt§q: BigIntImplementations§
Source§impl CurveParameters
impl CurveParameters
pub fn new_default() -> CurveParameters
Trait Implementations§
Source§impl Clone for CurveParameters
impl Clone for CurveParameters
Source§fn clone(&self) -> CurveParameters
fn clone(&self) -> CurveParameters
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CurveParameters
impl Debug for CurveParameters
Auto Trait Implementations§
impl Freeze for CurveParameters
impl RefUnwindSafe for CurveParameters
impl Send for CurveParameters
impl Sync for CurveParameters
impl Unpin for CurveParameters
impl UnwindSafe for CurveParameters
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