Skip to main content

Serialize

Trait Serialize 

Source
pub trait Serialize {
    type Len: ArrayLength;

    // Required method
    fn serialize(&self) -> GenericArray<u8, Self::Len>;
}
Expand description

Serialization trait for key exchange types.

Required Associated Types§

Source

type Len: ArrayLength

The length of the serialized types.

Required Methods§

Source

fn serialize(&self) -> GenericArray<u8, Self::Len>

Serialize Self to a fixed-length byte array.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<CS: CipherSuite, KE: Group> Serialize for CachedMessage<CS, KE>
where <<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen: ArrayLength + Add<Sum<U32, KE::PkLen>> + Add<U32>, Sum<<<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen, Sum<U32, KE::PkLen>>: ArrayLength + Add<Sum<Sum<<<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen, U32>, Sum<Sum<<<<CS::OprfCs as CipherSuite>::Hash as CoreProxy>::Core as OutputSizeUser>::OutputSize, U32>, <<CS::KeyExchange as KeyExchange>::Group as Group>::PkLen>>>, Sum<Sum<<<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen, Sum<U32, KE::PkLen>>, Sum<Sum<<<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen, U32>, Sum<Sum<<<<CS::OprfCs as CipherSuite>::Hash as CoreProxy>::Core as OutputSizeUser>::OutputSize, U32>, <<CS::KeyExchange as KeyExchange>::Group as Group>::PkLen>>>: ArrayLength + Add<U32>, Sum<Sum<Sum<<<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen, Sum<U32, KE::PkLen>>, Sum<Sum<<<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen, U32>, Sum<Sum<<<<CS::OprfCs as CipherSuite>::Hash as CoreProxy>::Core as OutputSizeUser>::OutputSize, U32>, <<CS::KeyExchange as KeyExchange>::Group as Group>::PkLen>>>, U32>: ArrayLength + Add<KE::PkLen>, Sum<Sum<Sum<Sum<<<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen, Sum<U32, KE::PkLen>>, Sum<Sum<<<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen, U32>, Sum<Sum<<<<CS::OprfCs as CipherSuite>::Hash as CoreProxy>::Core as OutputSizeUser>::OutputSize, U32>, <<CS::KeyExchange as KeyExchange>::Group as Group>::PkLen>>>, U32>, KE::PkLen>: ArrayLength + Add<<<<CS::KeyExchange as KeyExchange>::Hash as CoreProxy>::Core as OutputSizeUser>::OutputSize>, Sum<Sum<Sum<Sum<Sum<<<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen, Sum<U32, KE::PkLen>>, Sum<Sum<<<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen, U32>, Sum<Sum<<<<CS::OprfCs as CipherSuite>::Hash as CoreProxy>::Core as OutputSizeUser>::OutputSize, U32>, <<CS::KeyExchange as KeyExchange>::Group as Group>::PkLen>>>, U32>, KE::PkLen>, <<<CS::KeyExchange as KeyExchange>::Hash as CoreProxy>::Core as OutputSizeUser>::OutputSize>: ArrayLength, U32: Add<KE::PkLen>, Sum<U32, KE::PkLen>: ArrayLength, Sum<<<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen, U32>: ArrayLength + Add<Sum<Sum<<<<CS::OprfCs as CipherSuite>::Hash as CoreProxy>::Core as OutputSizeUser>::OutputSize, U32>, <<CS::KeyExchange as KeyExchange>::Group as Group>::PkLen>>, Sum<Sum<<<CS::OprfCs as CipherSuite>::Group as Group>::ElemLen, U32>, Sum<Sum<<<<CS::OprfCs as CipherSuite>::Hash as CoreProxy>::Core as OutputSizeUser>::OutputSize, U32>, <<CS::KeyExchange as KeyExchange>::Group as Group>::PkLen>>: ArrayLength,

Source§

impl<CS: CipherSuite, SIG: SignatureProtocol, KE: Group> Serialize for opaque_vx::key_exchange::sigma_i::Ke2State<CS, SIG, KE>

Source§

impl<CS: CipherSuite> Serialize for SerializedCredentialRequest<CS>

Source§

impl<CS: CipherSuite> Serialize for SerializedCredentialResponse<CS>

Source§

impl<G: Group, H: Hash, K: KemCoreWrapper> Serialize for KemKe2Message<G, H, K>

Available on crate feature kem only.
Source§

impl<G: Group, K: KemCoreWrapper> Serialize for KemKe1Message<G, K>

Available on crate feature kem only.
Source§

impl<G: Group, K: KemCoreWrapper> Serialize for KemKe1State<G, K>

Available on crate feature kem only.
Source§

impl<G: Group> Serialize for Ke1Message<G>
where U32: Add<G::PkLen>, Sum<U32, G::PkLen>: ArrayLength,

Source§

type Len = <UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0> as Add<<G as Group>::PkLen>>::Output

Source§

impl<G: Group> Serialize for Ke1State<G>
where G::SkLen: Add<U32>, Sum<G::SkLen, U32>: ArrayLength,

Source§

type Len = <<G as Group>::SkLen as Add<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>>::Output

Source§

impl<H: Hash, G: Group> Serialize for opaque_vx::key_exchange::tripledh::Ke2Message<G, H>

Source§

type Len = <<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0> as Add<<G as Group>::PkLen>>::Output as Add<<<H as CoreProxy>::Core as OutputSizeUser>::OutputSize>>::Output

Source§

impl<H: Hash> Serialize for opaque_vx::key_exchange::tripledh::Ke2State<H>

Source§

impl<H: Hash> Serialize for opaque_vx::key_exchange::tripledh::Ke3Message<H>

Source§

impl<H: OutputSizeUser> Serialize for PreHash<H>

Source§

impl<K: KemCoreWrapper, H: Hash> Serialize for KemKe2State<K, H>

Available on crate feature kem only.
Source§

impl<SIG: SignatureProtocol, KE: Group, KEH: Hash> Serialize for opaque_vx::key_exchange::sigma_i::Ke2Message<SIG, KE, KEH>

Source§

impl<SIG: SignatureProtocol, KEH: Hash> Serialize for opaque_vx::key_exchange::sigma_i::Ke3Message<SIG, KEH>