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>;
type PRP: PRP + KeyIvInit;
// Provided methods
fn new_shared_keys<'a>(
public_keys: &'a [<Self::P as Keypair>::Public],
) -> Result<SharedKeys<Self::E, Self::G>>
where &'a GenericArray<u8, <Self::G as GroupElement<Self::E>>::AlphaLen>: From<&'a <Self::P as Keypair>::Public> { ... }
fn new_prp_init(secret: &SecretKey) -> Result<IvKey<Self::PRP>> { ... }
fn new_reply_prp_init(
secret: &SecretKey16,
salt: &[u8],
) -> Result<IvKey<Self::PRP>> { ... }
}Expand description
Represents an instantiation of the Spinx protocol using the given EC group and corresponding public key object.
Required Associated Types§
Provided Methods§
Convenience function to generate shared keys from the path of public keys.
Sourcefn new_prp_init(secret: &SecretKey) -> Result<IvKey<Self::PRP>>
fn new_prp_init(secret: &SecretKey) -> Result<IvKey<Self::PRP>>
Instantiates a new Pseudo-Random Permutation IV and key for general packet data.
Sourcefn new_reply_prp_init(
secret: &SecretKey16,
salt: &[u8],
) -> Result<IvKey<Self::PRP>>
fn new_reply_prp_init( secret: &SecretKey16, salt: &[u8], ) -> Result<IvKey<Self::PRP>>
Instantiates a new Pseudo-Random Permutation IV and key for reply data.
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 Ed25519Suite
Available on crate feature ed25519 only.
impl SphinxSuite for Ed25519Suite
Available on crate feature
ed25519 only.type E = Scalar
type G = EdwardsPoint
type P = OffchainKeypair
type PRP = Lioness<Hasher, StreamCipherCoreWrapper<ChaChaCore<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>>>, <UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0> as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B0>>>::Output>
Source§impl SphinxSuite for X25519Suite
Available on crate feature x25519 only.
impl SphinxSuite for X25519Suite
Available on crate feature
x25519 only.