[][src]Trait vru_sphinx::Sphinx

pub trait Sphinx {
    type KeyLength: ArrayLength<u8>;
    type MacLength: ArrayLength<u8>;
    type AsymmetricKey: Curve;
    type Stream: KeyStream + SeekableKeyStream;
    type Collector;
    fn mu(shared: &SharedSecret<Self::AsymmetricKey>) -> Self::Collector;
fn chain<T>(collector: Self::Collector, data: T) -> Self::Collector
    where
        T: AsRef<[u8]>
;
fn output(collector: Self::Collector) -> GenericArray<u8, Self::MacLength>;
fn rho(shared: &SharedSecret<Self::AsymmetricKey>) -> Self::Stream;
fn pi(shared: &SharedSecret<Self::AsymmetricKey>) -> Self::Stream;
fn tau(public_key: Self::AsymmetricKey) -> SharedSecret<Self::AsymmetricKey>;
fn blinding(
        public_key: &Self::AsymmetricKey,
        shared: &SharedSecret<Self::AsymmetricKey>
    ) -> SharedSecret<Self::AsymmetricKey>; }

Associated Types

Loading content...

Required methods

fn mu(shared: &SharedSecret<Self::AsymmetricKey>) -> Self::Collector

fn chain<T>(collector: Self::Collector, data: T) -> Self::Collector where
    T: AsRef<[u8]>, 

fn output(collector: Self::Collector) -> GenericArray<u8, Self::MacLength>

fn rho(shared: &SharedSecret<Self::AsymmetricKey>) -> Self::Stream

fn pi(shared: &SharedSecret<Self::AsymmetricKey>) -> Self::Stream

fn tau(public_key: Self::AsymmetricKey) -> SharedSecret<Self::AsymmetricKey>

fn blinding(
    public_key: &Self::AsymmetricKey,
    shared: &SharedSecret<Self::AsymmetricKey>
) -> SharedSecret<Self::AsymmetricKey>

Loading content...

Implementations on Foreign Types

impl<A, C, D, S> Sphinx for (A, C, D, S) where
    A: Curve,
    C: Mac + NewMac,
    D: Default + Update + FixedOutput<OutputSize = <<A as Curve>::Scalar as LineValid>::Length>,
    S: PseudoRandomStream<C::OutputSize> + SeekableKeyStream
[src]

type KeyLength = C::KeySize

type MacLength = C::OutputSize

type AsymmetricKey = A

type Stream = S

type Collector = C

Loading content...

Implementors

Loading content...