Struct ark_ed_on_bls12_381::EdwardsParameters[][src]

pub struct EdwardsParameters;
Expand description

JubJub is a twisted Edwards curve. These curves have equations of the form: ax² + y² = 1 - dx²y². over some base finite field Fq.

JubJub’s curve equation: -x² + y² = 1 - (10240/10241)x²y²

q = 52435875175126190479447740508185965837690552500527637822603658699938581184513.

a = -1. d = (10240/10241) mod q = 19257038036680949359750312669786877991949435402254120286184196891950884077233.

Sage script to calculate these:

q = 52435875175126190479447740508185965837690552500527637822603658699938581184513
Fq = GF(q)
d = -(Fq(10240)/Fq(10241))

These parameters and the sage script obtained from: https://github.com/zcash/zcash/issues/2230#issuecomment-317182190

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

COEFF_A = 40962

COEFF_B = -40964

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

COEFF_A = -1

COEFF_D = (10240/10241) mod q

COFACTOR = 8

COFACTOR^(-1) mod r = 819310549611346726241370945440405716213240158234039660170669895299022906775

AFFINE_GENERATOR_COEFFS = (GENERATOR_X, GENERATOR_Y)

Multiplication by a is simply negation here.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.