Struct ecdsa::SigningKey

source ·
pub struct SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,
{ /* private fields */ }
Expand description

ECDSA signing key. Generic over elliptic curves.

Requires an [elliptic_curve::ProjectiveArithmetic] impl on the curve, and a SignPrimitive impl on its associated Scalar type.

Implementations§

source§

impl<C> SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source

pub fn random(rng: impl CryptoRng + RngCore) -> Self

Generate a cryptographically random SigningKey.

source

pub fn from_bytes(bytes: &[u8]) -> Result<Self>

Initialize signing key from a raw scalar serialized as a byte slice.

source

pub fn to_bytes(&self) -> FieldBytes<C>

Serialize this SigningKey as bytes

source

pub fn as_nonzero_scalar(&self) -> &NonZeroScalar<C>

Borrow the secret [NonZeroScalar] value for this key.

§⚠️ Warning

This value is key material.

Please treat it with the care it deserves!

source

pub fn verifying_key(&self) -> VerifyingKey<C>

Get the VerifyingKey which corresponds to this SigningKey

Trait Implementations§

source§

impl<C> AsRef<VerifyingKey<C>> for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn as_ref(&self) -> &VerifyingKey<C>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<C> Clone for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic + Clone, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn clone(&self) -> SigningKey<C>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<C> ConstantTimeEq for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn ct_eq(&self, other: &Self) -> Choice

Determine if two items are equal. Read more
source§

impl<C> Debug for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<C> DecodePrivateKey for SigningKey<C>
where C: PrimeCurve + AssociatedOid + ProjectiveArithmetic, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldSize<C>: ModulusSize, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn from_pkcs8_der(bytes: &[u8]) -> Result<Self, Error>

Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).
source§

fn from_pkcs8_pem(s: &str) -> Result<Self, Error>

Deserialize PKCS#8-encoded private key from PEM. Read more
source§

impl<C, D> DigestSigner<D, Signature<C>> for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, C::UInt: for<'a> From<&'a Scalar<C>>, D: Digest + BlockSizeUser + FixedOutput<OutputSize = FieldSize<C>> + FixedOutputReset, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn try_sign_digest(&self, msg_digest: D) -> Result<Signature<C>>

Sign message digest using a deterministic ephemeral scalar (k) computed using the algorithm described in RFC6979 § 3.2.

§

fn sign_digest(&self, digest: D) -> S

Sign the given prehashed message Digest, returning a signature. Read more
source§

impl<C> Drop for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<C> EncodePrivateKey for SigningKey<C>
where C: AssociatedOid + PrimeCurve + ProjectiveArithmetic, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldSize<C>: ModulusSize, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn to_pkcs8_der(&self) -> Result<SecretDocument>

Serialize a SecretDocument containing a PKCS#8-encoded private key.
source§

fn to_pkcs8_pem( &self, line_ending: LineEnding ) -> Result<Zeroizing<String>, Error>

Serialize this private key as PEM-encoded PKCS#8 with the given LineEnding.
source§

impl<C> From<&SecretKey<C>> for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn from(secret_key: &SecretKey<C>) -> Self

Converts to this type from the input type.
source§

impl<C> From<&SigningKey<C>> for SecretKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn from(secret_key: &SigningKey<C>) -> Self

Converts to this type from the input type.
source§

impl<C> From<&SigningKey<C>> for VerifyingKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn from(signing_key: &SigningKey<C>) -> VerifyingKey<C>

Converts to this type from the input type.
source§

impl<C> From<NonZeroScalar<C>> for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn from(secret_scalar: NonZeroScalar<C>) -> Self

Converts to this type from the input type.
source§

impl<C> From<SecretKey<C>> for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn from(secret_key: SecretKey<C>) -> Self

Converts to this type from the input type.
source§

impl<C> From<SigningKey<C>> for SecretKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn from(key: SigningKey<C>) -> Self

Converts to this type from the input type.
source§

impl<C> FromStr for SigningKey<C>
where C: PrimeCurve + AssociatedOid + ProjectiveArithmetic, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldSize<C>: ModulusSize, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self>

Parses a string s to return a value of this type. Read more
source§

impl<C> Keypair<Signature<C>> for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

§

type VerifyingKey = VerifyingKey<C>

Verifying key type for this keypair.
§

fn verifying_key(&self) -> &Self::VerifyingKey

Get the verifying key which can verify signatures produced by the signing key portion of this keypair.
source§

impl<C> PartialEq for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

Constant-time comparison

source§

fn eq(&self, other: &SigningKey<C>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<C> PrehashSigner<Signature<C>> for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic + DigestPrimitive, C::Digest: BlockSizeUser + FixedOutput<OutputSize = FieldSize<C>> + FixedOutputReset, C::UInt: for<'a> From<&'a Scalar<C>>, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn sign_prehash(&self, prehash: &[u8]) -> Result<Signature<C>>

Attempt to sign the given message digest, returning a digital signature on success, or an error if something went wrong. Read more
source§

impl<C, D> RandomizedDigestSigner<D, Signature<C>> for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, C::UInt: for<'a> From<&'a Scalar<C>>, D: Digest + BlockSizeUser + FixedOutput<OutputSize = FieldSize<C>> + FixedOutputReset, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn try_sign_digest_with_rng( &self, rng: impl CryptoRng + RngCore, msg_digest: D ) -> Result<Signature<C>>

Sign message prehash using an ephemeral scalar (k) derived according to a variant of RFC 6979 (Section 3.6) which supplies additional entropy from an RNG.

§

fn sign_digest_with_rng(&self, rng: impl CryptoRng + RngCore, digest: D) -> S

Sign the given prehashed message Digest, returning a signature. Read more
source§

impl<C> RandomizedSigner<Signature<C>> for SigningKey<C>
where Self: RandomizedDigestSigner<C::Digest, Signature<C>>, C: PrimeCurve + ProjectiveArithmetic + DigestPrimitive, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn try_sign_with_rng( &self, rng: impl CryptoRng + RngCore, msg: &[u8] ) -> Result<Signature<C>>

Attempt to sign the given message, returning a digital signature on success, or an error if something went wrong. Read more
§

fn sign_with_rng(&self, rng: impl CryptoRng + RngCore, msg: &[u8]) -> S

Sign the given message and return a digital signature
source§

impl<C> Signer<Signature<C>> for SigningKey<C>
where Self: DigestSigner<C::Digest, Signature<C>>, C: PrimeCurve + ProjectiveArithmetic + DigestPrimitive, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

source§

fn try_sign(&self, msg: &[u8]) -> Result<Signature<C>>

Attempt to sign the given message, returning a digital signature on success, or an error if something went wrong. Read more
§

fn sign(&self, msg: &[u8]) -> S

Sign the given message and return a digital signature
source§

impl<C> TryFrom<&[u8]> for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(bytes: &[u8]) -> Result<Self>

Performs the conversion.
source§

impl<C> TryFrom<PrivateKeyInfo<'_>> for SigningKey<C>
where C: PrimeCurve + AssociatedOid + ProjectiveArithmetic, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldSize<C>: ModulusSize, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(private_key_info: PrivateKeyInfo<'_>) -> Result<Self>

Performs the conversion.
source§

impl<C> Eq for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

Constant-time comparison

source§

impl<C> ZeroizeOnDrop for SigningKey<C>
where C: PrimeCurve + ProjectiveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + Reduce<C::UInt> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,

Auto Trait Implementations§

§

impl<C> Freeze for SigningKey<C>
where <<<C as Curve>::UInt as ArrayEncoding>::ByteSize as Add>::Output: Unsigned + Default + Sized + Copy + Clone + Sealed + 'static, <C as ScalarArithmetic>::Scalar: Into<GenericArray<u8, <<C as Curve>::UInt as ArrayEncoding>::ByteSize>> + Field<Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar> + for<'a> SubAssign<&'a <C as ScalarArithmetic>::Scalar> + for<'a> AddAssign<&'a <C as ScalarArithmetic>::Scalar> + for<'a> MulAssign<&'a <C as ScalarArithmetic>::Scalar> + SubAssign + AddAssign + MulAssign + for<'a> Sub<&'a <C as ScalarArithmetic>::Scalar> + for<'a> Mul<&'a <C as ScalarArithmetic>::Scalar> + for<'a> Add<&'a <C as ScalarArithmetic>::Scalar> + Neg + Mul + Sub + Add + ConstantTimeEq + ConditionallySelectable + Debug + Sync + Send + Default + Clone + Copy + Eq + PartialEq + Sized + 'static + Freeze, C: AffineArithmetic + ScalarArithmetic + Curve + Sync + Send + Ord + PartialOrd + PartialEq + Eq + Default + Debug + Clone + Copy + 'static, <C as AffineArithmetic>::AffinePoint: Freeze,

§

impl<C> RefUnwindSafe for SigningKey<C>
where <<<C as Curve>::UInt as ArrayEncoding>::ByteSize as Add>::Output: Unsigned + Default + Sized + Copy + Clone + Sealed + 'static, <C as ScalarArithmetic>::Scalar: Into<GenericArray<u8, <<C as Curve>::UInt as ArrayEncoding>::ByteSize>> + Field<Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar> + for<'a> SubAssign<&'a <C as ScalarArithmetic>::Scalar> + for<'a> AddAssign<&'a <C as ScalarArithmetic>::Scalar> + for<'a> MulAssign<&'a <C as ScalarArithmetic>::Scalar> + SubAssign + AddAssign + MulAssign + for<'a> Sub<&'a <C as ScalarArithmetic>::Scalar> + for<'a> Mul<&'a <C as ScalarArithmetic>::Scalar> + for<'a> Add<&'a <C as ScalarArithmetic>::Scalar> + Neg + Mul + Sub + Add + ConstantTimeEq + ConditionallySelectable + Debug + Sync + Send + Default + Clone + Copy + Eq + PartialEq + Sized + 'static + RefUnwindSafe, C: AffineArithmetic + ScalarArithmetic + Curve + Sync + Send + Ord + PartialOrd + PartialEq + Eq + Default + Debug + Clone + Copy + 'static, <C as AffineArithmetic>::AffinePoint: RefUnwindSafe,

§

impl<C> Send for SigningKey<C>
where <<<C as Curve>::UInt as ArrayEncoding>::ByteSize as Add>::Output: Unsigned + Default + Sized + Copy + Clone + Sealed + 'static, <C as ScalarArithmetic>::Scalar: Into<GenericArray<u8, <<C as Curve>::UInt as ArrayEncoding>::ByteSize>> + Field<Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar> + for<'a> SubAssign<&'a <C as ScalarArithmetic>::Scalar> + for<'a> AddAssign<&'a <C as ScalarArithmetic>::Scalar> + for<'a> MulAssign<&'a <C as ScalarArithmetic>::Scalar> + SubAssign + AddAssign + MulAssign + for<'a> Sub<&'a <C as ScalarArithmetic>::Scalar> + for<'a> Mul<&'a <C as ScalarArithmetic>::Scalar> + for<'a> Add<&'a <C as ScalarArithmetic>::Scalar> + Neg + Mul + Sub + Add + ConstantTimeEq + ConditionallySelectable + Debug + Sync + Send + Default + Clone + Copy + Eq + PartialEq + Sized + 'static, C: AffineArithmetic + ScalarArithmetic + Curve + Sync + Send + Ord + PartialOrd + PartialEq + Eq + Default + Debug + Clone + Copy + 'static,

§

impl<C> Sync for SigningKey<C>
where <<<C as Curve>::UInt as ArrayEncoding>::ByteSize as Add>::Output: Unsigned + Default + Sized + Copy + Clone + Sealed + 'static, <C as ScalarArithmetic>::Scalar: Into<GenericArray<u8, <<C as Curve>::UInt as ArrayEncoding>::ByteSize>> + Field<Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar> + for<'a> SubAssign<&'a <C as ScalarArithmetic>::Scalar> + for<'a> AddAssign<&'a <C as ScalarArithmetic>::Scalar> + for<'a> MulAssign<&'a <C as ScalarArithmetic>::Scalar> + SubAssign + AddAssign + MulAssign + for<'a> Sub<&'a <C as ScalarArithmetic>::Scalar> + for<'a> Mul<&'a <C as ScalarArithmetic>::Scalar> + for<'a> Add<&'a <C as ScalarArithmetic>::Scalar> + Neg + Mul + Sub + Add + ConstantTimeEq + ConditionallySelectable + Debug + Sync + Send + Default + Clone + Copy + Eq + PartialEq + Sized + 'static, C: AffineArithmetic + ScalarArithmetic + Curve + Sync + Send + Ord + PartialOrd + PartialEq + Eq + Default + Debug + Clone + Copy + 'static,

§

impl<C> Unpin for SigningKey<C>
where <<<C as Curve>::UInt as ArrayEncoding>::ByteSize as Add>::Output: Unsigned + Default + Sized + Copy + Clone + Sealed + 'static, <C as ScalarArithmetic>::Scalar: Into<GenericArray<u8, <<C as Curve>::UInt as ArrayEncoding>::ByteSize>> + Field<Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar> + for<'a> SubAssign<&'a <C as ScalarArithmetic>::Scalar> + for<'a> AddAssign<&'a <C as ScalarArithmetic>::Scalar> + for<'a> MulAssign<&'a <C as ScalarArithmetic>::Scalar> + SubAssign + AddAssign + MulAssign + for<'a> Sub<&'a <C as ScalarArithmetic>::Scalar> + for<'a> Mul<&'a <C as ScalarArithmetic>::Scalar> + for<'a> Add<&'a <C as ScalarArithmetic>::Scalar> + Neg + Mul + Sub + Add + ConstantTimeEq + ConditionallySelectable + Debug + Sync + Send + Default + Clone + Copy + Eq + PartialEq + Sized + 'static + Unpin, C: AffineArithmetic + ScalarArithmetic + Curve + Sync + Send + Ord + PartialOrd + PartialEq + Eq + Default + Debug + Clone + Copy + 'static, <C as AffineArithmetic>::AffinePoint: Unpin,

§

impl<C> UnwindSafe for SigningKey<C>
where <<<C as Curve>::UInt as ArrayEncoding>::ByteSize as Add>::Output: Unsigned + Default + Sized + Copy + Clone + Sealed + 'static, <C as ScalarArithmetic>::Scalar: Into<GenericArray<u8, <<C as Curve>::UInt as ArrayEncoding>::ByteSize>> + Field<Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar, Output = <C as ScalarArithmetic>::Scalar> + for<'a> SubAssign<&'a <C as ScalarArithmetic>::Scalar> + for<'a> AddAssign<&'a <C as ScalarArithmetic>::Scalar> + for<'a> MulAssign<&'a <C as ScalarArithmetic>::Scalar> + SubAssign + AddAssign + MulAssign + for<'a> Sub<&'a <C as ScalarArithmetic>::Scalar> + for<'a> Mul<&'a <C as ScalarArithmetic>::Scalar> + for<'a> Add<&'a <C as ScalarArithmetic>::Scalar> + Neg + Mul + Sub + Add + ConstantTimeEq + ConditionallySelectable + Debug + Sync + Send + Default + Clone + Copy + Eq + PartialEq + Sized + 'static + UnwindSafe, C: AffineArithmetic + ScalarArithmetic + Curve + Sync + Send + Ord + PartialOrd + PartialEq + Eq + Default + Debug + Clone + Copy + 'static, <C as AffineArithmetic>::AffinePoint: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> DecodeEcPrivateKey for T

§

fn from_sec1_der(private_key: &[u8]) -> Result<T, Error>

Deserialize SEC1 private key from ASN.1 DER-encoded data (binary format).
§

fn from_sec1_pem(s: &str) -> Result<Self, Error>

Deserialize SEC1-encoded private key from PEM. Read more
§

impl<T> EncodeEcPrivateKey for T

§

fn to_sec1_der(&self) -> Result<SecretDocument, Error>

Serialize a SecretDocument containing a SEC1-encoded private key.
§

fn to_sec1_pem( &self, line_ending: LineEnding ) -> Result<Zeroizing<String>, Error>

Serialize this private key as PEM-encoded SEC1 with the given LineEnding. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T, S> SignerMut<S> for T
where T: Signer<S>, S: Signature,

§

fn try_sign(&mut self, msg: &[u8]) -> Result<S, Error>

Attempt to sign the given message, updating the state, and returning a digital signature on success, or an error if something went wrong. Read more
§

fn sign(&mut self, msg: &[u8]) -> S

Sign the given message, update the state, and return a digital signature
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.