Struct ECDSA

Source
pub struct ECDSA<H, R, C> { /* private fields */ }
Expand description

Elliptic Curve Digital Signature Algorithms
FIPS 186-4, chapter 6

Implementations§

Source§

impl<H, R, C> ECDSA<H, R, C>
where H: Clone + Digest,

Source

pub fn digest_func(&self) -> H

Source§

impl<H, R, C> ECDSA<H, R, C>
where R: Clone + IterSource<u32>,

Source

pub fn rand_source(&self) -> R

Source§

impl<H, R, C> ECDSA<H, R, C>
where C: EllipticCurve + Clone,

Source

pub fn curve(&self) -> C

Source§

impl<H, R, C> ECDSA<H, R, C>
where C: EllipticCurve,

Source

pub fn public_key(&self) -> &PublicKey

Source§

impl<H, R, C> ECDSA<H, R, C>
where H: Digest, R: IterSource<u32>, C: EllipticCurve,

Source

pub fn new_unchcek( hf: H, rd: R, curve: C, key_pair: KeyPair, ) -> Result<Self, CryptoError>

Source

pub fn auto_generate_key(hf: H, rd: R, curve: C) -> Result<Self, CryptoError>

Trait Implementations§

Source§

impl<H, R, C> Signature<SignatureContent> for ECDSA<H, R, C>
where H: Digest, R: IterSource<u32>, C: EllipticCurve,

Source§

type Output = ()

Source§

fn sign( &mut self, signature: &mut SignatureContent, message: &[u8], ) -> Result<Self::Output, CryptoError>

Source§

fn verify( &mut self, signature: &SignatureContent, message: &[u8], ) -> Result<Self::Output, CryptoError>

Auto Trait Implementations§

§

impl<H, R, C> Freeze for ECDSA<H, R, C>
where C: Freeze, H: Freeze, R: Freeze,

§

impl<H, R, C> !RefUnwindSafe for ECDSA<H, R, C>

§

impl<H, R, C> !Send for ECDSA<H, R, C>

§

impl<H, R, C> !Sync for ECDSA<H, R, C>

§

impl<H, R, C> Unpin for ECDSA<H, R, C>
where C: Unpin, H: Unpin, R: Unpin,

§

impl<H, R, C> !UnwindSafe for ECDSA<H, R, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.