AES-GCM encryption
AES-128-GCM authenticated encryption with a 96-bit nonce and associated data. Outputs the ciphertext and the 128-bit tag.

Overview & Cryptographic Context
Galois/Counter Mode (GCM), specified in NIST SP 800-38D, is the most widely deployed Authenticated Encryption with Associated Data (AEAD) scheme in modern protocols including TLS 1.3, QUIC, IPsec, and Secure Real-time Transport Protocol (SRTP, RFC 7714). It combines counter-mode encryption (GCTR) with a polynomial universal hash over the binary Galois field GF(2128) (GHASH) to guarantee both confidentiality and integrity in a single pass.
This workflow reproduces the normative SRTP packet encryption vector from RFC 7714 §16.1.1. In SRTP, the 12-byte RTP header is passed as Additional Authenticated Data (AAD) so that network relays can read packet sequence numbers and timestamps in the clear while any tampering with the header or the 39-byte Latin payload ("Gallia est omnis divisa in partes tres") immediately invalidates the 16-byte authentication tag.
Pipeline Architecture & Wiring Flow
- Parameter Injection (
Workflow Input): Exposes four typedbytesoutput ports—Key(16B for AES-128),Nonce(12B / 96-bit AEAD initialization vector),AAD(12B RTP header), andPlaintext(39B payload)—allowing the graph to be executed by the CLI test runner or embedded as a custom node. - Authenticated Encryption (
AES Encrypt): With Cipher Mode set toGCM, the node dynamically exposes theNonceandAADinput ports alongsideKeyandPlaintext, and activates the second output portAuth Tag. Because GCTR acts as a stream cipher, no block padding is required for the 39-byte payload. - Result Collection (
Workflow Output): Captures both the 39-byteCiphertextand the 16-byte (128-bit)Tagso callers or test harnesses can verify both outputs simultaneously.
Nodes & Configuration
| Node | Node Role & Key Parameters | Count |
|---|---|---|
| Workflow Input | Ingress interface supplying Key, Nonce, AAD, and Plaintext byte streams | 1 |
| AES Encrypt | Configured with mode = "GCM", padding = "None" (key size auto-detected as AES-128 from 16B input) | 1 |
| Workflow Output | Egress interface collecting Ciphertext and Tag | 1 |
Inputs, Outputs & Test Vector Verification
Verification Source: RFC 7714 §16.1.1 (AES-128-GCM, SRTP packet)
Inputs
| Name | Type | Value (Hex) |
|---|---|---|
Key | bytes (16 B) | 000102030405060708090a0b0c0d0e0f |
Nonce | bytes (12 B) | 51753c6580c2726f20718414 |
AAD | bytes (12 B) | 8040f17b8041f8d35501a0b2 |
Plaintext | bytes (39 B) | 47616c6c696120657374206f6d6e69732064697669736120696e207061727465732074726573 |
Expected Outputs
| Name | Type | Value (Hex) |
|---|---|---|
Ciphertext | bytes (39 B) | f24de3a3fb34de6cacba861c9d7e4bcabe633bd50d294e6f42a5f47a51c7d19b36de3adf8833 |
Tag | bytes (16 B) | 899d7f27beb16a9152cf765ee4390cce |