[][src]Trait vru_sphinx::Sphinx

pub trait Sphinx {
    type MacLength: ArrayLength<u8>;
    type AsymmetricKey: Curve;
    type Stream: SeekableKeyStream;
    fn mu<'a, I>(
        shared: &SharedSecret<Self::AsymmetricKey>,
        data: I
    ) -> GenericArray<u8, Self::MacLength>
    where
        I: Iterator<Item = &'a [u8]>
;
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>
    ) -> <Self::AsymmetricKey as Curve>::Scalar; }

Associated Types

Loading content...

Required methods

fn mu<'a, I>(
    shared: &SharedSecret<Self::AsymmetricKey>,
    data: I
) -> GenericArray<u8, Self::MacLength> where
    I: Iterator<Item = &'a [u8]>, 

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>
) -> <Self::AsymmetricKey as Curve>::Scalar

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 MacLength = C::OutputSize

type AsymmetricKey = A

type Stream = S

Loading content...

Implementors

Loading content...