Trait rac::Signature[][src]

pub trait Signature where
    Self: LineValid
{ type Scalar: Scalar; type Curve: Curve<Scalar = Self::Scalar>; fn sign<M>(
        secret_key: &Self::Scalar,
        message: &M,
        seed: &Self::Scalar
    ) -> Result<Self, ()>
    where
        M: AsRef<[u8]>
;
fn verify<M>(&self, public_key: &Self::Curve, message: &M) -> Result<(), ()>
    where
        M: AsRef<[u8]>
; }

Associated Types

type Scalar: Scalar[src]

type Curve: Curve<Scalar = Self::Scalar>[src]

Loading content...

Required methods

fn sign<M>(
    secret_key: &Self::Scalar,
    message: &M,
    seed: &Self::Scalar
) -> Result<Self, ()> where
    M: AsRef<[u8]>, 
[src]

fn verify<M>(&self, public_key: &Self::Curve, message: &M) -> Result<(), ()> where
    M: AsRef<[u8]>, 
[src]

Loading content...

Implementors

impl<C, D> Signature for Schnorr<C, D> where
    C: Curve,
    D: Default + Update + FixedOutput<OutputSize = <C::Scalar as LineValid>::Length>,
    Concat<Array<C::CoordinateLength>, C::Scalar>: LineValid
[src]

type Scalar = C::Scalar

type Curve = C

fn sign<M>(
    secret_key: &Self::Scalar,
    message: &M,
    seed: &Self::Scalar
) -> Result<Self, ()> where
    M: AsRef<[u8]>, 
[src]

fn verify<M>(&self, public_key: &Self::Curve, message: &M) -> Result<(), ()> where
    M: AsRef<[u8]>, 
[src]

Loading content...