The 512-byte ghost in the capture
The incident report had arithmetic you could check and a conclusion you could not trust. One outbound TLSCiphertext record sat 512 octets fatter than another, and the analyst did what analysts do: subtracted the difference, divided by the expected payload, and produced a user action. The capture was flawless. The inference was fiction.
The sender had been rounding TLS 1.3 records up to a block boundary. During quiet moments, a second component shipped Application Data records with nothing inside them at all. Both were genuine, authenticated TLS output. Neither made every observable byte part of an application message.
The failure was not poor packet capture. It was an authority error: network evidence was made to speak for endpoint semantics it could not see. TLS 1.3 protects application content, one inner content-type octet and trailing zero padding as a single blob; the sender chooses the padding, the receiver validates and strips it. Padding changes representation, not meaning — and a larger record is not proof of a larger message.
The arithmetic that crossed a layer it never met
The gap was plausible only if the sender used a stable one-to-one mapping between application bytes and protected-record length. It did not. The service had enabled block padding for Application Data: a callback inspected each plaintext length and added enough zero bytes to reach the next configured boundary. Idle intervals produced padding-only Application Data records. The observer saw two sizes and assumed one meaning.
Where the content actually ends
TLS 1.3 forms TLSInnerPlaintext from three parts: content, a non-zero ContentType octet and a trailing run of zero bytes. The whole encoding goes into record protection, and the outer record type is the opaque value for Application Data — so an observer cannot recover the inner type by reading the header.
After successful AEAD decryption, the receiver scans backward through the returned cleartext. Zero octets are padding. The first non-zero octet is the inner content type. Everything before it is content. If the receiver finds no non-zero octet, it terminates the connection with unexpected_message.
That scan draws a precise boundary at the endpoint, and only there. The application receives content after padding is removed. Padding cannot add a method, a credential, a command or a permission. It consumes protected-record space and network resources, but it carries no application instruction merely because it was authenticated alongside the content.
Cover traffic has a narrow grammar
TLS 1.3 permits Application Data with zero-length inner content, so a sender can conjure a plausibly sized protected record during a period with no application bytes. That makes the simple distinction between activity and silence a little less reliable for an observer.
The permission is content-type specific. An implementation must not send an empty Handshake or Alert message padded into a nonempty record — those protocol messages have their own grammar and effects. The receiver must reject forbidden empty forms rather than treating padding as a licence to invent a message.
Cover traffic is also not a privacy certificate. A peer response, a processing delay, a burst pattern or a connection close may still separate real work from padding. A record with no application content can shift the observed distribution; it cannot guarantee the distribution is uninformative.
The record budget does not negotiate
Padding does not expand the TLS record budget. The complete TLSInnerPlaintext — content, inner type and padding — must stay within the protocol maximum. When peers negotiate record_size_limit, the smaller received limit applies to that complete plaintext as well.
This matters to policy design. A request for 1,024 padding bytes is not an unconditional order; the available space depends on the current content and the negotiated limit. OpenSSL caps padding rather than letting the record exceed the maximum, and an implementation may fragment content differently before applying padding.
A wire-length comparison without the negotiated limit and the fragmentation decision is incomplete. The same application message can become several records, one record, a padded record or a record capped below the requested boundary. The outcome belongs to running state, not to the padding policy's name.
A mechanism is not a policy
The current TLS 1.3 specification supplies the mechanism and deliberately leaves padding selection outside its scope. It prescribes no universal block size, probability distribution or cover-traffic schedule. Applications may sometimes be better placed to pad their own data, because they know which fields and message boundaries are sensitive.
OpenSSL exposes the division directly. Its default is no record padding. Operators can set block padding or install a callback invoked for each TLS 1.3 record before encryption. Configuration can use one block size for Application Data and another for Handshake and Alert messages. A callback can also block kernel TLS on that connection.
GnuTLS exposes per-send padding and lets applications ask whether length hiding is available. These APIs prove a control surface exists. They do not prove a particular process enabled it, which policy ran, or how many bytes were applied.
Constant-time removal does not make the application constant-time
Padding is encrypted, but its removal can still affect processing time. GnuTLS offers GNUTLS_SAFE_PADDING_CHECK to reduce leakage from pad-length-dependent processing, and states that the option carries a performance cost.
The boundary continues above the library. After padding is removed, the application may parse, allocate, query storage or generate a response according to the real content. Those data-dependent actions can expose timing even if TLS record processing is constant-time.
The TLS specification therefore treats traffic analysis as an open-system problem. Length padding can make one signal coarser. A fully constant-time endpoint would require cooperation from the higher-level protocol and the application, while robust cover traffic adds delay and volume. "Padding enabled" is not a complete privacy property.
Composition decides where to pad
Application profiles use the mechanism for different purposes. EAP-TLS 1.3 recommends record padding to reduce leakage from certificate sizes. ECH separately pads the encoded inner ClientHello and identifies later encrypted handshake messages whose sensitive fields may need TLS record padding. The target and layer are explicit in both cases.
HTTP/3 warns that application frames, reserved frames and transport padding have different granularity, loss behavior and control. QUIC uses TLS handshake messages but does not carry ordinary TLS records on the wire, so a TLS record-padding control cannot be projected automatically onto QUIC packet padding.
The contrast turns stark with TLS integrity-only cipher suites. They can preserve the record structure and its integrity, but padding does not obscure plaintext size when confidentiality is absent. The privacy claim depends on encryption, policy and surrounding behavior — not on zero bytes alone.
What an observer may honestly claim
A passive capture may reliably record endpoints, direction, time, ciphertext length, packetization and retransmission. With protocol context, it may also identify connection phases. It cannot directly observe the decrypted inner type, content length, pad length or application meaning.
The safe claim is bounded: "The endpoint emitted a protected record of N octets at time T." An endpoint trace can extend it: "The process supplied C content octets, selected policy P version V, applied Z zero bytes, produced inner length I and ciphertext length N under limit L."
Only the joined record supports a causal account. If policy provenance is missing, an investigator may compare length distributions and form a hypothesis — but should not promote the difference between two ciphertexts into a user action, an object size or a command.
Evidence that can survive an incident
Record connection identity, direction and sequence; TLS version and protection mode; inner content type; content length before padding; requested and applied pad length; final inner and ciphertext lengths; negotiated record limit; fragmentation; library version; kernel-TLS state; and padding-policy revision.
Measure bandwidth, latency and CPU costs beside the privacy target. Track size buckets, timing buckets, response correlation and cover-traffic ratio rather than reporting one aggregate byte overhead. Separate Handshake, Alert and Application Data policy.
Retain negative evidence. Test a cleartext containing only zeros, forbidden empty Handshake and Alert messages, oversized padding requests and records beyond the negotiated limit. Verify the exact alert or local refusal. Then disable the policy and prove that its length distribution and callback activity disappear.
The most important field is the one the packet capture cannot supply: application-content length before padding. Without it, observable length remains network evidence — never application authority. The record was longer. The message was not. The number that got promoted to truth was never entitled to the job.
Sources
- https://www.rfc-editor.org/rfc/rfc9846.html
- https://www.rfc-editor.org/rfc/rfc8449.html
- https://www.rfc-editor.org/rfc/rfc9150.html
- https://www.rfc-editor.org/rfc/rfc9190.html
- https://www.rfc-editor.org/rfc/rfc9114.html
- https://www.rfc-editor.org/rfc/rfc9849.html
- https://www.rfc-editor.org/rfc/rfc9001.html
- https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml
- https://docs.openssl.org/4.0/man3/SSL_CTX_set_record_padding_callback/
- https://docs.openssl.org/master/man3/SSL_CONF_cmd/
- https://github.com/openssl/openssl/blob/master/ssl/record/methods/tls13_meth.c
- https://www.gnutls.org/manual/html_node/On-Record-Padding.html
- https://gitlab.com/gnutls/gnutls/blob/master/lib/includes/gnutls/gnutls.h.in
- https://heng.lu/running-code-primary-the-patch-needed-to-preserve-the-internet-original-design/
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






