Trait elliptic_curve::sec1::ValidatePublicKey
source · pub trait ValidatePublicKeywhere
Self: Curve,
FieldBytesSize<Self>: ModulusSize,{
// Provided method
fn validate_public_key(
secret_key: &SecretKey<Self>,
public_key: &EncodedPoint<Self>
) -> Result<()> { ... }
}
Available on crate feature
sec1
only.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§
sourcefn validate_public_key(
secret_key: &SecretKey<Self>,
public_key: &EncodedPoint<Self>
) -> Result<()>
fn validate_public_key( secret_key: &SecretKey<Self>, public_key: &EncodedPoint<Self> ) -> Result<()>
Validate that the given EncodedPoint
is a valid public key for the
provided secret value.
Object Safety§
This trait is not object safe.
Implementors§
impl<C> ValidatePublicKey for Cwhere C: CurveArithmetic, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
Available on crate feature
arithmetic
only.