hopr_crypto_sphinx::shared_keys

Trait SphinxSuite

Source
pub trait SphinxSuite {
    type P: Keypair;
    type E: Scalar + for<'a> From<&'a Self::P>;
    type G: GroupElement<Self::E> + for<'a> From<&'a <Self::P as Keypair>::Public>;

    // Provided method
    fn new_shared_keys(
        public_keys: &[<Self::P as Keypair>::Public],
    ) -> Result<SharedKeys<Self::E, Self::G>> { ... }
}
Expand description

Represents an instantiation of the Spinx protocol using the given EC group and corresponding public key object.

Required Associated Types§

Source

type P: Keypair

Keypair corresponding to the EC group

Source

type E: Scalar + for<'a> From<&'a Self::P>

Scalar type supported by the EC group

Source

type G: GroupElement<Self::E> + for<'a> From<&'a <Self::P as Keypair>::Public>

EC group element

Provided Methods§

Source

fn new_shared_keys( public_keys: &[<Self::P as Keypair>::Public], ) -> Result<SharedKeys<Self::E, Self::G>>

Convenience function to generate shared keys from the path of public keys.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl SphinxSuite for X25519Suite

Source§

type P = OffchainKeypair

Source§

type E = Scalar

Source§

type G = MontgomeryPoint