Trait ValidatePublicKey
pub trait ValidatePublicKey: Curvewhere
Self::FieldBytesSize: ModulusSize,{
// Provided method
fn validate_public_key(
secret_key: &SecretKey<Self>,
public_key: &EncodedPoint<Self::FieldBytesSize>,
) -> Result<(), Error> { ... }
}Expand description
Validate that the given EncodedPoint represents the encoded public key
value of the given secret.
Curve implementations which also impl CurveArithmetic will receive
a blanket default impl of this trait.
Provided Methods§
fn validate_public_key(
secret_key: &SecretKey<Self>,
public_key: &EncodedPoint<Self::FieldBytesSize>,
) -> Result<(), Error>
fn validate_public_key( secret_key: &SecretKey<Self>, public_key: &EncodedPoint<Self::FieldBytesSize>, ) -> Result<(), Error>
Validate that the given EncodedPoint is a valid public key for the
provided secret value.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<C> ValidatePublicKey for Cwhere
C: CurveArithmetic,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
Available on crate feature
arithmetic only.