pub struct NistP384;Expand description
NIST P-384 elliptic curve.
This curve is also known as secp384r1 (SECG) and is specified in FIPS 186-4: Digital Signature Standard (DSS):
https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf
It’s included in the US National Security Agency’s “Suite B” and is widely used in protocols like TLS and the associated X.509 PKI.
Its equation is y² = x³ - 3x + b over a ~384-bit prime field where b is
the “verifiably random”† constant:
b = 2758019355995970587784901184038904809305690585636156852142
8707301988689241309860865136260764883745107765439761230575† NOTE: the specific origins of this constant have never been fully disclosed (it is the SHA-1 digest of an inexplicable NSA-selected constant)
Trait Implementations
sourceimpl AffineArithmetic for NistP384
impl AffineArithmetic for NistP384
type AffinePoint = AffinePoint
type AffinePoint = AffinePoint
Elliptic curve point in affine coordinates.
sourceimpl AffineXCoordinate<NistP384> for AffinePoint
impl AffineXCoordinate<NistP384> for AffinePoint
sourcefn x(&self) -> FieldBytes
fn x(&self) -> FieldBytes
Get the affine x-coordinate as a serialized field element.
sourceimpl AssociatedOid for NistP384
impl AssociatedOid for NistP384
sourceconst OID: ObjectIdentifier = pkcs8::ObjectIdentifier::new_unwrap("1.3.132.0.34")
const OID: ObjectIdentifier = pkcs8::ObjectIdentifier::new_unwrap("1.3.132.0.34")
The OID associated with this type.
sourceimpl DecompressPoint<NistP384> for AffinePoint
impl DecompressPoint<NistP384> for AffinePoint
sourcefn decompress(x_bytes: &FieldBytes, y_is_odd: Choice) -> CtOption<Self>
fn decompress(x_bytes: &FieldBytes, y_is_odd: Choice) -> CtOption<Self>
Attempt to decompress an elliptic curve point.
sourceimpl DigestPrimitive for NistP384
Available on crate features ecdsa and sha384 only.
impl DigestPrimitive for NistP384
ecdsa and sha384 only.sourceimpl FromEncodedPoint<NistP384> for AffinePoint
impl FromEncodedPoint<NistP384> for AffinePoint
sourcefn from_encoded_point(encoded_point: &EncodedPoint) -> CtOption<Self>
fn from_encoded_point(encoded_point: &EncodedPoint) -> CtOption<Self>
Attempts to parse the given EncodedPoint as an SEC1-encoded AffinePoint.
Returns
None value if encoded_point is not on the secp384r1 curve.
sourceimpl JwkParameters for NistP384
Available on crate feature jwk only.
impl JwkParameters for NistP384
jwk only.sourceconst CRV: &'static str = "P-384"
const CRV: &'static str = "P-384"
The crv parameter which identifies a particular elliptic curve
as defined in RFC 7518 Section 6.2.1.1:
https://tools.ietf.org/html/rfc7518#section-6.2.1.1 Read more
sourceimpl Ord for NistP384
impl Ord for NistP384
sourceimpl PartialOrd<NistP384> for NistP384
impl PartialOrd<NistP384> for NistP384
sourcefn partial_cmp(&self, other: &NistP384) -> Option<Ordering>
fn partial_cmp(&self, other: &NistP384) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl PointCompression for NistP384
impl PointCompression for NistP384
sourceconst COMPRESS_POINTS: bool = false
const COMPRESS_POINTS: bool = false
Should point compression be applied by default?
sourceimpl ToEncodedPoint<NistP384> for AffinePoint
impl ToEncodedPoint<NistP384> for AffinePoint
sourcefn to_encoded_point(&self, compress: bool) -> EncodedPoint
fn to_encoded_point(&self, compress: bool) -> EncodedPoint
Serialize this value as a SEC1 EncodedPoint, optionally applying
point compression. Read more
sourceimpl ValidatePublicKey for NistP384
impl ValidatePublicKey for NistP384
sourcefn validate_public_key(
secret_key: &SecretKey<Self>,
public_key: &EncodedPoint<<Self::UInt as ArrayEncoding>::ByteSize>
) -> Result<(), Error>
fn validate_public_key(
secret_key: &SecretKey<Self>,
public_key: &EncodedPoint<<Self::UInt as ArrayEncoding>::ByteSize>
) -> Result<(), Error>
Validate that the given EncodedPoint is a valid public key for the
provided secret value. Read more
sourceimpl VoprfParameters for NistP384
Available on crate feature voprf only.
impl VoprfParameters for NistP384
voprf only.impl Copy for NistP384
impl Eq for NistP384
impl PrimeCurve for NistP384
impl StructuralEq for NistP384
impl StructuralPartialEq for NistP384
Auto Trait Implementations
impl RefUnwindSafe for NistP384
impl Send for NistP384
impl Sync for NistP384
impl Unpin for NistP384
impl UnwindSafe for NistP384
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more