pub struct NistP384;
Expand description
NIST P-384 elliptic curve.
Trait Implementations§
source§impl Curve for NistP384
impl Curve for NistP384
source§impl CurveArithmetic for NistP384
Available on crate feature arithmetic
only.
impl CurveArithmetic for NistP384
Available on crate feature
arithmetic
only.§type AffinePoint = AffinePoint<NistP384>
type AffinePoint = AffinePoint<NistP384>
Elliptic curve point in affine coordinates.
§type ProjectivePoint = ProjectivePoint<NistP384>
type ProjectivePoint = ProjectivePoint<NistP384>
Elliptic curve point in projective coordinates. Read more
source§impl DigestPrimitive for NistP384
Available on crate features ecdsa-core
and sha384
only.
impl DigestPrimitive for NistP384
Available on crate features
ecdsa-core
and sha384
only.source§impl FieldBytesEncoding<NistP384> for U384
impl FieldBytesEncoding<NistP384> for U384
source§fn decode_field_bytes(field_bytes: &FieldBytes) -> Self
fn decode_field_bytes(field_bytes: &FieldBytes) -> Self
Decode unsigned integer from serialized field element. Read more
source§fn encode_field_bytes(&self) -> FieldBytes
fn encode_field_bytes(&self) -> FieldBytes
Encode unsigned integer into serialized field element. Read more
source§impl Ord for NistP384
impl Ord for NistP384
source§impl PartialEq<NistP384> for NistP384
impl PartialEq<NistP384> for NistP384
source§impl PartialOrd<NistP384> for NistP384
impl PartialOrd<NistP384> for NistP384
1.0.0 · source§fn 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 moresource§impl PointCompaction for NistP384
impl PointCompaction for NistP384
source§const COMPACT_POINTS: bool = false
const COMPACT_POINTS: bool = false
NIST P-384 points are typically uncompressed.
source§impl PointCompression for NistP384
impl PointCompression for NistP384
source§const COMPRESS_POINTS: bool = false
const COMPRESS_POINTS: bool = false
NIST P-384 points are typically uncompressed.
source§impl PrimeCurveArithmetic for NistP384
Available on crate feature arithmetic
only.
impl PrimeCurveArithmetic for NistP384
Available on crate feature
arithmetic
only.§type CurveGroup = ProjectivePoint<NistP384>
type CurveGroup = ProjectivePoint<NistP384>
Prime order elliptic curve group.
source§impl PrimeCurveParams for NistP384
Available on crate feature arithmetic
only.
impl PrimeCurveParams for NistP384
Available on crate feature
arithmetic
only.Adapted from NIST SP 800-186 § G.1.3: Curve P-384.
source§const EQUATION_A: FieldElement = _
const EQUATION_A: FieldElement = _
a = -3 (0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc)
source§const EQUATION_B: FieldElement = _
const EQUATION_B: FieldElement = _
b = b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef
source§const GENERATOR: (FieldElement, FieldElement) = _
const GENERATOR: (FieldElement, FieldElement) = _
Base point of P-384.
Defined in NIST SP 800-186 § G.1.3: Curve P-384.
Gₓ = aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98
59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7
Gᵧ = 3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c
e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f
§type FieldElement = FieldElement
type FieldElement = FieldElement
Base field element type.
§type PointArithmetic = EquationAIsMinusThree
type PointArithmetic = EquationAIsMinusThree
Point arithmetic implementation, might be optimized for this specific curve
source§impl SignPrimitive<NistP384> for Scalar
Available on crate features ecdsa-core
and ecdsa
only.
impl SignPrimitive<NistP384> for Scalar
Available on crate features
ecdsa-core
and ecdsa
only.source§fn try_sign_prehashed<K>(
&self,
k: K,
z: &GenericArray<u8, <C as Curve>::FieldBytesSize>
) -> Result<(Signature<C>, Option<RecoveryId>), Error>where
K: AsRef<Self> + Invert<Output = CtOption<Self>>,
fn try_sign_prehashed<K>( &self, k: K, z: &GenericArray<u8, <C as Curve>::FieldBytesSize> ) -> Result<(Signature<C>, Option<RecoveryId>), Error>where K: AsRef<Self> + Invert<Output = CtOption<Self>>,
Try to sign the prehashed message. Read more
source§fn try_sign_prehashed_rfc6979<D>(
&self,
z: &GenericArray<u8, <C as Curve>::FieldBytesSize>,
ad: &[u8]
) -> Result<(Signature<C>, Option<RecoveryId>), Error>where
Self: From<ScalarPrimitive<C>> + Invert<Output = CtOption<Self>>,
D: Digest<OutputSize = <C as Curve>::FieldBytesSize> + BlockSizeUser + FixedOutput + FixedOutputReset,
fn try_sign_prehashed_rfc6979<D>( &self, z: &GenericArray<u8, <C as Curve>::FieldBytesSize>, ad: &[u8] ) -> Result<(Signature<C>, Option<RecoveryId>), Error>where Self: From<ScalarPrimitive<C>> + Invert<Output = CtOption<Self>>, D: Digest<OutputSize = <C as Curve>::FieldBytesSize> + BlockSizeUser + FixedOutput + FixedOutputReset,
Available on crate feature
rfc6979
only.source§impl VerifyPrimitive<NistP384> for AffinePoint
Available on crate features ecdsa-core
and ecdsa
only.
impl VerifyPrimitive<NistP384> for AffinePoint
Available on crate features
ecdsa-core
and ecdsa
only.source§fn verify_prehashed(
&self,
z: &GenericArray<u8, <C as Curve>::FieldBytesSize>,
sig: &Signature<C>
) -> Result<(), Error>
fn verify_prehashed( &self, z: &GenericArray<u8, <C as Curve>::FieldBytesSize>, sig: &Signature<C> ) -> Result<(), Error>
Verify the prehashed message against the provided signature Read more
source§fn verify_digest<D>(&self, msg_digest: D, sig: &Signature<C>) -> Result<(), Error>where
D: FixedOutput<OutputSize = <C as Curve>::FieldBytesSize>,
fn verify_digest<D>(&self, msg_digest: D, sig: &Signature<C>) -> Result<(), Error>where D: FixedOutput<OutputSize = <C as Curve>::FieldBytesSize>,
Available on crate feature
digest
only.Verify message digest against the provided signature.
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§
§impl<T> DynAssociatedOid for Twhere
T: AssociatedOid,
impl<T> DynAssociatedOid for Twhere T: AssociatedOid,
source§impl<C> ValidatePublicKey for Cwhere
C: CurveArithmetic,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
impl<C> ValidatePublicKey for Cwhere C: CurveArithmetic, <C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>, <C as Curve>::FieldBytesSize: ModulusSize,
source§fn validate_public_key(
secret_key: &SecretKey<C>,
public_key: &EncodedPoint<<C as Curve>::FieldBytesSize>
) -> Result<(), Error>
fn validate_public_key( secret_key: &SecretKey<C>, public_key: &EncodedPoint<<C as Curve>::FieldBytesSize> ) -> Result<(), Error>
Validate that the given
EncodedPoint
is a valid public key for the
provided secret value.