Fingerprinting Post-Quantum Authentication from Handshake Byte Curves

Post-quantum cryptography makes keys, certificates and signatures far larger. A Kyber public key is up to 49 times the size of an elliptic-curve key, and hash-based signatures routinely exceed 8,000 bytes. Operators planning a migration need to know which post-quantum schemes their networks already carry. The only longitudinal measurement in this literature, a Zeek-based monitor on a 400 Gbps research border link (PQC Network Instrument), counts post-quantum adoption by parsing cleartext protocol fields. That works for SSH key exchange names and for the key-exchange group in a TLS 1.3 hello. It cannot see which signature scheme or certificate chain a TLS 1.3 server uses, because those messages are encrypted. It sees nothing at all inside VPN tunnels or under encrypted client hello. Server authentication is the part of the migration where the payload overhead is largest, and it is also the part passive parsing cannot see.

This note proposes to treat that overhead as the measurement signal itself. The bytes a handshake carries in each direction are a fingerprint of its cryptographic configuration. The difficulty is that network paths distort how those bytes arrive over time: round-trip delays, small receive windows that stall the sender, fragmentation, and middleboxes that re-segment packets. We compare handshakes with dynamic time warping, a dynamic-programming alignment that lets two sequences stretch and compress in time before comparing them. We apply it to each direction's cumulative-byte curve, so that stalls and re-segmentation are absorbed and only the stepwise byte structure remains. We then embed the resulting trace distances in hyperbolic space, a geometry whose volume grows exponentially with radius like a tree. The goal is to place a handshake under the right branch of a configuration taxonomy (signature family, then parameter set, then hybrid versus pure, then chain depth), including configurations never seen in training. New parameter sets and hybrid combinations appear constantly, so a measurement tool must be able to say "lattice signature, unknown parameter set" instead of forcing a wrong leaf label.

Core Claim

Our claim has two parts, and they can fail independently. First, alignment that is directional, scaled by round-trip time, and computed on cumulative-byte curves will identify post-quantum authentication configurations from encrypted handshakes. It will stay accurate when the test path differs from the training path in latency, loss and receive-window size. Rigid features and standard traffic transformers will not stay accurate under that shift. Second, embedding these alignment distances against the configuration taxonomy in low-dimensional hyperbolic space will assign held-out configurations to their correct ancestor more often than a Euclidean embedding of the same distances at equal dimension. We regard the second part as the more speculative one. The taxonomy is shallow, with only dozens to a few hundred leaves, so the crowding argument for hyperbolic space may not bite. The experiments are designed so that a negative result on it still leaves the first part standing.

Research Program

Representation. We represent each handshake as two monotone curves, cumulative bytes sent by the client and by the server, sampled at packet events. Inter-arrival times are normalized by the round-trip time estimated from the TCP or QUIC opening exchange.

Alignment. The local cost at an aligned pair of events is the difference in cumulative bytes per direction. The dynamic-programming recursion is the standard one, with two changes borrowed from Dynamic Status Warping in AID. AID enforced a directed, round-trip-time-based propagation window so that a callee could only influence a caller at the same or later time, and showed this beats undirected warping and Pearson, Spearman and Kendall correlation on cloud telemetry. AID worked at one-minute aggregation. We move that idea to sub-second packet timing. Server bytes may only align to client positions that causally precede them, and the warping band is scaled by the measured round-trip time.

Why cumulative curves. A 10 KB server flight squeezed through a 2 KB receive window, the bottleneck identified by ExpressPQDelivery on Cortex-M4 devices, looks like five small flights in packet space. It is a single staircase with plateaus in byte space, and warping collapses the plateaus. Fragmentation and re-segmentation change packet counts but not cumulative bytes. We will also test the shape-descriptor local cost of shapeDTW as a variant.

Embedding. For the taxonomy layer we learn one prototype per taxonomy node in the Lorentz model of hyperbolic space. We choose the Lorentz model because it avoids the boundary instabilities of the Poincaré ball. We follow the entailment-cone construction of Hyperbolic Prototypical Entailment Cones, so that a parent's cone contains its children. We add the hierarchical margin of Xu et al., which that paper used to keep fine classes from collapsing under coarse labels. A trace is embedded by a small encoder trained so that hyperbolic distances preserve the ranking of warping distances, in the spirit of Poincaré Embeddings. The same encoder must also satisfy the cone constraints. At test time a trace is assigned to the deepest node whose cone contains it, so an unfamiliar configuration should stop at an intermediate depth.

We deliberately do not build a fully on-manifold recurrent network like HMPTGN. That model tracks evolving graphs, whereas our sequences are short and the alignment is handled explicitly by dynamic programming. We do adopt its lesson that repeated tangent-space mapping distorts geometry, which is why prototypes and distances live on the manifold.

Data. We build a labeled corpus on a controlled testbed. It covers classical, hybrid and pure post-quantum TLS 1.3 and QUIC handshakes with Dilithium, Falcon and SPHINCS+ signatures, including the compressed SPHINCS+ variant of SPHINCS+C, whose 7,856-to-6,304-byte reduction is exactly the kind of near-neighbor leaf the method must separate. We vary chain depth, key-exchange group and client/server roles. Path conditions copy those reported by ExpressPQDelivery: about 40 ms, 77 ms and 180 ms round trips, 5% loss, 1 Mbps links, and a 2 KB client receive window. We also run each handshake both in the clear and inside a VPN tunnel.

Real-traffic validation. For in-the-wild validation we exploit a free label source. The key-exchange group is cleartext in TLS 1.3 hellos, and the key-exchange name is cleartext in SSH, including the sntrup761x25519-sha512 hybrid tracked by the PQC Network Instrument. We hide these fields from the model and check its key-exchange-level predictions against what the parser reads. We will collect such a trace ourselves with Zeek. We cannot assume access to the NCSA data.

Baselines

Naive reference: flight-size lookup. Packets are grouped into directional flights by a gap threshold. Each trace becomes a vector of per-flight byte totals, classified by nearest prototype. This is the "do nothing clever" reference. It will be tuned on the training path condition with the same validation split as our method. On clean, low-latency paths we expect it to be strong, possibly as strong as ours, since PQC signature sizes differ by kilobytes. Beating it means significantly higher macro-F1 on the shifted path conditions, especially the 2 KB receive-window and 5% loss conditions where flight boundaries break.

Engineered features with a strong learner. We give a gradient-boosted classifier a competent hand-built feature set: reconstructed flight sizes with stall merging, direction counts, and byte histograms. This represents what a careful network engineer would build.

Encrypted-traffic transformers. ET-BERT pre-trains a transformer on directional bursts. MIETT uses two-level packet and flow attention and reports outperforming ET-BERT by 8.27% accuracy and 14.66% F1 on CrossPlatform (Android). MIETT is the strongest existing learned method for flow classification, and it is our main learned competitor. We retrain both on our corpus with the same training traces, the same path-condition split and a matched hyperparameter search budget. For reference on their home benchmarks, ET-BERT reports F1 of 97.4% on CSTNET-TLS 1.3 and LAMBERT (LAMBERT) reports 97.41%. There is no reported result found on Lacuna for identifying post-quantum handshake configurations by any method, so the target task has no published number to beat.

Alignment ablations. Our method must beat both transformers on held-out path conditions and on ancestor accuracy for unseen configurations, while staying within a couple of points of them on seen configurations under the training condition. Two ablations isolate the alignment ingredient. The first uses undirected warping with a fixed band. The second uses rigid Euclidean comparison on the same cumulative curves.

Geometry ablation. This ablation isolates the second claim. We train the identical prototype-and-cone objective in Euclidean space at dimensions 2 through 16. Hyperbolic geometry earns its place only if it wins on ancestor accuracy for held-out configurations at low dimension. If the two geometries tie, we drop the hyperbolic component from the claim.

Why not just…?

Why not just read the cleartext fields? For the key-exchange group, parsing is correct and we use it as ground truth rather than competing with it. What parsing cannot do is identify the server's signature scheme and chain in TLS 1.3, or anything at all inside a tunnel or under encrypted client hello. The PQC Network Instrument's own design, deterministic parsing of visible fields, shows that the measurement is currently blind to these cases.

Why not just threshold on handshake size? This is the real threat, and we take it seriously by making it the reference baseline. Our bet is that it fails under path shift and near-neighbor leaves. Receive-window stalls documented by ExpressPQDelivery split flights, and the SPHINCS+ versus SPHINCS+C distinction is a 1.5 KB difference that chain-length variation can mask. If the tuned lookup matches our method across all path conditions, then the alignment contribution is not needed. We would report that, and the paper becomes a measurement study.

Why not just fine-tune MIETT or ET-BERT? They are trained on the experiment's corpus, so this is tested directly. They encode packets with positions and attention, with no built-in tolerance for elastic timing. AID's evidence against timestamp-rigid comparisons on network traces suggests this will hurt under shifted paths, but that evidence comes from minute-level telemetry. The held-out-condition split is what settles the question at packet level.

Why not just a Euclidean embedding or a flat classifier with an "unknown" class? A flat open-set classifier can reject an unseen configuration but cannot say which branch it belongs to. The Euclidean geometry ablation tests whether hyperbolic space is actually required for the hierarchical placement. We expect this alternative may plausibly match us at moderate dimension, and we state in advance that a tie removes the hyperbolic claim.

Proposed Experiments

Experiment 1: transfer across paths. We train under the 40 ms clean condition and test under 77 ms, 180 ms, 5% loss and 2 KB-window conditions, both in the clear and tunneled. The metric is leaf macro-F1 together with the false-positive rate of labeling classical handshakes as post-quantum. The claim fails if the flight-size baseline stays within two F1 points of our method on the hardest condition.

Experiment 2: hierarchical open-set placement. We hold out entire parameter sets and hybrid combinations, such as one Dilithium level and SPHINCS+C. We measure the rate at which each held-out trace stops at its correct parent, against the rate at which it is forced into a wrong sibling. Hyperbolic and Euclidean embeddings are compared at matched dimension and seeds, with confidence intervals over five seeds.

Experiment 3: real-traffic check. On our own Zeek capture, key-exchange-level predictions made with the cleartext fields masked are scored against the parsed truth. This tells us whether testbed-trained fingerprints survive real paths.

Cost. We report wall-clock alignment cost. Handshakes are tens to hundreds of packets, so the quadratic dynamic program should be affordable. If it is not, the round-trip-scaled band limits it.