Trait elliptic_curve::sec1::ValidatePublicKey [−][src]
pub trait ValidatePublicKey where
Self: Curve + SecretValue,
UntaggedPointSize<Self>: Add<U1> + ArrayLength<u8>,
UncompressedPointSize<Self>: ArrayLength<u8>, { fn validate_public_key(
secret_key: &SecretKey<Self>,
public_key: &EncodedPoint<Self>
) -> Result<()> { ... } }
This is supported on crate feature
zeroize
only.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<()>
[src]
secret_key: &SecretKey<Self>,
public_key: &EncodedPoint<Self>
) -> Result<()>
Validate that the given EncodedPoint
is a valid public key for the
provided secret value.
Implementors
impl<C> ValidatePublicKey for C where
C: Curve + ProjectiveArithmetic,
AffinePoint<C>: Copy + Clone + Debug + Default + FromEncodedPoint<C> + ToEncodedPoint<C>,
ProjectivePoint<C>: From<AffinePoint<C>>,
Scalar<C>: PrimeField<Repr = FieldBytes<C>> + Zeroize,
UntaggedPointSize<C>: Add<U1> + ArrayLength<u8>,
UncompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve + ProjectiveArithmetic,
AffinePoint<C>: Copy + Clone + Debug + Default + FromEncodedPoint<C> + ToEncodedPoint<C>,
ProjectivePoint<C>: From<AffinePoint<C>>,
Scalar<C>: PrimeField<Repr = FieldBytes<C>> + Zeroize,
UntaggedPointSize<C>: Add<U1> + ArrayLength<u8>,
UncompressedPointSize<C>: ArrayLength<u8>,
fn validate_public_key(
secret_key: &SecretKey<C>,
public_key: &EncodedPoint<C>
) -> Result<()>
[src]
secret_key: &SecretKey<C>,
public_key: &EncodedPoint<C>
) -> Result<()>