Trait elliptic_curve_flow::sec1::ValidatePublicKey [−][src]
pub trait ValidatePublicKey where
Self: PrimeCurve,
UntaggedPointSize<Self>: Add<U1> + ArrayLength<u8>,
UncompressedPointSize<Self>: ArrayLength<u8>, {
fn validate_public_key(
secret_key: &SecretKey<Self>,
public_key: &EncodedPoint<Self>
) -> Result<()> { ... }
}
Expand description
Validate that the given EncodedPoint
represents the encoded public key
value of the given secret.
Curve implementations which also impl ProjectiveArithmetic
will receive
a blanket default impl of this trait.
Provided methods
fn 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.