pub struct NistP521;Expand description
NIST P-521 elliptic curve.
Trait Implementations§
Source§impl AssociatedOid for NistP521
Available on crate feature pkcs8 only.
impl AssociatedOid for NistP521
Available on crate feature
pkcs8 only.Source§const OID: ObjectIdentifier
const OID: ObjectIdentifier
The OID associated with this type.
Source§impl Curve for NistP521
impl Curve for NistP521
Source§type FieldBytesSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B1>, B0>
type FieldBytesSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B1>, B0>
66-byte serialized field elements.
Source§type Uint = Uint<crypto_bigint::::uint::U576::{constant#0}>
type Uint = Uint<crypto_bigint::::uint::U576::{constant#0}>
521-bit integer type used for internally representing field elements.
Source§const FIELD_ENDIANNESS: ByteOrder = ByteOrder::BigEndian
const FIELD_ENDIANNESS: ByteOrder = ByteOrder::BigEndian
Endianness used for serializing field elements of this curve.
Source§impl CurveArithmetic for NistP521
impl CurveArithmetic for NistP521
Source§type AffinePoint = AffinePoint<NistP521>
type AffinePoint = AffinePoint<NistP521>
Elliptic curve point in affine coordinates.
Source§type ProjectivePoint = ProjectivePoint<NistP521>
type ProjectivePoint = ProjectivePoint<NistP521>
Elliptic curve point in projective coordinates. Read more
Source§impl DigestAlgorithm for NistP521
Available on crate feature sha512 only.
impl DigestAlgorithm for NistP521
Available on crate feature
sha512 only.Source§impl EcdsaCurve for NistP521
impl EcdsaCurve for NistP521
Source§const NORMALIZE_S: bool = false
const NORMALIZE_S: bool = false
Does this curve use low-S normalized signatures? Read more
Source§impl FieldArithmetic for NistP521
impl FieldArithmetic for NistP521
Source§type FieldElement = FieldElement
type FieldElement = FieldElement
Base field element type.
Source§impl Mul<&<NistP521 as CurveArithmetic>::AffinePoint> for &Scalar
impl Mul<&<NistP521 as CurveArithmetic>::AffinePoint> for &Scalar
Source§type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
The resulting type after applying the
* operator.Source§fn mul(self, rhs: &AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
fn mul(self, rhs: &AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
Performs the
* operation. Read moreSource§impl Mul<&<NistP521 as CurveArithmetic>::AffinePoint> for Scalar
impl Mul<&<NistP521 as CurveArithmetic>::AffinePoint> for Scalar
Source§type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
The resulting type after applying the
* operator.Source§fn mul(self, rhs: &AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
fn mul(self, rhs: &AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
Performs the
* operation. Read moreSource§impl Mul<&<NistP521 as CurveArithmetic>::ProjectivePoint> for &Scalar
impl Mul<&<NistP521 as CurveArithmetic>::ProjectivePoint> for &Scalar
Source§type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
The resulting type after applying the
* operator.Source§fn mul(self, rhs: &ProjectivePoint<NistP521>) -> ProjectivePoint<NistP521>
fn mul(self, rhs: &ProjectivePoint<NistP521>) -> ProjectivePoint<NistP521>
Performs the
* operation. Read moreSource§impl Mul<&<NistP521 as CurveArithmetic>::ProjectivePoint> for Scalar
impl Mul<&<NistP521 as CurveArithmetic>::ProjectivePoint> for Scalar
Source§type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
The resulting type after applying the
* operator.Source§fn mul(self, rhs: &ProjectivePoint<NistP521>) -> ProjectivePoint<NistP521>
fn mul(self, rhs: &ProjectivePoint<NistP521>) -> ProjectivePoint<NistP521>
Performs the
* operation. Read moreSource§impl Mul<<NistP521 as CurveArithmetic>::AffinePoint> for &Scalar
impl Mul<<NistP521 as CurveArithmetic>::AffinePoint> for &Scalar
Source§type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
The resulting type after applying the
* operator.Source§fn mul(self, rhs: AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
fn mul(self, rhs: AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
Performs the
* operation. Read moreSource§impl Mul<<NistP521 as CurveArithmetic>::AffinePoint> for Scalar
impl Mul<<NistP521 as CurveArithmetic>::AffinePoint> for Scalar
Source§type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
The resulting type after applying the
* operator.Source§fn mul(self, rhs: AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
fn mul(self, rhs: AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
Performs the
* operation. Read moreSource§impl Mul<<NistP521 as CurveArithmetic>::ProjectivePoint> for &Scalar
impl Mul<<NistP521 as CurveArithmetic>::ProjectivePoint> for &Scalar
Source§type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
The resulting type after applying the
* operator.Source§fn mul(self, rhs: ProjectivePoint<NistP521>) -> ProjectivePoint<NistP521>
fn mul(self, rhs: ProjectivePoint<NistP521>) -> ProjectivePoint<NistP521>
Performs the
* operation. Read moreSource§impl Mul<<NistP521 as CurveArithmetic>::ProjectivePoint> for Scalar
impl Mul<<NistP521 as CurveArithmetic>::ProjectivePoint> for Scalar
Source§type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
type Output = <NistP521 as CurveArithmetic>::ProjectivePoint
The resulting type after applying the
* operator.Source§fn mul(self, rhs: ProjectivePoint<NistP521>) -> ProjectivePoint<NistP521>
fn mul(self, rhs: ProjectivePoint<NistP521>) -> ProjectivePoint<NistP521>
Performs the
* operation. Read moreSource§impl MulBackend<NistP521> for PrecomputedTables
impl MulBackend<NistP521> for PrecomputedTables
Source§fn mul_by_generator(k: &Scalar) -> ProjectivePoint
fn mul_by_generator(k: &Scalar) -> ProjectivePoint
Multiplication by the generator. Read more
Source§fn mul_by_generator_vartime(k: &Scalar) -> ProjectivePoint
fn mul_by_generator_vartime(k: &Scalar) -> ProjectivePoint
Variable-time multiplication by the generator. Read more
Source§fn mul_by_generator_and_mul_add_vartime(
a: &<C as CurveArithmetic>::Scalar,
b_scalar: &<C as CurveArithmetic>::Scalar,
b_point: &ProjectivePoint<C>,
) -> ProjectivePoint<C>
fn mul_by_generator_and_mul_add_vartime( a: &<C as CurveArithmetic>::Scalar, b_scalar: &<C as CurveArithmetic>::Scalar, b_point: &ProjectivePoint<C>, ) -> ProjectivePoint<C>
Multiply
a by the generator of the prime-order subgroup, adding the result to the point
P multiplied by the scalar b, i.e. compute aG + bP.Source§impl MulVartime<&<NistP521 as CurveArithmetic>::AffinePoint> for &Scalar
impl MulVartime<&<NistP521 as CurveArithmetic>::AffinePoint> for &Scalar
Source§fn mul_vartime(self, rhs: &AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
fn mul_vartime(self, rhs: &AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
Multiply
self by rhs in variable-time.Source§impl MulVartime<&<NistP521 as CurveArithmetic>::AffinePoint> for Scalar
impl MulVartime<&<NistP521 as CurveArithmetic>::AffinePoint> for Scalar
Source§fn mul_vartime(self, rhs: &AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
fn mul_vartime(self, rhs: &AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
Multiply
self by rhs in variable-time.Source§impl MulVartime<&<NistP521 as CurveArithmetic>::ProjectivePoint> for &Scalar
impl MulVartime<&<NistP521 as CurveArithmetic>::ProjectivePoint> for &Scalar
Source§fn mul_vartime(
self,
rhs: &ProjectivePoint<NistP521>,
) -> ProjectivePoint<NistP521>
fn mul_vartime( self, rhs: &ProjectivePoint<NistP521>, ) -> ProjectivePoint<NistP521>
Multiply
self by rhs in variable-time.Source§impl MulVartime<&<NistP521 as CurveArithmetic>::ProjectivePoint> for Scalar
impl MulVartime<&<NistP521 as CurveArithmetic>::ProjectivePoint> for Scalar
Source§fn mul_vartime(
self,
rhs: &ProjectivePoint<NistP521>,
) -> ProjectivePoint<NistP521>
fn mul_vartime( self, rhs: &ProjectivePoint<NistP521>, ) -> ProjectivePoint<NistP521>
Multiply
self by rhs in variable-time.Source§impl MulVartime<<NistP521 as CurveArithmetic>::AffinePoint> for &Scalar
impl MulVartime<<NistP521 as CurveArithmetic>::AffinePoint> for &Scalar
Source§fn mul_vartime(self, rhs: AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
fn mul_vartime(self, rhs: AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
Multiply
self by rhs in variable-time.Source§impl MulVartime<<NistP521 as CurveArithmetic>::AffinePoint> for Scalar
impl MulVartime<<NistP521 as CurveArithmetic>::AffinePoint> for Scalar
Source§fn mul_vartime(self, rhs: AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
fn mul_vartime(self, rhs: AffinePoint<NistP521>) -> ProjectivePoint<NistP521>
Multiply
self by rhs in variable-time.Source§impl MulVartime<<NistP521 as CurveArithmetic>::ProjectivePoint> for &Scalar
impl MulVartime<<NistP521 as CurveArithmetic>::ProjectivePoint> for &Scalar
Source§fn mul_vartime(
self,
rhs: ProjectivePoint<NistP521>,
) -> ProjectivePoint<NistP521>
fn mul_vartime( self, rhs: ProjectivePoint<NistP521>, ) -> ProjectivePoint<NistP521>
Multiply
self by rhs in variable-time.Source§impl MulVartime<<NistP521 as CurveArithmetic>::ProjectivePoint> for Scalar
impl MulVartime<<NistP521 as CurveArithmetic>::ProjectivePoint> for Scalar
Source§fn mul_vartime(
self,
rhs: ProjectivePoint<NistP521>,
) -> ProjectivePoint<NistP521>
fn mul_vartime( self, rhs: ProjectivePoint<NistP521>, ) -> ProjectivePoint<NistP521>
Multiply
self by rhs in variable-time.Source§impl Ord for NistP521
impl Ord for NistP521
Source§impl PartialOrd for NistP521
impl PartialOrd for NistP521
Source§impl PointCompaction for NistP521
impl PointCompaction for NistP521
Source§const COMPACT_POINTS: bool = false
const COMPACT_POINTS: bool = false
NIST P-521 points are typically uncompacted.
Source§impl PointCompression for NistP521
impl PointCompression for NistP521
Source§const COMPRESS_POINTS: bool = false
const COMPRESS_POINTS: bool = false
NIST P-521 points are typically uncompressed.
Source§impl PrimeCurveArithmetic for NistP521
impl PrimeCurveArithmetic for NistP521
Source§type CurveGroup = ProjectivePoint<NistP521>
type CurveGroup = ProjectivePoint<NistP521>
Prime order elliptic curve group.
Source§impl PrimeCurveParams for NistP521
Adapted from NIST SP 800-186 § 3.2.1.5: P-521.
impl PrimeCurveParams for NistP521
Adapted from NIST SP 800-186 § 3.2.1.5: P-521.
Source§const EQUATION_A: FieldElement
const EQUATION_A: FieldElement
a = -3 (0x1ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc)
Source§const EQUATION_B: FieldElement
const EQUATION_B: FieldElement
b = 0x051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00
Source§const GENERATOR: (FieldElement, FieldElement)
const GENERATOR: (FieldElement, FieldElement)
Base point of P-521.
Gₓ = 0x0c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521
f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de
3348b3c1 856a429b f97e7e31 c2e5bd66
Gᵧ = 0x118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468
17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761
353c7086 a272c240 88be9476 9fd16650Source§type PointArithmetic = EquationAIsMinusThree
type PointArithmetic = EquationAIsMinusThree
Point arithmetic implementation, might be optimized for this specific curve
Source§type Backend = PrecomputedTables
type Backend = PrecomputedTables
Scalar arithmetic backend implementation.
Source§impl PrimeCurveWithBasepointTable<WINDOW_SIZE> for NistP521
impl PrimeCurveWithBasepointTable<WINDOW_SIZE> for NistP521
Source§const BASEPOINT_TABLE: &'static BasepointTable<ProjectivePoint, WINDOW_SIZE>
const BASEPOINT_TABLE: &'static BasepointTable<ProjectivePoint, WINDOW_SIZE>
Basepoint table for this curve.
impl Copy for NistP521
impl Eq for NistP521
impl PrimeCurve for NistP521
impl StructuralPartialEq for NistP521
Auto Trait Implementations§
impl Freeze for NistP521
impl RefUnwindSafe for NistP521
impl Send for NistP521
impl Sync for NistP521
impl Unpin for NistP521
impl UnsafeUnpin for NistP521
impl UnwindSafe for NistP521
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DynAssociatedOid for Twhere
T: AssociatedOid,
impl<T> DynAssociatedOid for Twhere
T: AssociatedOid,
Source§fn oid(&self) -> ObjectIdentifier
fn oid(&self) -> ObjectIdentifier
Get the OID associated with this value.