Expand description
Encapsulation (single-party — anyone can encrypt).
Threshold KEM encapsulation is identical to single-party KEM encapsulation: generate an ephemeral keypair, derive the shared secret, encrypt the shared secret to the recipient’s public key. The difference is in decapsulation: T-of-N parties must collaborate.
Structs§
- Encapsulated
Key - An encapsulated key — produced by encapsulate, consumed by threshold decapsulate.
- Mock
Encapsulator - In-memory test encapsulator for “mock” algorithm.
- Shared
Secret - The shared secret derived during encapsulation. The encryptor uses this as the AEAD key to encrypt the actual plaintext.
- Threshold
Public Key - The recipient’s threshold public key (algorithm-agnostic bytes).
Enums§
- Encapsulate
Error - Errors during encapsulation.
Traits§
- Encapsulator
- Trait for algorithm implementations of threshold KEM encapsulation.
Functions§
- encapsulate_
mock - Convenience function: encapsulate using the mock encapsulator.
- validate_
share_ for_ algorithm - Marker for the decapsulator side — verifies the share is for the right algorithm.