pub struct P384;Expand description
NIST-P256. NIST P-384 elliptic curve.
Trait Implementations§
Source§impl Curve for NistP384
impl Curve for NistP384
Source§impl Curve for NistP384
impl Curve for NistP384
Source§type ScalarSize = <Secp384r1 as Curve>::ScalarSize
type ScalarSize = <Secp384r1 as Curve>::ScalarSize
The size in bytes of a scalar.
Source§type CompressedSize = <Secp384r1 as Curve>::CompressedSize
type CompressedSize = <Secp384r1 as Curve>::CompressedSize
The size in bytes of a compressed point.
Source§type UncompressedSize = <Secp384r1 as Curve>::UncompressedSize
type UncompressedSize = <Secp384r1 as Curve>::UncompressedSize
The size in bytes of a uncompressed point.
Source§impl CurveArithmetic for NistP384
impl CurveArithmetic for NistP384
Source§type AffinePoint = AffinePoint<NistP384>
type AffinePoint = AffinePoint<NistP384>
Elliptic curve point in affine coordinates.
Source§type ProjectivePoint = ProjectivePoint<NistP384>
type ProjectivePoint = ProjectivePoint<NistP384>
Elliptic curve point in projective coordinates. Read more
Source§impl DigestPrimitive for NistP384
Available on crate feature sha384 only.
impl DigestPrimitive for NistP384
Available on crate feature
sha384 only.Source§impl Ecdh for P384
impl Ecdh for P384
Source§const SCALAR_SIZE: usize = <<P384 as Curve>::ScalarSize>::USIZE
const SCALAR_SIZE: usize = <<P384 as Curve>::ScalarSize>::USIZE
The size in bytes of a scalar.
Source§type PrivateKey = P384PrivateKey
type PrivateKey = P384PrivateKey
An ECDH private key.
Source§type PublicKey = P384PublicKey
type PublicKey = P384PublicKey
An ECDH public key. Read more
The shared secret (Diffie-Hellman value) computed as the
result of the key exchange (
Self::ecdh).Source§fn ecdh(
local: &Self::PrivateKey,
remote: &Self::PublicKey,
) -> Result<Self::SharedSecret, EcdhError>
fn ecdh( local: &Self::PrivateKey, remote: &Self::PublicKey, ) -> Result<Self::SharedSecret, EcdhError>
Performs ECDH with the local secret key and remote public
key.
Source§impl Ord for NistP384
impl Ord for NistP384
Source§impl PartialOrd for NistP384
impl PartialOrd for NistP384
Source§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
impl PrimeCurveArithmetic for NistP384
Source§type CurveGroup = ProjectivePoint<NistP384>
type CurveGroup = ProjectivePoint<NistP384>
Prime order elliptic curve group.
Source§impl PrimeCurveParams for NistP384
Adapted from NIST SP 800-186 § G.1.3: Curve P-384.
impl PrimeCurveParams for NistP384
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 90ea0e5fSource§type FieldElement = FieldElement
type FieldElement = FieldElement
Base field element type.
Source§type PointArithmetic = EquationAIsMinusThree
type PointArithmetic = EquationAIsMinusThree
Point arithmetic implementation, might be optimized for this specific curve
Source§impl Signature<NistP384> for P384Signature
impl Signature<NistP384> for P384Signature
Source§impl Signer for P384
impl Signer for P384
Source§type SigningKey = P384SigningKey
type SigningKey = P384SigningKey
A private key used to create signatures.
Source§type VerifyingKey = P384VerifyingKey
type VerifyingKey = P384VerifyingKey
A public key used verify signatures.
Source§type Signature = P384Signature
type Signature = P384Signature
A digital signature.
Source§fn verify_batch(
msgs: &[&[u8]],
sigs: &[Self::Signature],
pks: &[Self::VerifyingKey],
) -> Result<(), SignerError>
fn verify_batch( msgs: &[&[u8]], sigs: &[Self::Signature], pks: &[Self::VerifyingKey], ) -> Result<(), SignerError>
Verifies all (message, signature, verifying key) tuples
as a batch. Read more
Source§impl SigningKey<NistP384> for P384SigningKey
impl SigningKey<NistP384> for P384SigningKey
Source§fn sign(&self, msg: &[u8]) -> Result<P384Signature, SignerError>
fn sign(&self, msg: &[u8]) -> Result<P384Signature, SignerError>
Returns the signature over
msg, which must NOT be
pre-hashed.Source§impl VerifyingKey<NistP384> for P384VerifyingKey
impl VerifyingKey<NistP384> for P384VerifyingKey
Source§fn verify(&self, msg: &[u8], sig: &P384Signature) -> Result<(), SignerError>
fn verify(&self, msg: &[u8], sig: &P384Signature) -> Result<(), SignerError>
Reports whether the signature over
msg is valid.impl Copy for NistP384
impl Eq for NistP384
impl PrimeCurve for NistP384
impl StructuralPartialEq for NistP384
Auto Trait Implementations§
impl Freeze for NistP384
impl RefUnwindSafe for NistP384
impl Send for NistP384
impl Sync for NistP384
impl Unpin for NistP384
impl UnwindSafe for NistP384
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<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.