Constant-Time Analysis: ppad-poly1305
- vestigia
- no secret-dependent branch or memory access found, in 2 traced executions (aarch64, x86_64); 13 distinct instructions outside any data-independent-timing contract were executed on secret data
- censor
- 8 of 8 tests passed (aarch64-linux, x86_64-linux)
executions
| execution | verdict | aarch64 | x86_64 | ||
|---|---|---|---|---|---|
| vestigia | censor | vestigia | censor | ||
| Crypto.MAC.Poly1305.mac
MACs a message under the secret one-time key
|
✓ no leak found | ✓ | ✓ | ✓ | ✓ |
| Crypto.MAC.Poly1305.(==)
Compares two tags for equality
|
✓ no leak found | ✓ | ✓† | ✓ | ✓† |
✓ no leak found✗ leak? inconclusive· not run† qualified: see the card
by execution
Crypto.MAC.Poly1305.mac
✓ no leak of one-time key found| contract | vestigia | censor | |
|---|---|---|---|
|
aarch64
aarch64-linux
|
arm-dit
|
✓ 13 lines outside any DIT contract | ✓ instructions ×3 |
|
x86_64
x86_64-linux
|
intel-doitm
|
✓ no line depended on the secret | ✓ instructions ×3 |
inputs
| one-time key | 32 bytes, pseudorandom |
| messages | fixed: empty, 1, 15, 16, 17, 31, 32, 33, 64, 100, 245, and 320 bytes |
outside any DIT contract · 13 lines ran outside any DIT contract, on secret-derived operands
poly1305_mac_nativefmov s31, w4operand
9624: fmov s31, w4 operand (diff)
poly1305_mac_nativefmov w1, s31operand
970c: fmov w1, s31 operand (diff)
poly1305_mac_nativefmov s31, w5operand
99c4: fmov s31, w5 operand (diff)
poly1305_mac_nativefmov s26, w3operand
9a08: fmov s26, w3 operand (diff)
poly1305_mac_nativefmov s27, w0operand
9a48: fmov s27, w0 operand (diff)
poly1305_mac_nativefmov s28, w10operand
9a84: fmov s28, w10 operand (diff)
poly1305_mac_nativefmov x5, d29operand
9b9c: fmov x5, d29 operand (diff)
poly1305_mac_nativefmov x0, d29operand
9bc4: fmov x0, d29 operand (diff)
poly1305_mac_nativefmov x0, d30operand
9be4: fmov x0, d30 operand (diff)
poly1305_mac_nativefmov x0, d30operand
9bf4: fmov x0, d30 operand (diff)
poly1305_mac_nativefmov x0, d31operand
9c04: fmov x0, d31 operand (diff)
poly1305_mac_nativefmov d31, x0operand
9c3c: fmov d31, x0 operand (diff)
poly1305_mac_nativefmov d30, x5operand
9c40: fmov d30, x5 operand (diff)
test cases
| Poly1305.mac (245 B) | key fixed vs random over a fixed 245 B message (fifteen 16-byte blocks and a 5-byte tail), the key copied per draw in both classes |
| Poly1305.mac (320 B) | key fixed vs random over a fixed 320 B message (twenty blocks), through the shipped dispatch: the 4-way NEON path on aarch64, the 4-way AVX2 path on x86_64 |
| Poly1305.mac (k1 vs k2, 320 B) | two keys drawn once at setup, class A under one and class B under the other, over one fixed 320 B message, both copied from a pinned source |
| host | meter | result | p | effect (mean/pair) | jitter | clip scale | clipped |
|---|---|---|---|---|---|---|---|
| Poly1305.mac (245 B) | |||||||
| aarch64-linux | instructions | ✓ | 1.000 | [-56, 19] instr | 0.0% | 354 instr | 2/50000 |
| x86_64-linux | instructions | ✓ | 0.774 | [-38, 13] instr | 0.0% | 238 instr | 4/50000 |
| Poly1305.mac (320 B) | |||||||
| aarch64-linux | instructions | ✓ | 0.705 | [-56, 19] instr | 0.0% | 354 instr | 18/50000 |
| x86_64-linux | instructions | ✓ | 0.491 | [-13, 38] instr | 0.0% | 236 instr | 17/50000 |
| Poly1305.mac (k1 vs k2, 320 B) | |||||||
| aarch64-linux | instructions | ✓ | 0.476 | [-47, 16] instr | 0.0% | 294 instr | 31/50000 |
| x86_64-linux | instructions | ✓ | 0.720 | [-38, 13] instr | 0.0% | 236 instr | 34/50000 |
instructions
instructions
instructions
instructions
instructions
instructions
Crypto.MAC.Poly1305.(==)
✓ no leak of tag bytes or mismatch position found| contract | vestigia | censor | |
|---|---|---|---|
|
aarch64
aarch64-linux
|
arm-dit
|
✓ no line depended on the secret | ✓ instructions† |
|
x86_64
x86_64-linux
|
intel-doitm
|
✓ no line depended on the secret | ✓ instructions† |
inputs
| tag | 16 bytes, pseudorandom |
| candidate | 16 bytes, fixed |
test cases
| MAC.eq (tag mismatch) | a fresh tag compared against a copy differing in one byte: byte 0 in class A, byte 15 in class B (opposite 64-bit lanes) |
| host | meter | result | p | effect (mean/pair) | jitter | clip scale | clipped |
|---|---|---|---|---|---|---|---|
| MAC.eq (tag mismatch) | |||||||
| aarch64-linux | instructions | ✓ † | 0.607 | [-0.27, 0.27] instr | 0.0% | 1.00 instr | 3480/50000 |
| x86_64-linux | instructions | ✓ † | 0.010 | [-0.27, 0.16] instr | 0.0% | 1.00 instr | 6070/50000 |
instructions
instructions
appendix
method
This analysis assumes an adversary who can call the analysed functions any number of times, on public inputs of its choosing, and observe their execution at the architectural level, i.e.
- which instructions run, and so which branches are taken and how many instructions retire;
- which memory addresses are accessed, e.g. through a shared cache; and
- how long each instruction takes.
Under the ISA's data-independent-timing (DIT) contract, an instruction it covers takes a time independent of its data, so a clock adds no additional information there. For one it does not cover, the analysis takes the instruction's operands as a conservative stand-in for its time: where they vary with the secret, the property may fail, but the analysis cannot show that it does.
For any analysed function, the security property of concern is thus that its execution, as observed by the adversary, is constant with respect to its declared secrets. Or, put somewhat more formally: for a function f, with secret values s0, s1, and public input p, the adversary's observation O of its execution is identically distributed under (s0, p) and (s1, p), up to renaming of base pointers and stack addresses:
O(f, s0, p) ~ O(f, s1, p)
Microarchitectural concerns (including whether the mode the contract requires is set), physical concerns (e.g. power and electromagnetic emanation), and speculative execution concerns are considered out of scope.
The above security property is assumed, and then scrutinized in two ways:
vestigia v0.2.0 performs both taint and differential execution trace analyses. The former maps every branch and address computed from declared secrets on the path one secret takes through the function, and the latter compares traces, executed under emulation, that vary only in declared secrets, against a second run of one secret as a control. Any difference the control doesn't share directly negates the property.
censor v0.6.0 runs the function natively on many paired inputs, one class with the declared secrets fixed and the other drawing them fresh, and tests whether the number of instructions retired differs between the classes. A rejection whose controls pass is evidence that the security property doesn't hold.
The analysis is limited primarily by reachability, i.e. whether the variation in inputs yields satisfactory exploration of the trace space, or whether taint propagates faithfully. The analysis can thus falsify the assumed security property by finding a witness, but it cannot prove it.
Of note, an instruction outside the ISA's contract that runs on operands that vary with the secret is not a witness, as whether its time follows its operands is a microarchitectural concern, deemed out of scope. A division is taken to leak its operands, its latency being documented to depend on them.
A line is the set of instructions that one source line of one function compiled to, and is the unit by which the report reads a trace. A line varied if, between runs that differ only in the declared secrets, one of its branches had outcomes that differed in proportion or order, or one of its memory accesses had different addresses. An instruction outside the ISA's contract whose operands varied with the secret is read by what is known of its timing: a division, whose time is documented to depend on its operands, is a leak; any other leaves its line outside any DIT contract. Each line shown falls into one of three classes:
- leak: the line varied, or a division there ran on operands that varied, and it is a witness against the security property.
- outside any DIT contract: some other instruction outside the ISA's contract ran there on operands that varied with the secret. It is not a witness, but it is not cleared either; the contract says nothing about the instruction's time, so a finding of no leak holds everywhere but there.
- invariant: the taint analysis finds that the secret reaches the line, but no run varied there. It is not a witness, though a variation the compared secrets did not trigger could still hide there.
The header gives the number of distinct secret values the differential runs compared, for each execution on each system, beside a repeated run of one of them as the control: pseudorandom valid secrets, sampled deterministically from a fixed seed. What an execution's traces ran on, its secrets' domain and any input held fixed, is listed under its vestigia lane. Rare cases may thus remain undetected. Each execution's evidence table gives, per ISA, the contract its runs were recorded under.
A line opens onto its assembly, with each instruction the secret reached marked by what observed it: the analysis, what it saw (a branch, a memory address, a system call, or an operand), and how often. Under the differential runs that is how many times the instruction ran; under taint, how many times it ran on data computed from the secret. Each marked instruction opens onto its stack, and each frame onto the source around it. The assembly is the build's own disassembly, located by the digest of the object each run executed, and the source comes from the same build's line tables, so the instruction shown is the one that ran.
Each test case is one hypothesis about an execution: which declared secrets one class of inputs fixes and the other draws fresh, with any public inputs drawn alike in both. The cases are listed under each execution's censor lane. A case times the two classes on paired inputs, in random order, one pair at a time; batch is how many calls each reading spans. Under the instructions meter a reading is the number of instructions the function retired, which its code and inputs alone determine, so no host's noise enters it, and jitter, a call's interquartile range over its median, is near zero.
The test is sequential and anytime-valid. Evidence against the hypothesis of no difference accumulates pair by pair, as the log e-value plotted over pairs, and the case rejects if it crosses log(1/α). The p shown is anytime-valid too, so when the run stopped does not inflate it. Each pair's difference is clipped at a scale c (the clip scale) set during warmup, so a rare extreme reading can neither force nor mask a rejection; clipped counts the pairs that reached it. The effect is the anytime-valid confidence interval for the clipped mean difference per pair, plotted as a band narrowing over pairs; one that straddles zero is consistent with no difference.
A rejection counts only where censor's controls, rerun on it, pass: A/A and B/B runs, each class against itself, which can implicate the harness, though not exonerate it. Its driver names what the evidence rested on: a shift in the mean, an asymmetry, rare outliers, a difference in spread, or several at once. A pass means no evidence was found within the budget of pairs, on that host and meter, and is qualified (†) where censor found the evidence weak: high clipping, where many pairs reached the clip scale, or low power, where the effect interval stayed wide against it. The provenance's run totals give each run's family-wise α: a bound on the chance of any false rejection among its cases.
measure v0.6.10 checks the evidence before rendering it: every function's bindings to its cases must resolve, the censor runs must share one configuration, with one run per ISA and meter, the verdict must be the one the policy gate and its signed components imply, and each component must agree with the cells where both read the same evidence. Nothing quantitative is recomputed.
provenance
- target
- ppad-poly1305 0.4.8 (b26ef09bcac4bd1860edbe228637a57aa0fa2b40)
- source
- https://git.ppad.tech/poly1305
- seed
- 0x5eed5eed5eed5eed
- censor config
- alpha=1.0e-6, budget=50000, warmup=500, batch=per-case
- aarch64-linux · instructions
- Cortex-A72 (4 cores) · linux 6.18.34 · 2026-10-31T20:00:16Z
- x86_64-linux · instructions
- AMD EPYC 7713 64-Core Processor (6 cores) · linux 6.18.57 · 2026-10-31T20:00:38Z
- aarch64-linux · instructions
- 4 cases · 200000 pairs · 0 reject · α=1.0e-6 · family α=4.0e-6
- x86_64-linux · instructions
- 4 cases · 200000 pairs · 0 reject · α=1.0e-6 · family α=4.0e-6
journal
plan 199917be9db2 · 2026-10-26 08:06–08:33 UTC · re-baselined by 0d449f75b06e
| 2026-10-26 UTC | ||
| 08:06:17 | plan | 2 cells · 4 runs · plan 199917be9db2 |
| 08:19:18 | build | aarch64-linux/ghc-9.10.3/llvm/O2 — 7s · store gh189ybl |
| 08:19:25 | build | x86_64-linux/ghc-9.10.3/llvm/O2 — 9s · store kk1af30f |
| 08:19:34 | build | censor/poly1305-hw/aarch64-linux/cycles+wall — 4s · store nwxdh47f |
| 08:19:38 | build | censor/poly1305-hw/aarch64-linux/instructions — 4s · store 26s3jdr2 |
| 08:19:42 | build | censor/poly1305-hw/x86_64-linux/cycles+wall — 9s · store zbrln19s |
| 08:19:51 | build | censor/poly1305-hw/x86_64-linux/instructions — 9s · store 6g8jk8g5 |
| 08:20:00 | vestigia | eq/aarch64-linux/diff — 1m34s · store 02y85pz1 |
| 08:21:34 | vestigia | eq/aarch64-linux/taint — 1m41s · store jay2yvql |
| 08:23:15 | vestigia | eq/x86_64-linux/diff — 52s · store a4l5w1hd |
| 08:24:07 | vestigia | eq/x86_64-linux/taint — 47s · store 0l7h491k |
| 08:24:54 | vestigia | mac/aarch64-linux/diff — 1m40s · store d3jyf17n |
| 08:26:34 | vestigia | mac/aarch64-linux/taint — 1m45s · store bhd25mxp |
| 08:28:19 | vestigia | mac/x86_64-linux/diff — 57s · store 89431lcc |
| 08:29:16 | vestigia | mac/x86_64-linux/taint — 47s · store 0vh8gmvm |
| 08:30:03 | censor | poly1305-hw/aarch64-linux/cycles+wall — 25s · observed · sealed cd65976b338e |
| 08:30:28 | censor | poly1305-hw/aarch64-linux/instructions — 12s · clear · sealed e65956303b82 |
| 08:30:40 | censor | poly1305-hw/x86_64-linux/cycles+wall — 26s · clear · sealed 1a2f5121d2dd |
| 08:31:06 | censor | poly1305-hw/x86_64-linux/instructions — 25s · clear · sealed 703f41a77030 |
| 08:33:09 | decisions | 4 decisions signed · ledger 798cae6258ad |
| 08:33:09 | gate | pass — 0 sites · 0 violations |
| 08:33:09 | bundle | gate pass — 0 sites · 0 violations |
plan 0d449f75b06e · 2026-10-26 08:46–08:50 UTC · re-baselined by 4ed5e912f4ae
| 2026-10-26 UTC | ||
| 08:46:45 | plan | 2 cells · 3 runs · plan 0d449f75b06e · re-baselined from 199917be9db2 |
| 08:48:34 | build | aarch64-linux/ghc-9.10.3/llvm/O2 — 4s · store kaxwxdqc |
| 08:48:38 | build | x86_64-linux/ghc-9.10.3/llvm/O2 — 9s · store xnmfqn8i |
| 08:48:47 | build | censor/poly1305-hw/x86_64-linux/cycles+wall — 8s · store kqw4sa5b |
| 08:48:55 | build | censor/poly1305-hw/x86_64-linux/instructions — 9s · store ss7zc5rc |
| 08:49:04 | build | censor/poly1305-instructions/aarch64-linux/instructions — 4s · store 54idyrmg |
| 08:49:08 | vestigia | eq/aarch64-linux/diff — 4s · store 4jlbmn1x |
| 08:49:12 | vestigia | eq/aarch64-linux/taint — 4s · store 293rb5fn |
| 08:49:16 | vestigia | eq/x86_64-linux/diff — 9s · store 455bqsjq |
| 08:49:25 | vestigia | eq/x86_64-linux/taint — 9s · store p5pdv63n |
| 08:49:34 | vestigia | mac/aarch64-linux/diff — 4s · store 94agks1k |
| 08:49:38 | vestigia | mac/aarch64-linux/taint — 4s · store lhin0a0g |
| 08:49:42 | vestigia | mac/x86_64-linux/diff — 9s · store mf6rwkfv |
| 08:49:51 | vestigia | mac/x86_64-linux/taint — 9s · store l1jd3d1d |
| 08:50:00 | censor | poly1305-instructions/aarch64-linux/instructions — 11s · clear · sealed 9c798a2ea3a0 |
| 08:50:12 | decisions | 2 decisions signed · ledger 7e569795e4a5 |
| 08:50:12 | gate | pass — 0 sites · 0 violations |
| 08:50:12 | bundle | gate pass — 0 sites · 0 violations |
plan 4ed5e912f4ae · 2026-10-31 19:49–20:01 UTC
| 2026-10-31 UTC | ||
| 19:49:03 | plan | 2 cells · 2 runs · plan 4ed5e912f4ae · re-baselined from 0d449f75b06e |
| 19:49:03 | build | aarch64-linux/ghc-9.10.3/llvm/O2 — 4s · store hb5mqdzq |
| 19:49:07 | build | x86_64-linux/ghc-9.10.3/llvm/O2 — 12s · store vfrlb705 |
| 19:49:19 | build | censor/poly1305-instructions/aarch64-linux/instructions — 19s · store 643gl0y8 |
| 19:49:38 | build | censor/poly1305-instructions/x86_64-linux/instructions — 25s · store kjfsmdmq |
| 19:50:03 | vestigia | eq/aarch64-linux/diff/a72 — 1m32s · store h3254ns5 |
| 19:51:35 | vestigia | eq/aarch64-linux/taint — 1m41s · store ar3rpjgr |
| 19:53:16 | vestigia | eq/x86_64-linux/diff/zen3 — 57s · store s00p677a |
| 19:54:13 | vestigia | eq/x86_64-linux/taint — 46s · store 02vkchsb |
| 19:54:59 | vestigia | mac/aarch64-linux/diff/a72 — 1m42s · store 7lq24xba |
| 19:56:41 | vestigia | mac/aarch64-linux/taint — 1m46s · store 64dk8b90 |
| 19:58:27 | vestigia | mac/x86_64-linux/diff/zen3 — 57s · store 5j641c9l |
| 19:59:24 | vestigia | mac/x86_64-linux/taint — 47s · store dzib0xjh |
| 20:00:11 | censor | poly1305-instructions/aarch64-linux/instructions — 13s · clear · sealed d18b8bdf22ee |
| 20:00:24 | censor | poly1305-instructions/x86_64-linux/instructions — 26s · clear · sealed a565a7303e90 |
| 20:00:50 | vestigia | eq/aarch64-linux/diff/a72 — 2s · store h3254ns5 |
| 20:00:52 | vestigia | eq/aarch64-linux/taint — 2s · store ar3rpjgr |
| 20:00:54 | vestigia | eq/x86_64-linux/diff/zen3 — 2s · store s00p677a |
| 20:00:56 | vestigia | eq/x86_64-linux/taint — 2s · store 02vkchsb |
| 20:00:58 | vestigia | mac/aarch64-linux/diff/a72 — 2s · store 7lq24xba |
| 20:01:00 | vestigia | mac/aarch64-linux/taint — 1s · store 64dk8b90 |
| 20:01:01 | vestigia | mac/x86_64-linux/diff/zen3 — 2s · store 5j641c9l |
| 20:01:03 | vestigia | mac/x86_64-linux/taint — 2s · store dzib0xjh |
| 20:01:05 | decisions | 4 decisions signed · ledger 99aa68df3e88 |
| 20:01:05 | gate | pass — 0 sites · 0 violations |
| 20:01:05 | bundle | gate pass — 0 sites · 0 violations |