[][src]Struct ecdsa::verify::VerifyKey

pub struct VerifyKey<C> where
    C: Curve + ProjectiveArithmetic,
    FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
    Scalar<C>: PrimeField<Repr = FieldBytes<C>>,
    AffinePoint<C>: Clone + Debug
{ /* fields omitted */ }
This is supported on crate feature verify only.

ECDSA verify key

Implementations

impl<C> VerifyKey<C> where
    C: Curve + ProjectiveArithmetic,
    FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
    Scalar<C>: PrimeField<Repr = FieldBytes<C>> + FromDigest<C>,
    AffinePoint<C>: Clone + Debug + VerifyPrimitive<C> + FromEncodedPoint<C> + ToEncodedPoint<C>,
    UntaggedPointSize<C>: Add<U1> + ArrayLength<u8>,
    UncompressedPointSize<C>: ArrayLength<u8>,
    SignatureSize<C>: ArrayLength<u8>, 
[src]

pub fn new(bytes: &[u8]) -> Result<Self, Error>[src]

This is supported on crate feature verify only.

Initialize VerifyKey from a SEC1-encoded public key.

pub fn from_encoded_point(public_key: &EncodedPoint<C>) -> Result<Self, Error>[src]

This is supported on crate feature verify only.

Initialize VerifyKey from an EncodedPoint.

pub fn to_encoded_point(&self, compress: bool) -> EncodedPoint<C>[src]

This is supported on crate feature verify only.

Serialize this VerifyKey as a SEC1 EncodedPoint, optionally applying point compression.

Trait Implementations

impl<C: Clone> Clone for VerifyKey<C> where
    C: Curve + ProjectiveArithmetic,
    FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
    Scalar<C>: PrimeField<Repr = FieldBytes<C>>,
    AffinePoint<C>: Clone + Debug
[src]

impl<C> Copy for VerifyKey<C> where
    C: Curve + ProjectiveArithmetic,
    FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
    Scalar<C>: PrimeField<Repr = FieldBytes<C>>,
    AffinePoint<C>: Copy + Clone + Debug
[src]

impl<C: Debug> Debug for VerifyKey<C> where
    C: Curve + ProjectiveArithmetic,
    FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
    Scalar<C>: PrimeField<Repr = FieldBytes<C>>,
    AffinePoint<C>: Clone + Debug
[src]

impl<C, D> DigestVerifier<D, Signature<C>> for VerifyKey<C> where
    C: Curve + ProjectiveArithmetic,
    D: Digest<OutputSize = C::FieldSize>,
    FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
    Scalar<C>: PrimeField<Repr = FieldBytes<C>> + FromDigest<C>,
    AffinePoint<C>: Clone + Debug + VerifyPrimitive<C>,
    SignatureSize<C>: ArrayLength<u8>, 
[src]

impl<C> Eq for VerifyKey<C> where
    C: Curve + ProjectiveArithmetic,
    FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
    Scalar<C>: PrimeField<Repr = FieldBytes<C>> + FromDigest<C>,
    AffinePoint<C>: Clone + Debug + VerifyPrimitive<C> + FromEncodedPoint<C> + ToEncodedPoint<C>,
    UntaggedPointSize<C>: Add<U1> + ArrayLength<u8>,
    UncompressedPointSize<C>: ArrayLength<u8>,
    SignatureSize<C>: ArrayLength<u8>, 
[src]

impl<C, '_> From<&'_ SigningKey<C>> for VerifyKey<C> where
    C: Curve + ProjectiveArithmetic,
    FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
    Scalar<C>: PrimeField<Repr = FieldBytes<C>> + FromDigest<C> + Invert<Output = Scalar<C>> + SignPrimitive<C> + Zeroize,
    AffinePoint<C>: Clone + Debug,
    SignatureSize<C>: ArrayLength<u8>, 
[src]

impl<C, '_> From<&'_ VerifyKey<C>> for EncodedPoint<C> where
    C: Curve + ProjectiveArithmetic + Compression,
    FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
    Scalar<C>: PrimeField<Repr = FieldBytes<C>> + FromDigest<C>,
    AffinePoint<C>: Clone + Debug + VerifyPrimitive<C> + FromEncodedPoint<C> + ToEncodedPoint<C>,
    UntaggedPointSize<C>: Add<U1> + ArrayLength<u8>,
    UncompressedPointSize<C>: ArrayLength<u8>,
    SignatureSize<C>: ArrayLength<u8>, 
[src]

impl<C> PartialEq<VerifyKey<C>> for VerifyKey<C> where
    C: Curve + ProjectiveArithmetic,
    FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
    Scalar<C>: PrimeField<Repr = FieldBytes<C>> + FromDigest<C>,
    AffinePoint<C>: Clone + Debug + VerifyPrimitive<C> + FromEncodedPoint<C> + ToEncodedPoint<C>,
    UntaggedPointSize<C>: Add<U1> + ArrayLength<u8>,
    UncompressedPointSize<C>: ArrayLength<u8>,
    SignatureSize<C>: ArrayLength<u8>, 
[src]

impl<C> Verifier<Signature<C>> for VerifyKey<C> where
    C: Curve + ProjectiveArithmetic + DigestPrimitive,
    C::Digest: Digest<OutputSize = C::FieldSize>,
    FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
    Scalar<C>: PrimeField<Repr = FieldBytes<C>> + FromDigest<C>,
    AffinePoint<C>: Clone + Debug + VerifyPrimitive<C>,
    SignatureSize<C>: ArrayLength<u8>, 
[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for VerifyKey<C> where
    <<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: RefUnwindSafe

impl<C> Send for VerifyKey<C> where
    <<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Send

impl<C> Sync for VerifyKey<C> where
    <<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Sync

impl<C> Unpin for VerifyKey<C> where
    <<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Unpin

impl<C> UnwindSafe for VerifyKey<C> where
    <<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.