[][src]Trait elliptic_curve::secret_key::SecretValue

pub trait SecretValue: Curve {
    type Secret: Into<FieldBytes<Self>> + Zeroize;
    fn from_secret_bytes(bytes: &FieldBytes<Self>) -> Option<Self::Secret>;
}
This is supported on crate feature zeroize only.

Inner value stored by a SecretKey.

Associated Types

type Secret: Into<FieldBytes<Self>> + Zeroize

This is supported on crate feature zeroize only.

Inner secret value.

⚠️ WARNING ⚠️

This type is not intended to be part of the public API and in future versions of this crate we will try to explore ways to hide it.

Crates such as k256 and p256 conditionally define this type differently depending on what cargo features are enabled. This means any consumers of this crate attempting to use this type may experience breakages if the cargo features are not what are expected.

We regret exposing it as part of the public API for now, however if you do reference this type as a downstream consumer of a curve crate, be aware you will experience breakages!

Loading content...

Required methods

fn from_secret_bytes(bytes: &FieldBytes<Self>) -> Option<Self::Secret>

This is supported on crate feature zeroize only.

Parse the secret value from bytes

Loading content...

Implementors

impl<C> SecretValue for C where
    C: Curve + ProjectiveArithmetic,
    FieldBytes<C>: From<Scalar<C>> + for<'a> From<&'a Scalar<C>>,
    Scalar<C>: PrimeField<Repr = FieldBytes<C>> + Zeroize
[src]

type Secret = NonZeroScalar<C>

This is supported on crate feature zeroize only.
Loading content...