libcrux-psq 0.0.9

Libcrux Pre-Shared post-Quantum key establishement protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! # Ciphersuite Traits
//!
//! This module defines common behaviour for all initiator and responder ciphersuites.

use tls_codec::{Deserialize, Serialize, SerializeBytes, Size};

use crate::handshake::ciphersuite::CiphersuiteName;

/// Functionality and associated types that are shared in common
/// between initiator and responde ciphersuites.
pub(crate) trait CiphersuiteBase {
    type Ciphertext: Serialize + Deserialize + Size;
    type EncapsulationKeyRef: Serialize + Size;
    type SharedSecret: SerializeBytes + Size;

    fn name(&self) -> CiphersuiteName;
}