Constant-Time Analysis: ppad-secp256k1
- vestigia
- no secret-dependent branch or memory access found, in 9 traced executions (aarch64, x86_64); 11 distinct instructions outside any data-independent-timing contract were executed on secret data
- censor
- 18 of 18 tests passed (aarch64-linux, x86_64-linux)
executions
| execution | verdict | aarch64 | x86_64 | ||
|---|---|---|---|---|---|
| vestigia | censor | vestigia | censor | ||
| Crypto.Curve.Secp256k1.mul
Multiplies a fixed public point by the secret scalar
|
✓ no leak found | ✓ | ✓ | ✓ | ✓ |
| Crypto.Curve.Secp256k1.mul_wnaf
Multiplies the generator by the secret scalar, through a precomputed table
|
✓ no leak found | ✓ | ✓ | ✓ | ✓ |
| Crypto.Curve.Secp256k1.derive_pub
Derives the secret key's public key
|
✓ no leak found | ✓ | ✓ | ✓ | ✓ |
| Crypto.Curve.Secp256k1.derive_pub'
Derives the secret key's public key, through a precomputed table
|
✓ no leak found | ✓ | ✓ | ✓ | ✓ |
| Crypto.Curve.Secp256k1.ecdh
Derives the shared secret of the secret key and a fixed public point
|
✓ no leak found | ✓ | ✓ | ✓ | ✓ |
| Crypto.Curve.Secp256k1.sign_schnorr
Signs a fixed message with the secret key (BIP0340)
|
✓ no leak found | ✓ | ✓ | ✓ | ✓ |
| Crypto.Curve.Secp256k1.sign_schnorr'
Signs a fixed message with the secret key (BIP0340), through a precomputed table
|
✓ no leak found | ✓ | ✓ | ✓ | ✓ |
| Crypto.Curve.Secp256k1.sign_ecdsa
Signs a fixed message with the secret key (RFC6979, low s)
|
✓ no leak found | ✓ | ✓ | ✓ | ✓ |
| Crypto.Curve.Secp256k1.sign_ecdsa'
Signs a fixed message with the secret key (RFC6979, low s), through a precomputed table
|
✓ no leak found | ✓ | ✓ | ✓ | ✓ |
✓ no leak found✗ leak? inconclusive· not run
by execution
Crypto.Curve.Secp256k1.mul
✓ no leak of scalar found| contract | vestigia | censor | |
|---|---|---|---|
|
aarch64
aarch64-linux
|
arm-dit
|
✓ 3 lines outside any DIT contract · 1 invariant | ✓ instructions |
|
x86_64
x86_64-linux
|
intel-doitm
|
✓ 2 invariant | ✓ instructions |
inputs
| scalar | pseudorandom in [1, n), n the secp256k1 group order |
| point | fixed, the generator times a fixed public scalar |
outside any DIT contract · 3 lines ran outside any DIT contract, on secret-derived operands
c23iG_info$deffmov x22, d0operandghc_8.ll
41f10: fmov x22, d0 operand (diff)
c23iG_info$deffmov x24, d1operandghc_8.ll
41f18: fmov x24, d1 operand (diff)
c23iG_info$deffmov x26, d2operandghc_8.ll
41f1c: fmov x26, d2 operand (diff)
✓ invariant · 3 lines the secret reaches, where no run varied
c24U1_info$defcbz x14, 42250 <+0x100>branch
421a4: cbz x14, 42250 <+0x100> branch (taint)
c25cs_info$defje 44aad <+0x17d>branch
44985: je 44aad <+0x17d> branch (taint)
c25cs_info$defje 44aad <+0x17d>branch
4499d: je 44aad <+0x17d> branch (taint)
test cases
| Secp.mul (non-generator base) | a valid scalar fixed vs random, times one fixed non-generator point |
| host | meter | result | p | effect (mean/pair) | jitter | clip scale | clipped |
|---|---|---|---|---|---|---|---|
| Secp.mul (non-generator base) | |||||||
| aarch64-linux | instructions | ✓ | 1.000 | [-292, 97] instr | 0.0% | 1828 instr | 5/50000 |
| x86_64-linux | instructions | ✓ | 1.000 | [-238, 79] instr | 0.0% | 1494 instr | 7/50000 |
instructions
instructions
Crypto.Curve.Secp256k1.mul_wnaf
✓ no leak of scalar found| contract | vestigia | censor | |
|---|---|---|---|
|
aarch64
aarch64-linux
|
arm-dit
|
✓ 1 line outside any DIT contract · 1 invariant | ✓ instructions |
|
x86_64
x86_64-linux
|
intel-doitm
|
✓ 2 invariant | ✓ instructions |
inputs
| scalar | pseudorandom in [1, n), n the secp256k1 group order |
| generator context | precomputed once, fixed |
outside any DIT contract · 1 line ran outside any DIT contract, on secret-derived operands
c1PFz_info$deffmov x29, d0operandghc_8.ll
2bdf0: fmov x29, d0 operand (diff)
✓ invariant · 3 lines the secret reaches, where no run varied
c1PNR_info$defje 2c560 <+0x70>branch
2c531: je 2c560 <+0x70> branch (taint)
c1PNR_info$defje 2c560 <+0x70>branch
2c543: je 2c560 <+0x70> branch (taint)
c1Py4_info$defcbz x9, 2b808 <+0x80>branch
2b7e0: cbz x9, 2b808 <+0x80> branch (taint)
test cases
| Secp.mul_wnaf (precomputed generator) | a valid scalar fixed vs random, times the generator through one precomputed context |
| host | meter | result | p | effect (mean/pair) | jitter | clip scale | clipped |
|---|---|---|---|---|---|---|---|
| Secp.mul_wnaf (precomputed generator) | |||||||
| aarch64-linux | instructions | ✓ | 0.755 | [-87, 261] instr | 0.0% | 1638 instr | 7/50000 |
| x86_64-linux | instructions | ✓ | 0.586 | [-38, 13] instr | 0.0% | 238 instr | 5/50000 |
instructions
instructions
Crypto.Curve.Secp256k1.derive_pub
✓ no leak of key found| contract | vestigia | censor | |
|---|---|---|---|
|
aarch64
aarch64-linux
|
arm-dit
|
✓ 3 lines outside any DIT contract · 1 invariant | ✓ instructions |
|
x86_64
x86_64-linux
|
intel-doitm
|
✓ 2 invariant | ✓ instructions |
inputs
| secret key | pseudorandom in [1, n), n the secp256k1 group order |
outside any DIT contract · 3 lines ran outside any DIT contract, on secret-derived operands
c23iG_info$deffmov x22, d0operandghc_8.ll
41f10: fmov x22, d0 operand (diff)
c23iG_info$deffmov x24, d1operandghc_8.ll
41f18: fmov x24, d1 operand (diff)
c23iG_info$deffmov x26, d2operandghc_8.ll
41f1c: fmov x26, d2 operand (diff)
✓ invariant · 3 lines the secret reaches, where no run varied
c24U1_info$defcbz x14, 42250 <+0x100>branch
421a4: cbz x14, 42250 <+0x100> branch (taint)
c25cs_info$defje 44aad <+0x17d>branch
44985: je 44aad <+0x17d> branch (taint)
c25cs_info$defje 44aad <+0x17d>branch
4499d: je 44aad <+0x17d> branch (taint)
test cases
| Secp.derive_pub (generator multiplication) | the secret key fixed vs random |
| host | meter | result | p | effect (mean/pair) | jitter | clip scale | clipped |
|---|---|---|---|---|---|---|---|
| Secp.derive_pub (generator multiplication) | |||||||
| aarch64-linux | instructions | ✓ | 0.373 | [-87, 261] instr | 0.0% | 1638 instr | 8/50000 |
| x86_64-linux | instructions | ✓ | 0.555 | [-238, 79] instr | 0.0% | 1494 instr | 9/50000 |
instructions
instructions
Crypto.Curve.Secp256k1.derive_pub'
✓ no leak of key found| contract | vestigia | censor | |
|---|---|---|---|
|
aarch64
aarch64-linux
|
arm-dit
|
✓ 1 line outside any DIT contract · 1 invariant | ✓ instructions |
|
x86_64
x86_64-linux
|
intel-doitm
|
✓ 2 invariant | ✓ instructions |
inputs
| secret key | pseudorandom in [1, n), n the secp256k1 group order |
| generator context | precomputed once, fixed |
outside any DIT contract · 1 line ran outside any DIT contract, on secret-derived operands
c1PFz_info$deffmov x29, d0operandghc_8.ll
2bdf0: fmov x29, d0 operand (diff)
✓ invariant · 3 lines the secret reaches, where no run varied
c1PNR_info$defje 2c560 <+0x70>branch
2c531: je 2c560 <+0x70> branch (taint)
c1PNR_info$defje 2c560 <+0x70>branch
2c543: je 2c560 <+0x70> branch (taint)
c1Py4_info$defcbz x9, 2b808 <+0x80>branch
2b7e0: cbz x9, 2b808 <+0x80> branch (taint)
test cases
| Secp.derive_pub' (precomputed generator) | as derive_pub, through one precomputed context |
| host | meter | result | p | effect (mean/pair) | jitter | clip scale | clipped |
|---|---|---|---|---|---|---|---|
| Secp.derive_pub' (precomputed generator) | |||||||
| aarch64-linux | instructions | ✓ | 0.755 | [-261, 87] instr | 0.0% | 1638 instr | 3/50000 |
| x86_64-linux | instructions | ✓ | 0.742 | [-13, 38] instr | 0.0% | 238 instr | 4/50000 |
instructions
instructions
Crypto.Curve.Secp256k1.ecdh
✓ no leak of key found| contract | vestigia | censor | |
|---|---|---|---|
|
aarch64
aarch64-linux
|
arm-dit
|
✓ 3 lines outside any DIT contract · 2 invariant | ✓ instructions |
|
x86_64
x86_64-linux
|
intel-doitm
|
✓ 1 line outside any DIT contract · 3 invariant | ✓ instructions |
inputs
| secret key | pseudorandom in [1, n), n the secp256k1 group order |
| peer | fixed, the generator times a fixed public scalar |
outside any DIT contract · 4 lines ran outside any DIT contract, on secret-derived operands
c23iG_info$deffmov x22, d0operandghc_8.ll
41f10: fmov x22, d0 operand (diff)
c23iG_info$deffmov x24, d1operandghc_8.ll
41f18: fmov x24, d1 operand (diff)
c23iG_info$deffmov x26, d2operandghc_8.ll
41f1c: fmov x26, d2 operand (diff)
c2weq_info$defandps 0xc9c3(%rip),%xmm0 # 851b0 <_fini+0x1c>operandghc_8.ll
787e6: andps 0xc9c3(%rip),%xmm0 # 851b0 <_fini+0x1c> operand (diff)
✓ invariant · 5 lines the secret reaches, where no run varied
c24U1_info$defcbz x14, 42250 <+0x100>branch
421a4: cbz x14, 42250 <+0x100> branch (taint)
c25cs_info$defje 44aad <+0x17d>branch
44985: je 44aad <+0x17d> branch (taint)
c25cs_info$defje 44aad <+0x17d>branch
4499d: je 44aad <+0x17d> branch (taint)
c2vUx_info$defb.ne 74b78 <+0x48> // b.anybranch
74b38: b.ne 74b78 <+0x48> // b.any branch (taint)
c2weC_info$defjne 788cc <+0x2c>branch
788a4: jne 788cc <+0x2c> branch (taint)
test cases
| Secp.ecdh (fixed peer) | the secret key fixed vs random against one fixed peer point, built before the timed region |
| host | meter | result | p | effect (mean/pair) | jitter | clip scale | clipped |
|---|---|---|---|---|---|---|---|
| Secp.ecdh (fixed peer) | |||||||
| aarch64-linux | instructions | ✓ | 0.587 | [-303, 101] instr | 0.0% | 1902 instr | 74/50000 |
| x86_64-linux | instructions | ✓ | 0.082 | [-246, 82] instr | 0.0% | 1540 instr | 78/50000 |
instructions
instructions
Crypto.Curve.Secp256k1.sign_schnorr
✓ no leak of key or derived nonce found| contract | vestigia | censor | |
|---|---|---|---|
|
aarch64
aarch64-linux
|
arm-dit
|
✓ 4 lines outside any DIT contract · 2 invariant | ✓ instructions |
|
x86_64
x86_64-linux
|
intel-doitm
|
✓ 2 lines outside any DIT contract · 3 invariant | ✓ instructions |
inputs
| secret key | pseudorandom in [1, n), n the secp256k1 group order |
| message | 32 bytes, fixed |
| auxiliary randomness | 32 bytes, fixed |
outside any DIT contract · 6 lines ran outside any DIT contract, on secret-derived operands
c23iG_info$deffmov x22, d0operandghc_8.ll
41f10: fmov x22, d0 operand (diff)
c23iG_info$deffmov x24, d1operandghc_8.ll
41f18: fmov x24, d1 operand (diff)
c23iG_info$deffmov x26, d2operandghc_8.ll
41f1c: fmov x26, d2 operand (diff)
c2AHW_info$deffmov x25, d0operandghc_8.ll
792dc: fmov x25, d0 operand (diff)
c2Bai_info$defandps 0x6173(%rip),%xmm0 # 851b0 <_fini+0x1c>operandghc_8.ll
7f036: andps 0x6173(%rip),%xmm0 # 851b0 <_fini+0x1c> operand (diff)
c2Bmb_info$defandps 0x4c63(%rip),%xmm0 # 851b0 <_fini+0x1c>operandghc_8.ll
80546: andps 0x4c63(%rip),%xmm0 # 851b0 <_fini+0x1c> operand (diff)
✓ invariant · 5 lines the secret reaches, where no run varied
c24U1_info$defcbz x14, 42250 <+0x100>branch
421a4: cbz x14, 42250 <+0x100> branch (taint)
c25cs_info$defje 44aad <+0x17d>branch
44985: je 44aad <+0x17d> branch (taint)
c25cs_info$defje 44aad <+0x17d>branch
4499d: je 44aad <+0x17d> branch (taint)
c2ATI_info$defb.ne 7a618 <+0x48> // b.anybranch
7a5d8: b.ne 7a618 <+0x48> // b.any branch (taint)
c2BgT_info$defjne 7f285 <+0x35>branch
7f257: jne 7f285 <+0x35> branch (taint)
test cases
| Secp.sign_schnorr (BIP0340) | the secret key fixed vs random over a fixed 32-byte message and auxiliary randomness, so the derived nonce is fixed vs random with it |
| host | meter | result | p | effect (mean/pair) | jitter | clip scale | clipped |
|---|---|---|---|---|---|---|---|
| Secp.sign_schnorr (BIP0340) | |||||||
| aarch64-linux | instructions | ✓ | 0.408 | [-329, 110] instr | 0.0% | 2064 instr | 136/50000 |
| x86_64-linux | instructions | ✓ | 0.692 | [-97, 291] instr | 0.0% | 1824 instr | 138/50000 |
instructions
instructions
Crypto.Curve.Secp256k1.sign_schnorr'
✓ no leak of key or derived nonce found| contract | vestigia | censor | |
|---|---|---|---|
|
aarch64
aarch64-linux
|
arm-dit
|
✓ 2 lines outside any DIT contract · 2 invariant | ✓ instructions |
|
x86_64
x86_64-linux
|
intel-doitm
|
✓ 2 lines outside any DIT contract · 3 invariant | ✓ instructions |
inputs
| secret key | pseudorandom in [1, n), n the secp256k1 group order |
| message | 32 bytes, fixed |
| auxiliary randomness | 32 bytes, fixed |
| generator context | precomputed once, fixed |
outside any DIT contract · 4 lines ran outside any DIT contract, on secret-derived operands
c1PFz_info$deffmov x29, d0operandghc_8.ll
2bdf0: fmov x29, d0 operand (diff)
c2D4S_info$deffmov x18, d0operandghc_8.ll
7c184: fmov x18, d0 operand (diff)
c2DMn_info$defandps 0x12d3(%rip),%xmm0 # 851b0 <_fini+0x1c>operandghc_8.ll
83ed6: andps 0x12d3(%rip),%xmm0 # 851b0 <_fini+0x1c> operand (diff)
c2Dzu_info$defandps 0x27d3(%rip),%xmm0 # 851b0 <_fini+0x1c>operandghc_8.ll
829d6: andps 0x27d3(%rip),%xmm0 # 851b0 <_fini+0x1c> operand (diff)
✓ invariant · 5 lines the secret reaches, where no run varied
c1PNR_info$defje 2c560 <+0x70>branch
2c531: je 2c560 <+0x70> branch (taint)
c1PNR_info$defje 2c560 <+0x70>branch
2c543: je 2c560 <+0x70> branch (taint)
c1Py4_info$defcbz x9, 2b808 <+0x80>branch
2b7e0: cbz x9, 2b808 <+0x80> branch (taint)
c2DG5_info$defjne 82c54 <+0x44>branch
82c29: jne 82c54 <+0x44> branch (taint)
c2DgE_info$defb.ne 7d4a4 <+0x44> // b.anybranch
7d470: b.ne 7d4a4 <+0x44> // b.any branch (taint)
test cases
| Secp.sign_schnorr' (BIP0340) | as sign_schnorr, through one precomputed context |
| host | meter | result | p | effect (mean/pair) | jitter | clip scale | clipped |
|---|---|---|---|---|---|---|---|
| Secp.sign_schnorr' (BIP0340) | |||||||
| aarch64-linux | instructions | ✓ | 0.141 | [-118, 354] instr | 0.0% | 2222 instr | 133/50000 |
| x86_64-linux | instructions | ✓ | 0.520 | [-274, 91] instr | 0.0% | 1718 instr | 135/50000 |
instructions
instructions
Crypto.Curve.Secp256k1.sign_ecdsa
✓ no leak of key or deterministic nonce found| contract | vestigia | censor | |
|---|---|---|---|
|
aarch64
aarch64-linux
|
arm-dit
|
✓ 3 lines outside any DIT contract · 5 invariant | ✓ instructions |
|
x86_64
x86_64-linux
|
intel-doitm
|
✓ 8 invariant | ✓ instructions |
inputs
| secret key | pseudorandom in [1, n), n the secp256k1 group order |
| message | 32 bytes, fixed |
outside any DIT contract · 3 lines ran outside any DIT contract, on secret-derived operands
c23iG_info$deffmov x22, d0operandghc_8.ll
41f10: fmov x22, d0 operand (diff)
c23iG_info$deffmov x24, d1operandghc_8.ll
41f18: fmov x24, d1 operand (diff)
c23iG_info$deffmov x26, d2operandghc_8.ll
41f1c: fmov x26, d2 operand (diff)
✓ invariant · 13 lines the secret reaches, where no run varied
c1L1d_info$defcbz x15, 241a8 <+0x70>branch
24190: cbz x15, 241a8 <+0x70> branch (taint)
c1L85_info$defcbz x17, 29cac <+0x9c>branch
29c60: cbz x17, 29cac <+0x9c> branch (taint)
c1LAH_info$defb.ne 299e4 <+0x1f4> // b.anybranch
299ac: b.ne 299e4 <+0x1f4> // b.any branch (taint)
c1LPG_info$defjne 2a17d <+0x2bd>branch
2a150: jne 2a17d <+0x2bd> branch (taint)
c1Les_info$defb.ne 25078 <+0x1e0> // b.anybranch
2505c: b.ne 25078 <+0x1e0> // b.any branch (taint)
c1Lgc_info$defje 24844 <+0xa4>branch
24810: je 24844 <+0xa4> branch (taint)
c1Lgc_info$defje 24844 <+0xa4>branch
24823: je 24844 <+0xa4> branch (taint)
c1Ln4_info$defje 2a506 <+0xe6>branch
2a48b: je 2a506 <+0xe6> branch (taint)
c1Ln4_info$defje 2a506 <+0xe6>branch
2a49f: je 2a506 <+0xe6> branch (taint)
c1Ltr_info$defjne 25a7e <+0x2ce>branch
25a59: jne 25a7e <+0x2ce> branch (taint)
c24U1_info$defcbz x14, 42250 <+0x100>branch
421a4: cbz x14, 42250 <+0x100> branch (taint)
c25cs_info$defje 44aad <+0x17d>branch
44985: je 44aad <+0x17d> branch (taint)
c25cs_info$defje 44aad <+0x17d>branch
4499d: je 44aad <+0x17d> branch (taint)
test cases
| Secp.sign_ecdsa (RFC6979) | the secret key fixed vs random over a fixed 32-byte message, so the RFC6979 nonce is fixed vs random with it |
| host | meter | result | p | effect (mean/pair) | jitter | clip scale | clipped |
|---|---|---|---|---|---|---|---|
| Secp.sign_ecdsa (RFC6979) | |||||||
| aarch64-linux | instructions | ✓ | 0.176 | [-109, 327] instr | 0.0% | 2052 instr | 110/50000 |
| x86_64-linux | instructions | ✓ | 0.981 | [-92, 276] instr | 0.0% | 1732 instr | 103/50000 |
instructions
instructions
Crypto.Curve.Secp256k1.sign_ecdsa'
✓ no leak of key or deterministic nonce found| contract | vestigia | censor | |
|---|---|---|---|
|
aarch64
aarch64-linux
|
arm-dit
|
✓ 1 line outside any DIT contract · 5 invariant | ✓ instructions |
|
x86_64
x86_64-linux
|
intel-doitm
|
✓ 8 invariant | ✓ instructions |
inputs
| secret key | pseudorandom in [1, n), n the secp256k1 group order |
| message | 32 bytes, fixed |
| generator context | precomputed once, fixed |
outside any DIT contract · 1 line ran outside any DIT contract, on secret-derived operands
c1PFz_info$deffmov x29, d0operandghc_8.ll
2bdf0: fmov x29, d0 operand (diff)
✓ invariant · 13 lines the secret reaches, where no run varied
c1L1d_info$defcbz x15, 241a8 <+0x70>branch
24190: cbz x15, 241a8 <+0x70> branch (taint)
c1Lgc_info$defje 24844 <+0xa4>branch
24810: je 24844 <+0xa4> branch (taint)
c1Lgc_info$defje 24844 <+0xa4>branch
24823: je 24844 <+0xa4> branch (taint)
c1PNR_info$defje 2c560 <+0x70>branch
2c531: je 2c560 <+0x70> branch (taint)
c1PNR_info$defje 2c560 <+0x70>branch
2c543: je 2c560 <+0x70> branch (taint)
c1Py4_info$defcbz x9, 2b808 <+0x80>branch
2b7e0: cbz x9, 2b808 <+0x80> branch (taint)
c1RB7_info$defcbz x17, 323dc <+0x9c>branch
32390: cbz x17, 323dc <+0x9c> branch (taint)
c1RHt_info$defb.ne 2d7e0 <+0x1e0> // b.anybranch
2d7c4: b.ne 2d7e0 <+0x1e0> // b.any branch (taint)
c1RR2_info$defje 33986 <+0xe6>branch
3390b: je 33986 <+0xe6> branch (taint)
c1RR2_info$defje 33986 <+0xe6>branch
3391f: je 33986 <+0xe6> branch (taint)
c1RXo_info$defjne 2ef5e <+0x2ce>branch
2ef39: jne 2ef5e <+0x2ce> branch (taint)
c1S3I_info$defb.ne 32158 <+0x1f0> // b.anybranch
32124: b.ne 32158 <+0x1f0> // b.any branch (taint)
c1SjD_info$defjne 33674 <+0x2d4>branch
3362d: jne 33674 <+0x2d4> branch (taint)
test cases
| Secp.sign_ecdsa' (RFC6979) | as sign_ecdsa, through one precomputed context |
| host | meter | result | p | effect (mean/pair) | jitter | clip scale | clipped |
|---|---|---|---|---|---|---|---|
| Secp.sign_ecdsa' (RFC6979) | |||||||
| aarch64-linux | instructions | ✓ | 0.754 | [-276, 92] instr | 0.0% | 1730 instr | 109/50000 |
| x86_64-linux | instructions | ✓ | 0.442 | [-84, 253] instr | 0.0% | 1586 instr | 105/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-secp256k1 0.5.9 (b3494fafaebc51b991638721a2a5870138e1dc79)
- source
- https://git.ppad.tech/secp256k1
- 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-31T21:24:46Z
- x86_64-linux · instructions
- AMD EPYC 7713 64-Core Processor (6 cores) · linux 6.18.57 · 2026-10-31T21:34:17Z
- aarch64-linux · instructions
- 9 cases · 450000 pairs · 0 reject · α=1.0e-6 · family α=9.0e-6
- x86_64-linux · instructions
- 9 cases · 450000 pairs · 0 reject · α=1.0e-6 · family α=9.0e-6
journal
plan ad92d0408c5f · 2026-10-26 17:12–2026-10-27 03:52 UTC · re-baselined by ea040099fa24
| 2026-10-26 UTC | ||
| 17:12:42 | plan | 2 cells · 3 runs · plan ad92d0408c5f |
| 17:13:02 | build | aarch64-linux/ghc-9.10.3/llvm/O2 — 13m18s · store 5ay04mks |
| 17:26:20 | build | x86_64-linux/ghc-9.10.3/llvm/O2 — 4m54s · store 2qa66zb8 |
| 17:31:14 | build | censor/secp256k1-secret-scalar-hw/x86_64-linux/cycles+wall — 33s · store naw41dk2 |
| 17:31:47 | build | censor/secp256k1-secret-scalar-hw/x86_64-linux/instructions — 11s · store 920liafv |
| 17:31:58 | build | censor/secp256k1-secret-scalar-instructions/aarch64-linux/instructions — 24s · store 22nfj6i7 |
| 17:32:45 | vestigia | derive_pub/aarch64-linux/diff — 2m39s · store ck8b3x2a |
| 17:35:24 | vestigia | derive_pub/aarch64-linux/taint — 1m55s · store xpklf5rn |
| 17:37:19 | vestigia | derive_pub/x86_64-linux/diff — 1m22s · store ljbc7hqf |
| 17:38:41 | vestigia | derive_pub/x86_64-linux/taint — 53s · store n6pqyqg2 |
| 17:39:34 | vestigia | derive_pub_ctx/aarch64-linux/diff — 2m22s · store cadj9d75 |
| 17:41:56 | vestigia | derive_pub_ctx/aarch64-linux/taint — 1m56s · store anq89y6q |
| 17:43:52 | vestigia | derive_pub_ctx/x86_64-linux/diff — 1m6s · store bbm60h42 |
| 17:44:58 | vestigia | derive_pub_ctx/x86_64-linux/taint — 53s · store v423ksp8 |
| 17:45:51 | vestigia | ecdh/aarch64-linux/diff — 2m34s · store 4nbax24g |
| 17:48:25 | vestigia | ecdh/aarch64-linux/taint — 2m · store rjm7krqv |
| 17:50:25 | vestigia | ecdh/x86_64-linux/diff — 1m15s · store 5lmj37ng |
| 17:51:40 | vestigia | ecdh/x86_64-linux/taint — 55s · store 5cdl6yw5 |
| 17:52:35 | vestigia | mul/aarch64-linux/diff — 2m27s · store jqrycncc |
| 17:55:02 | vestigia | mul/aarch64-linux/taint — 1m55s · store 5s190r5w |
| 17:56:57 | vestigia | mul/x86_64-linux/diff — 1m4s · store sg94ngyy |
| 17:58:01 | vestigia | mul/x86_64-linux/taint — 52s · store ilxl0w4i |
| 17:58:53 | vestigia | mul_wnaf/aarch64-linux/diff — 2m26s · store g7xlaf5s |
| 18:01:19 | vestigia | mul_wnaf/aarch64-linux/taint — 1m56s · store fy1x9rfh |
| 18:03:15 | vestigia | mul_wnaf/x86_64-linux/diff — 1m15s · store inrh2b0g |
| 18:04:30 | vestigia | mul_wnaf/x86_64-linux/taint — 53s · store n9i9xg9k |
| 18:05:23 | vestigia | sign_ecdsa/aarch64-linux/diff — 2m48s · store kk9jimhd |
| 18:08:11 | vestigia | sign_ecdsa/aarch64-linux/taint — 2h2m · failed — /nix/store/405khg1imi3x5r4vx8ym2m9cmhhxdmj2-vestigia-trace-vestigia-sign_ecdsa-aarch64-linux-taint error: Cannot build '/nix/store/07g7x0n8hx9vrdcxwmc00d5ln6psgqb7-synthesis-trace.drv'. Reason: 1 dependency failed. Output paths: /nix/store/rh712p85z2h76ch8ivhvqlyvk0iv8g7z-synthesis-trace |
| 20:10:27 | vestigia | sign_ecdsa/x86_64-linux/diff — 6h56m · store j3xjg33r · resumed |
| 2026-10-27 UTC | ||
| 03:03:32 | vestigia | derive_pub/aarch64-linux/diff — 5s · store ck8b3x2a |
| 03:03:37 | vestigia | derive_pub/aarch64-linux/taint — 4s · store xpklf5rn |
| 03:03:41 | vestigia | derive_pub/x86_64-linux/diff — 4s · store ljbc7hqf |
| 03:03:45 | vestigia | derive_pub/x86_64-linux/taint — 4s · store n6pqyqg2 |
| 03:03:49 | vestigia | derive_pub_ctx/aarch64-linux/diff — 3s · store cadj9d75 |
| 03:03:52 | vestigia | derive_pub_ctx/aarch64-linux/taint — 4s · store anq89y6q |
| 03:03:56 | vestigia | derive_pub_ctx/x86_64-linux/diff — 4s · store bbm60h42 |
| 03:04:00 | vestigia | derive_pub_ctx/x86_64-linux/taint — 3s · store v423ksp8 |
| 03:04:03 | vestigia | ecdh/aarch64-linux/diff — 4s · store 4nbax24g |
| 03:04:07 | vestigia | ecdh/aarch64-linux/taint — 4s · store rjm7krqv |
| 03:04:11 | vestigia | ecdh/x86_64-linux/diff — 3s · store 5lmj37ng |
| 03:04:14 | vestigia | ecdh/x86_64-linux/taint — 4s · store 5cdl6yw5 |
| 03:04:18 | vestigia | mul/aarch64-linux/diff — 3s · store jqrycncc |
| 03:04:21 | vestigia | mul/aarch64-linux/taint — 4s · store 5s190r5w |
| 03:04:25 | vestigia | mul/x86_64-linux/diff — 3s · store sg94ngyy |
| 03:04:28 | vestigia | mul/x86_64-linux/taint — 4s · store ilxl0w4i |
| 03:04:32 | vestigia | mul_wnaf/aarch64-linux/diff — 4s · store g7xlaf5s |
| 03:04:36 | vestigia | mul_wnaf/aarch64-linux/taint — 3s · store fy1x9rfh |
| 03:04:39 | vestigia | mul_wnaf/x86_64-linux/diff — 4s · store inrh2b0g |
| 03:04:43 | vestigia | mul_wnaf/x86_64-linux/taint — 4s · store n9i9xg9k |
| 03:04:47 | vestigia | sign_ecdsa/aarch64-linux/diff — 3s · store kk9jimhd |
| 03:04:50 | vestigia | sign_ecdsa/aarch64-linux/taint — 8s · store rh712p85 |
| 03:06:41 | vestigia | sign_ecdsa/x86_64-linux/taint — 1m11s · store whwhxwr2 |
| 03:07:52 | vestigia | sign_ecdsa_ctx/aarch64-linux/diff — 2m58s · store jp1vswkk |
| 03:10:50 | vestigia | sign_ecdsa_ctx/aarch64-linux/taint — 2m32s · store v4za723p |
| 03:13:22 | vestigia | sign_ecdsa_ctx/x86_64-linux/diff — 1m21s · store yynknj76 |
| 03:14:43 | vestigia | sign_ecdsa_ctx/x86_64-linux/taint — 1m10s · store pa8rgfs8 |
| 03:15:53 | vestigia | sign_schnorr/aarch64-linux/diff — 7m23s · store 3dw6rrbi |
| 03:23:16 | vestigia | sign_schnorr/aarch64-linux/taint — 2m18s · store hm97ialm |
| 03:25:34 | vestigia | sign_schnorr/x86_64-linux/diff — 1m16s · store macxbdvx |
| 03:26:50 | vestigia | sign_schnorr/x86_64-linux/taint — 1m1s · store if438ny2 |
| 03:27:51 | vestigia | sign_schnorr_ctx/aarch64-linux/diff — 2m48s · store 8807k9x1 |
| 03:30:39 | vestigia | sign_schnorr_ctx/aarch64-linux/taint — 2m14s · store 5skkyzff |
| 03:32:53 | vestigia | sign_schnorr_ctx/x86_64-linux/diff — 1m16s · store l4qaai83 |
| 03:34:09 | vestigia | sign_schnorr_ctx/x86_64-linux/taint — 1m1s · store 1pcqs8d6 |
| 03:35:10 | censor | secp256k1-secret-scalar-hw/x86_64-linux/cycles+wall — 3m43s · observed · sealed dd8b7a42a953 |
| 03:38:53 | censor | secp256k1-secret-scalar-hw/x86_64-linux/instructions — 3m16s · clear · sealed e44cb390f92e |
| 03:42:09 | censor | secp256k1-secret-scalar-instructions/aarch64-linux/instructions — 9m31s · clear · sealed ba4cc8bde5ab |
| 03:52:31 | decisions | 18 decisions signed · ledger a0adececec19 |
| 03:52:31 | gate | pass — 0 sites · 0 violations |
| 03:52:42 | bundle | gate pass — 0 sites · 0 violations |
plan ea040099fa24 · 2026-10-31 20:19–21:39 UTC
| 2026-10-31 UTC | ||
| 20:19:39 | plan | 2 cells · 2 runs · plan ea040099fa24 · re-baselined from ad92d0408c5f |
| 20:19:39 | build | aarch64-linux/ghc-9.10.3/llvm/O2 — 8s · store 0ic8kcy6 |
| 20:19:47 | build | x86_64-linux/ghc-9.10.3/llvm/O2 — 18s · store nwq4b6ch |
| 20:20:05 | build | censor/secp256k1-secret-scalar-instructions/aarch64-linux/instructions — 23s · store n3f6f1ih |
| 20:20:28 | build | censor/secp256k1-secret-scalar-instructions/x86_64-linux/instructions — 28s · store svcyqw50 |
| 20:20:56 | vestigia | derive_pub/aarch64-linux/diff/a72 — 2m34s · store 3za85jw4 |
| 20:23:30 | vestigia | derive_pub/aarch64-linux/taint — 1m52s · store pvsahn5i |
| 20:25:22 | vestigia | derive_pub/x86_64-linux/diff/zen3 — 1m18s · store brhairsy |
| 20:26:40 | vestigia | derive_pub/x86_64-linux/taint — 52s · store w7c6n5gm |
| 20:27:32 | vestigia | derive_pub_ctx/aarch64-linux/diff/a72 — 2m25s · store sxgjhm95 |
| 20:29:57 | vestigia | derive_pub_ctx/aarch64-linux/taint — 1m56s · store 2vk6x4mr |
| 20:31:53 | vestigia | derive_pub_ctx/x86_64-linux/diff/zen3 — 1m19s · store 5yiwbqww |
| 20:33:12 | vestigia | derive_pub_ctx/x86_64-linux/taint — 51s · store acrz1nv6 |
| 20:34:03 | vestigia | ecdh/aarch64-linux/diff/a72 — 2m40s · store 1sdj7r3m |
| 20:36:43 | vestigia | ecdh/aarch64-linux/taint — 1m59s · store h1gds72r |
| 20:38:42 | vestigia | ecdh/x86_64-linux/diff/zen3 — 1m21s · store fkhwzw2p |
| 20:40:03 | vestigia | ecdh/x86_64-linux/taint — 54s · store bmpmgrd3 |
| 20:40:57 | vestigia | mul/aarch64-linux/diff/a72 — 2m30s · store xnvj5071 |
| 20:43:27 | vestigia | mul/aarch64-linux/taint — 1m56s · store rsf9bkw5 |
| 20:45:23 | vestigia | mul/x86_64-linux/diff/zen3 — 1m5s · store qwrl84cz |
| 20:46:28 | vestigia | mul/x86_64-linux/taint — 52s · store frx24f0v |
| 20:47:20 | vestigia | mul_wnaf/aarch64-linux/diff/a72 — 2m26s · store cwzph23v |
| 20:49:46 | vestigia | mul_wnaf/aarch64-linux/taint — 1m55s · store lv4rv2v0 |
| 20:51:41 | vestigia | mul_wnaf/x86_64-linux/diff/zen3 — 1m7s · store a57fy2xk |
| 20:52:48 | vestigia | mul_wnaf/x86_64-linux/taint — 52s · store km9v7zkk |
| 20:53:40 | vestigia | sign_ecdsa/aarch64-linux/diff/a72 — 3m1s · store dlsz4ivy |
| 20:56:41 | vestigia | sign_ecdsa/aarch64-linux/taint — 2m30s · store nkb924i3 |
| 20:59:11 | vestigia | sign_ecdsa/x86_64-linux/diff/zen3 — 1m19s · store 66bjrcfm |
| 21:00:30 | vestigia | sign_ecdsa/x86_64-linux/taint — 1m9s · store xrha0a9c |
| 21:01:39 | vestigia | sign_ecdsa_ctx/aarch64-linux/diff/a72 — 2m51s · store 6dwvgs2l |
| 21:04:30 | vestigia | sign_ecdsa_ctx/aarch64-linux/taint — 2m31s · store 58d5rsgy |
| 21:07:01 | vestigia | sign_ecdsa_ctx/x86_64-linux/diff/zen3 — 1m27s · store xdp9x9qv |
| 21:08:28 | vestigia | sign_ecdsa_ctx/x86_64-linux/taint — 1m8s · store 7z8j0wvl |
| 21:09:36 | vestigia | sign_schnorr/aarch64-linux/diff/a72 — 2m57s · store h17p64va |
| 21:12:33 | vestigia | sign_schnorr/aarch64-linux/taint — 2m17s · store 3yima3b4 |
| 21:14:50 | vestigia | sign_schnorr/x86_64-linux/diff/zen3 — 1m28s · store d0jg8p7i |
| 21:16:18 | vestigia | sign_schnorr/x86_64-linux/taint — 1m · store zf7k55yb |
| 21:17:18 | vestigia | sign_schnorr_ctx/aarch64-linux/diff/a72 — 2m47s · store pbncqzlr |
| 21:20:05 | vestigia | sign_schnorr_ctx/aarch64-linux/taint — 2m16s · store gfi3sf4l |
| 21:22:21 | vestigia | sign_schnorr_ctx/x86_64-linux/diff/zen3 — 1m20s · store ww7nspb0 |
| 21:23:41 | vestigia | sign_schnorr_ctx/x86_64-linux/taint — 1m1s · store fp3w8zqz |
| 21:24:42 | censor | secp256k1-secret-scalar-instructions/aarch64-linux/instructions — 9m22s · clear · sealed 2575d18ca4b8 |
| 21:34:04 | censor | secp256k1-secret-scalar-instructions/x86_64-linux/instructions — 3m15s · clear · sealed 2790ab300405 |
| 21:37:19 | vestigia | derive_pub/aarch64-linux/diff/a72 — 5s · store 3za85jw4 |
| 21:37:24 | vestigia | derive_pub/aarch64-linux/taint — 3s · store pvsahn5i |
| 21:37:27 | vestigia | derive_pub/x86_64-linux/diff/zen3 — 4s · store brhairsy |
| 21:37:31 | vestigia | derive_pub/x86_64-linux/taint — 4s · store w7c6n5gm |
| 21:37:35 | vestigia | derive_pub_ctx/aarch64-linux/diff/a72 — 3s · store sxgjhm95 |
| 21:37:38 | vestigia | derive_pub_ctx/aarch64-linux/taint — 4s · store 2vk6x4mr |
| 21:37:42 | vestigia | derive_pub_ctx/x86_64-linux/diff/zen3 — 3s · store 5yiwbqww |
| 21:37:45 | vestigia | derive_pub_ctx/x86_64-linux/taint — 4s · store acrz1nv6 |
| 21:37:49 | vestigia | ecdh/aarch64-linux/diff/a72 — 3s · store 1sdj7r3m |
| 21:37:52 | vestigia | ecdh/aarch64-linux/taint — 4s · store h1gds72r |
| 21:37:56 | vestigia | ecdh/x86_64-linux/diff/zen3 — 4s · store fkhwzw2p |
| 21:38:00 | vestigia | ecdh/x86_64-linux/taint — 3s · store bmpmgrd3 |
| 21:38:03 | vestigia | mul/aarch64-linux/diff/a72 — 4s · store xnvj5071 |
| 21:38:07 | vestigia | mul/aarch64-linux/taint — 3s · store rsf9bkw5 |
| 21:38:10 | vestigia | mul/x86_64-linux/diff/zen3 — 4s · store qwrl84cz |
| 21:38:14 | vestigia | mul/x86_64-linux/taint — 4s · store frx24f0v |
| 21:38:18 | vestigia | mul_wnaf/aarch64-linux/diff/a72 — 3s · store cwzph23v |
| 21:38:21 | vestigia | mul_wnaf/aarch64-linux/taint — 4s · store lv4rv2v0 |
| 21:38:25 | vestigia | mul_wnaf/x86_64-linux/diff/zen3 — 3s · store a57fy2xk |
| 21:38:28 | vestigia | mul_wnaf/x86_64-linux/taint — 4s · store km9v7zkk |
| 21:38:32 | vestigia | sign_ecdsa/aarch64-linux/diff/a72 — 3s · store dlsz4ivy |
| 21:38:35 | vestigia | sign_ecdsa/aarch64-linux/taint — 4s · store nkb924i3 |
| 21:38:39 | vestigia | sign_ecdsa/x86_64-linux/diff/zen3 — 4s · store 66bjrcfm |
| 21:38:43 | vestigia | sign_ecdsa/x86_64-linux/taint — 4s · store xrha0a9c |
| 21:38:47 | vestigia | sign_ecdsa_ctx/aarch64-linux/diff/a72 — 3s · store 6dwvgs2l |
| 21:38:50 | vestigia | sign_ecdsa_ctx/aarch64-linux/taint — 4s · store 58d5rsgy |
| 21:38:54 | vestigia | sign_ecdsa_ctx/x86_64-linux/diff/zen3 — 3s · store xdp9x9qv |
| 21:38:57 | vestigia | sign_ecdsa_ctx/x86_64-linux/taint — 4s · store 7z8j0wvl |
| 21:39:01 | vestigia | sign_schnorr/aarch64-linux/diff/a72 — 4s · store h17p64va |
| 21:39:05 | vestigia | sign_schnorr/aarch64-linux/taint — 3s · store 3yima3b4 |
| 21:39:08 | vestigia | sign_schnorr/x86_64-linux/diff/zen3 — 4s · store d0jg8p7i |
| 21:39:12 | vestigia | sign_schnorr/x86_64-linux/taint — 4s · store zf7k55yb |
| 21:39:16 | vestigia | sign_schnorr_ctx/aarch64-linux/diff/a72 — 3s · store pbncqzlr |
| 21:39:19 | vestigia | sign_schnorr_ctx/aarch64-linux/taint — 4s · store gfi3sf4l |
| 21:39:23 | vestigia | sign_schnorr_ctx/x86_64-linux/diff/zen3 — 4s · store ww7nspb0 |
| 21:39:27 | vestigia | sign_schnorr_ctx/x86_64-linux/taint — 3s · store fp3w8zqz |
| 21:39:32 | decisions | 18 decisions signed · ledger 518d8772d612 |
| 21:39:32 | gate | pass — 0 sites · 0 violations |
| 21:39:33 | bundle | gate pass — 0 sites · 0 violations |