Symmetric · AEAD NIST SP 800-38D RFC 7714 §16.1.1 Verified

AES-GCM encryption

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

Open in app Download .ncw

AES-GCM encryption

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

Workflow Input (Key, Nonce, AAD, Plaintext) ──► AES Encrypt (mode = GCM) ──► Workflow Output (Ciphertext, Tag)
  1. Parameter Injection (Workflow Input): Exposes four typed bytes output ports—Key (16B for AES-128), Nonce (12B / 96-bit AEAD initialization vector), AAD (12B RTP header), and Plaintext (39B payload)—allowing the graph to be executed by the CLI test runner or embedded as a custom node.
  2. Authenticated Encryption (AES Encrypt): With Cipher Mode set to GCM, the node dynamically exposes the Nonce and AAD input ports alongside Key and Plaintext, and activates the second output port Auth Tag. Because GCTR acts as a stream cipher, no block padding is required for the 39-byte payload.
  3. Result Collection (Workflow Output): Captures both the 39-byte Ciphertext and the 16-byte (128-bit) Tag so callers or test harnesses can verify both outputs simultaneously.

Nodes & Configuration

NodeNode Role & Key ParametersCount
Workflow InputIngress interface supplying Key, Nonce, AAD, and Plaintext byte streams1
AES EncryptConfigured with mode = "GCM", padding = "None" (key size auto-detected as AES-128 from 16B input)1
Workflow OutputEgress interface collecting Ciphertext and Tag1

Node reference → · GCM Mode specification →

Inputs, Outputs & Test Vector Verification

Verification Source: RFC 7714 §16.1.1 (AES-128-GCM, SRTP packet)

Inputs

NameTypeValue (Hex)
Keybytes (16 B)000102030405060708090a0b0c0d0e0f
Noncebytes (12 B)51753c6580c2726f20718414
AADbytes (12 B)8040f17b8041f8d35501a0b2
Plaintextbytes (39 B)47616c6c696120657374206f6d6e69732064697669736120696e207061727465732074726573

Expected Outputs

NameTypeValue (Hex)
Ciphertextbytes (39 B)f24de3a3fb34de6cacba861c9d7e4bcabe633bd50d294e6f42a5f47a51c7d19b36de3adf8833
Tagbytes (16 B)899d7f27beb16a9152cf765ee4390cce