DoxigAlpha

HandshakeCipherT

Fields of this type

Fields

#
transcript_hash:A.Hash
version:union { tls_1_2: struct { expected_server_verify_data: [A.verify_data_length]u8, app_cipher: A.Tls_1_2, }, tls_1_3: struct { handshake_secret: [A.Hkdf.prk_length]u8, master_secret: [A.Hkdf.prk_length]u8, client_handshake_key: [A.AEAD.key_length]u8, server_handshake_key: [A.AEAD.key_length]u8, client_finished_key: [A.Hmac.key_length]u8, server_finished_key: [A.Hmac.key_length]u8, client_handshake_iv: [A.AEAD.nonce_length]u8, server_handshake_iv: [A.AEAD.nonce_length]u8, }, }

Source

Implementation

#
pub fn HandshakeCipherT(comptime AeadType: type, comptime HashType: type, comptime explicit_iv_length: comptime_int) type {
    return struct {
        pub const A = ApplicationCipherT(AeadType, HashType, explicit_iv_length);

        transcript_hash: A.Hash,
        version: union {
            tls_1_2: struct {
                expected_server_verify_data: [A.verify_data_length]u8,
                app_cipher: A.Tls_1_2,
            },
            tls_1_3: struct {
                handshake_secret: [A.Hkdf.prk_length]u8,
                master_secret: [A.Hkdf.prk_length]u8,
                client_handshake_key: [A.AEAD.key_length]u8,
                server_handshake_key: [A.AEAD.key_length]u8,
                client_finished_key: [A.Hmac.key_length]u8,
                server_finished_key: [A.Hmac.key_length]u8,
                client_handshake_iv: [A.AEAD.nonce_length]u8,
                server_handshake_iv: [A.AEAD.nonce_length]u8,
            },
        },
    };
}