api

gcm.ch

Declarations in gcm.ch

1 declarationstls

Declarations

Public only
tls#
Publicnamespace
namespace tls
============================================================================
GCMContext#
Publicstruct
struct GCMContext { var cipher_ctx : AESContext var H : u8[16] var len : size_t }
─── GCM Context ────────────────────────────────────────────────────────
gcm_init#
Publicfunction
func gcm_init(ctx : *GCMContext, key : *u8, key_len : size_t) : int
ghash_multiply_refined#
function
func ghash_multiply_refined(output : *u8, x : *u8, y : *u8) : void
GHASH core: multiply in GF(2^128) with the GCM polynomial
ghash#
function
func ghash(ctx : *GCMContext, aad : *u8, aad_len : size_t, ciphertext : *u8, ct_len : size_t, output : *u8) : void
GHASH(H, A, C) = X_{m+n+1} where:
gcm_incr#
function
func gcm_incr(counter : *u8) : void
─── Increment Counter (32-bit big-endian) ───────────────────────────
gcm_crypt_and_tag#
Publicfunction
func gcm_crypt_and_tag(ctx : *GCMContext, iv : *u8, iv_len : size_t, aad : *u8, aad_len : size_t, plaintext : *u8, pt_len : size_t, output : *u8, tag : *u8) : int
iv: 12-byte initial nonce (standard GCM IV length)
gcm_auth_decrypt#
Publicfunction
func gcm_auth_decrypt(ctx : *GCMContext, iv : *u8, iv_len : size_t, aad : *u8, aad_len : size_t, ciphertext : *u8, ct_len : size_t, tag : *u8, tag_len : size_t, output : *u8) : int
─── GCM Decrypt ─────────────────────────────────────────────────────