ppad measure

Constant-Time Analysis: ppad-secp256k1

target
ppad-secp256k1 0.5.9 (b3494fa)
git.ppad.tech/secp256k1
toolchain
GHC 9.10.3, LLVM 19.1.7
vestigia
16 secrets per execution (aarch64 on a72; x86_64 on zen3)
censor
aarch64-linux (instructions), x86_64-linux (instructions)
generated
2026-10-31 (synthesis)
✓ no leak found in all 9 executions
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
Multiplies a fixed public point by the secret scalar
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
vestigiatrace
inputs
scalar pseudorandom in [1, n), n the secp256k1 group order
point fixed, the generator times a fixed public scalar
no branch or memory address varied with the secret in the code under audit.
outside any DIT contract · 3 lines ran outside any DIT contract, on secret-derived operands
functioninstructionvaries atsource
c23iG_info$deffmov x22, d0operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f00: mov x23, v0.d[1]
41f04: mov x25, v1.d[1]
41f08: ldr x8, [x20, #304]
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0 operand (diff)
observed by diff: operand, ran 2×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1
41f1c: fmov x26, d2
41f20: str q5, [x20, #288]
c23iG_info$deffmov x24, d1operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f08: ldr x8, [x20, #304]
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1 operand (diff)
observed by diff: operand, ran 2×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f1c: fmov x26, d2
41f20: str q5, [x20, #288]
41f24: add x20, x20, #0x100
41f28: blr x8
c23iG_info$deffmov x26, d2operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1
41f1c: fmov x26, d2 operand (diff)
observed by diff: operand, ran 2×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f20: str q5, [x20, #288]
41f24: add x20, x20, #0x100
41f28: blr x8
41f2c: ret
✓ invariant · 3 lines the secret reaches, where no run varied
c24U1_info$defcbz x14, 42250 <+0x100>branch
in c24U1_info$def
42194: orr x12, x8, x9
42198: csel w13, wzr, w13, ne // ne = any
4219c: orr x14, x12, x14
421a0: csinc w12, w13, wzr, cs // cs = hs, nlast
421a4: cbz x14, 42250 <+0x100> branch (taint)
observed by taint: branch, 16× on the secret
c24U1_info$def ?
421a8: tbz w12, #0, 42250 <+0x100>
421ac: movi v1.2d, #0x0
421b0: adrp x12, 42000 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zdwmul_info+0x70>
421b4: add x12, x12, #0x290
c25cs_info$defje 44aad <+0x17d>branch
in c25cs_info$def
44979: mov %rax,%rcx
4497c: or %r13,%rcx
4497f: or %rdx,%rcx
44982: or %r8,%rcx
44985: je 44aad <+0x17d> branch (taint)
observed by taint: branch, 16× on the secret
c25cs_info$def ?
4498b: and %r11b,%r12b
4498e: or %r12b,%r9b
44991: and %r9b,%r14b
44994: or %r14b,%sil
c25cs_info$defje 44aad <+0x17d>branch
in c25cs_info$def
44991: and %r9b,%r14b
44994: or %r14b,%sil
44997: and %sil,%r10b
4499a: or %r10b,%dil
4499d: je 44aad <+0x17d> branch (taint)
observed by taint: branch, 16× on the secret
c25cs_info$def ?
449a3: mov %r15,-0x8(%rsp)
449a8: mov 0x18(%rbp),%r15
449ac: mov 0x8(%rbp),%r10
449b0: mov 0x10(%rbp),%r11
censortiming50000 pairs · α=1.0e-6 · batch 1
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
Secp.mul (non-generator base)aarch64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=1.000
Secp.mul (non-generator base)x86_64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=1.000

Crypto.Curve.Secp256k1.mul_wnaf

✓ no leak of scalar found
Multiplies the generator by the secret scalar, through a precomputed table
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
vestigiatrace
inputs
scalar pseudorandom in [1, n), n the secp256k1 group order
generator context precomputed once, fixed
no branch or memory address varied with the secret in the code under audit.
outside any DIT contract · 1 line ran outside any DIT contract, on secret-derived operands
functioninstructionvaries atsource
c1PFz_info$deffmov x29, d0operandghc_8.ll
in c1PFz_info$def · ghc_8.ll
2bde0: adds x14, x13, x30
2bde4: mov x25, x10
2bde8: ldp x17, x16, [x20, #40]
2bdec: adcs x27, x15, x29
2bdf0: fmov x29, d0 operand (diff)
observed by diff: operand, ran 65×
c1PFz_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
2bdf4: adcs x16, x18, x16
2bdf8: adcs x17, x29, x17
2bdfc: cset w18, cs // cs = hs, nlast
2be00: subs x14, x14, x11
✓ invariant · 3 lines the secret reaches, where no run varied
c1PNR_info$defje 2c560 <+0x70>branch
in c1PNR_info$def
2c525: sete %bl
2c528: or %r9,%r10
2c52b: or %r11,%r10
2c52e: or %r14,%r10
2c531: je 2c560 <+0x70> branch (taint)
observed by taint: branch, 16× on the secret
c1PNR_info$def ?
2c533: and %sil,%r8b
2c536: or %r8b,%dl
2c539: and %dl,%dil
2c53c: or %dil,%al
c1PNR_info$defje 2c560 <+0x70>branch
in c1PNR_info$def
2c539: and %dl,%dil
2c53c: or %dil,%al
2c53f: and %al,%bl
2c541: or %bl,%cl
2c543: je 2c560 <+0x70> branch (taint)
observed by taint: branch, 16× on the secret
c1PNR_info$def ?
2c545: lea 0x44(%rip),%rax # 2c590 <c1PPy_info$def>
2c54c: mov %rax,0x0(%rbp)
2c550: lea 0x5b959(%rip),%rbx # 87eb0 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zuCURVEzuZZERO4_closure>
2c557: mov 0x5b952(%rip),%rax # 87eb0 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zuCURVEzuZZERO4_closure>
c1Py4_info$defcbz x9, 2b808 <+0x80>branch
in c1Py4_info$def
2b7d0: cmp x11, x13
2b7d4: orr x9, x9, x10
2b7d8: csel w8, wzr, w8, ne // ne = any
2b7dc: csinc w8, w8, wzr, cs // cs = hs, nlast
2b7e0: cbz x9, 2b808 <+0x80> branch (taint)
observed by taint: branch, 16× on the secret
c1Py4_info$def ?
2b7e4: tbz w8, #0, 2b808 <+0x80>
2b7e8: adrp x22, a0000 <__dso_handle>
2b7ec: add x22, x22, #0xeb0
2b7f0: adrp x9, 2b000 <c1OqN_info$def+0x58>
censortiming50000 pairs · α=1.0e-6 · batch 1
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
Secp.mul_wnaf (precomputed generator)aarch64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.755
Secp.mul_wnaf (precomputed generator)x86_64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.586

Crypto.Curve.Secp256k1.derive_pub

✓ no leak of key found
Derives the secret key's public key
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
vestigiatrace
inputs
secret key pseudorandom in [1, n), n the secp256k1 group order
no branch or memory address varied with the secret in the code under audit.
outside any DIT contract · 3 lines ran outside any DIT contract, on secret-derived operands
functioninstructionvaries atsource
c23iG_info$deffmov x22, d0operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f00: mov x23, v0.d[1]
41f04: mov x25, v1.d[1]
41f08: ldr x8, [x20, #304]
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0 operand (diff)
observed by diff: operand, ran 2×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1
41f1c: fmov x26, d2
41f20: str q5, [x20, #288]
c23iG_info$deffmov x24, d1operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f08: ldr x8, [x20, #304]
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1 operand (diff)
observed by diff: operand, ran 2×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f1c: fmov x26, d2
41f20: str q5, [x20, #288]
41f24: add x20, x20, #0x100
41f28: blr x8
c23iG_info$deffmov x26, d2operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1
41f1c: fmov x26, d2 operand (diff)
observed by diff: operand, ran 2×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f20: str q5, [x20, #288]
41f24: add x20, x20, #0x100
41f28: blr x8
41f2c: ret
✓ invariant · 3 lines the secret reaches, where no run varied
c24U1_info$defcbz x14, 42250 <+0x100>branch
in c24U1_info$def
42194: orr x12, x8, x9
42198: csel w13, wzr, w13, ne // ne = any
4219c: orr x14, x12, x14
421a0: csinc w12, w13, wzr, cs // cs = hs, nlast
421a4: cbz x14, 42250 <+0x100> branch (taint)
observed by taint: branch, 16× on the secret
c24U1_info$def ?
421a8: tbz w12, #0, 42250 <+0x100>
421ac: movi v1.2d, #0x0
421b0: adrp x12, 42000 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zdwmul_info+0x70>
421b4: add x12, x12, #0x290
c25cs_info$defje 44aad <+0x17d>branch
in c25cs_info$def
44979: mov %rax,%rcx
4497c: or %r13,%rcx
4497f: or %rdx,%rcx
44982: or %r8,%rcx
44985: je 44aad <+0x17d> branch (taint)
observed by taint: branch, 16× on the secret
c25cs_info$def ?
4498b: and %r11b,%r12b
4498e: or %r12b,%r9b
44991: and %r9b,%r14b
44994: or %r14b,%sil
c25cs_info$defje 44aad <+0x17d>branch
in c25cs_info$def
44991: and %r9b,%r14b
44994: or %r14b,%sil
44997: and %sil,%r10b
4499a: or %r10b,%dil
4499d: je 44aad <+0x17d> branch (taint)
observed by taint: branch, 16× on the secret
c25cs_info$def ?
449a3: mov %r15,-0x8(%rsp)
449a8: mov 0x18(%rbp),%r15
449ac: mov 0x8(%rbp),%r10
449b0: mov 0x10(%rbp),%r11
censortiming50000 pairs · α=1.0e-6 · batch 1
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
Secp.derive_pub (generator multiplication)aarch64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.373
Secp.derive_pub (generator multiplication)x86_64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.555

Crypto.Curve.Secp256k1.derive_pub'

✓ no leak of key found
Derives the secret key's public key, through a precomputed table
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
vestigiatrace
inputs
secret key pseudorandom in [1, n), n the secp256k1 group order
generator context precomputed once, fixed
no branch or memory address varied with the secret in the code under audit.
outside any DIT contract · 1 line ran outside any DIT contract, on secret-derived operands
functioninstructionvaries atsource
c1PFz_info$deffmov x29, d0operandghc_8.ll
in c1PFz_info$def · ghc_8.ll
2bde0: adds x14, x13, x30
2bde4: mov x25, x10
2bde8: ldp x17, x16, [x20, #40]
2bdec: adcs x27, x15, x29
2bdf0: fmov x29, d0 operand (diff)
observed by diff: operand, ran 65×
c1PFz_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
2bdf4: adcs x16, x18, x16
2bdf8: adcs x17, x29, x17
2bdfc: cset w18, cs // cs = hs, nlast
2be00: subs x14, x14, x11
✓ invariant · 3 lines the secret reaches, where no run varied
c1PNR_info$defje 2c560 <+0x70>branch
in c1PNR_info$def
2c525: sete %bl
2c528: or %r9,%r10
2c52b: or %r11,%r10
2c52e: or %r14,%r10
2c531: je 2c560 <+0x70> branch (taint)
observed by taint: branch, 16× on the secret
c1PNR_info$def ?
2c533: and %sil,%r8b
2c536: or %r8b,%dl
2c539: and %dl,%dil
2c53c: or %dil,%al
c1PNR_info$defje 2c560 <+0x70>branch
in c1PNR_info$def
2c539: and %dl,%dil
2c53c: or %dil,%al
2c53f: and %al,%bl
2c541: or %bl,%cl
2c543: je 2c560 <+0x70> branch (taint)
observed by taint: branch, 16× on the secret
c1PNR_info$def ?
2c545: lea 0x44(%rip),%rax # 2c590 <c1PPy_info$def>
2c54c: mov %rax,0x0(%rbp)
2c550: lea 0x5b959(%rip),%rbx # 87eb0 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zuCURVEzuZZERO4_closure>
2c557: mov 0x5b952(%rip),%rax # 87eb0 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zuCURVEzuZZERO4_closure>
c1Py4_info$defcbz x9, 2b808 <+0x80>branch
in c1Py4_info$def
2b7d0: cmp x11, x13
2b7d4: orr x9, x9, x10
2b7d8: csel w8, wzr, w8, ne // ne = any
2b7dc: csinc w8, w8, wzr, cs // cs = hs, nlast
2b7e0: cbz x9, 2b808 <+0x80> branch (taint)
observed by taint: branch, 16× on the secret
c1Py4_info$def ?
2b7e4: tbz w8, #0, 2b808 <+0x80>
2b7e8: adrp x22, a0000 <__dso_handle>
2b7ec: add x22, x22, #0xeb0
2b7f0: adrp x9, 2b000 <c1OqN_info$def+0x58>
censortiming50000 pairs · α=1.0e-6 · batch 1
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
Secp.derive_pub' (precomputed generator)aarch64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.755
Secp.derive_pub' (precomputed generator)x86_64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.742

Crypto.Curve.Secp256k1.ecdh

✓ no leak of key found
Derives the shared secret of the secret key and a fixed public point
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
vestigiatrace
inputs
secret key pseudorandom in [1, n), n the secp256k1 group order
peer fixed, the generator times a fixed public scalar
no branch or memory address varied with the secret in the code under audit.
outside any DIT contract · 4 lines ran outside any DIT contract, on secret-derived operands
functioninstructionvaries atsource
c23iG_info$deffmov x22, d0operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f00: mov x23, v0.d[1]
41f04: mov x25, v1.d[1]
41f08: ldr x8, [x20, #304]
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0 operand (diff)
observed by diff: operand, ran 2×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1
41f1c: fmov x26, d2
41f20: str q5, [x20, #288]
c23iG_info$deffmov x24, d1operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f08: ldr x8, [x20, #304]
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1 operand (diff)
observed by diff: operand, ran 2×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f1c: fmov x26, d2
41f20: str q5, [x20, #288]
41f24: add x20, x20, #0x100
41f28: blr x8
c23iG_info$deffmov x26, d2operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1
41f1c: fmov x26, d2 operand (diff)
observed by diff: operand, ran 2×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f20: str q5, [x20, #288]
41f24: add x20, x20, #0x100
41f28: blr x8
41f2c: ret
c2weq_info$defandps 0xc9c3(%rip),%xmm0 # 851b0 <_fini+0x1c>operandghc_8.ll
in c2weq_info$def · ghc_8.ll
787d9: mov %ebx,%r14d
787dc: mov %eax,%eax
787de: mov %rax,-0x8(%rbp)
787e2: movups 0x0(%rbp),%xmm0
787e6: andps 0xc9c3(%rip),%xmm0 # 851b0 <_fini+0x1c> operand (diff)
observed by diff: operand, ran 1×
c2weq_info$def ghc_8.ll
787ed: lea -0x8(%rbp),%rax
787f1: movups %xmm0,0x0(%rbp)
787f5: mov %rax,%rbp
787f8: jmp 1b6f0 <ppadzmsha256zm0zi3zi5zm33Ttsqzzzz29RJsC1lFPqFgD_CryptoziHashziSHA256ziInternal_zdwcat_info@plt>
✓ invariant · 5 lines the secret reaches, where no run varied
c24U1_info$defcbz x14, 42250 <+0x100>branch
in c24U1_info$def
42194: orr x12, x8, x9
42198: csel w13, wzr, w13, ne // ne = any
4219c: orr x14, x12, x14
421a0: csinc w12, w13, wzr, cs // cs = hs, nlast
421a4: cbz x14, 42250 <+0x100> branch (taint)
observed by taint: branch, 16× on the secret
c24U1_info$def ?
421a8: tbz w12, #0, 42250 <+0x100>
421ac: movi v1.2d, #0x0
421b0: adrp x12, 42000 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zdwmul_info+0x70>
421b4: add x12, x12, #0x290
c25cs_info$defje 44aad <+0x17d>branch
in c25cs_info$def
44979: mov %rax,%rcx
4497c: or %r13,%rcx
4497f: or %rdx,%rcx
44982: or %r8,%rcx
44985: je 44aad <+0x17d> branch (taint)
observed by taint: branch, 16× on the secret
c25cs_info$def ?
4498b: and %r11b,%r12b
4498e: or %r12b,%r9b
44991: and %r9b,%r14b
44994: or %r14b,%sil
c25cs_info$defje 44aad <+0x17d>branch
in c25cs_info$def
44991: and %r9b,%r14b
44994: or %r14b,%sil
44997: and %sil,%r10b
4499a: or %r10b,%dil
4499d: je 44aad <+0x17d> branch (taint)
observed by taint: branch, 16× on the secret
c25cs_info$def ?
449a3: mov %r15,-0x8(%rsp)
449a8: mov 0x18(%rbp),%r15
449ac: mov 0x8(%rbp),%r10
449b0: mov 0x10(%rbp),%r11
c2vUx_info$defb.ne 74b78 <+0x48> // b.anybranch
in c2vUx_info$def
74b30: ldr x8, [x20, #96]
74b34: cmp x8, x22
74b38: b.ne 74b78 <+0x48> // b.any branch (taint)
observed by taint: branch, 16× on the secret
c2vUx_info$def ?
74b3c: ldr x8, [x20, #8]
74b40: cmp x8, x23
74b44: b.ne 74b78 <+0x48> // b.any
74b48: ldr x8, [x20, #16]
c2weC_info$defjne 788cc <+0x2c>branch
in c2weC_info$def
788a0: cmp %rbx,0x60(%rbp)
788a4: jne 788cc <+0x2c> branch (taint)
observed by taint: branch, 16× on the secret
c2weC_info$def ?
788a6: cmp %r14,0x8(%rbp)
788aa: jne 788cc <+0x2c>
788ac: cmp %rsi,0x10(%rbp)
788b0: jne 788cc <+0x2c>
censortiming50000 pairs · α=1.0e-6 · batch 1
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
Secp.ecdh (fixed peer)aarch64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.587
Secp.ecdh (fixed peer)x86_64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.082

Crypto.Curve.Secp256k1.sign_schnorr

✓ no leak of key or derived nonce found
Signs a fixed message with the secret key (BIP0340)
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
vestigiatrace
inputs
secret key pseudorandom in [1, n), n the secp256k1 group order
message 32 bytes, fixed
auxiliary randomness 32 bytes, fixed
no branch or memory address varied with the secret in the code under audit.
outside any DIT contract · 6 lines ran outside any DIT contract, on secret-derived operands
functioninstructionvaries atsource
c23iG_info$deffmov x22, d0operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f00: mov x23, v0.d[1]
41f04: mov x25, v1.d[1]
41f08: ldr x8, [x20, #304]
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0 operand (diff)
observed by diff: operand, ran 3×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1
41f1c: fmov x26, d2
41f20: str q5, [x20, #288]
c23iG_info$deffmov x24, d1operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f08: ldr x8, [x20, #304]
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1 operand (diff)
observed by diff: operand, ran 3×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f1c: fmov x26, d2
41f20: str q5, [x20, #288]
41f24: add x20, x20, #0x100
41f28: blr x8
c23iG_info$deffmov x26, d2operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1
41f1c: fmov x26, d2 operand (diff)
observed by diff: operand, ran 3×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f20: str q5, [x20, #288]
41f24: add x20, x20, #0x100
41f28: blr x8
41f2c: ret
c2AHW_info$deffmov x25, d0operandghc_8.ll
in c2AHW_info$def · ghc_8.ll
792cc: cmn x26, x23
792d0: mneg x23, x24, x9
792d4: adc x24, x27, x30
792d8: adds x18, x18, x25
792dc: fmov x25, d0 operand (diff)
observed by diff: operand, ran 1×
c2AHW_info$def ghc_8.ll
c2AAh_info$def ghc_8.ll
c2AA4_info$def ghc_8.ll
c2AzZ_info$def ghc_8.ll
c2AzS_info$def ghc_8.ll
rdzo_info$def ghc_8.ll
c2AGX_info$def ghc_8.ll
c2AGS_info$def ghc_8.ll
c2AFZ_info$def ghc_8.ll
c2AFV_info$def ghc_8.ll
c2AFR_info$def ghc_8.ll
792e0: cinc x16, x16, cs // cs = hs, nlast
792e4: adds x18, x29, x18
792e8: umulh x26, x17, x11
792ec: cset w27, cs // cs = hs, nlast
c2Bai_info$defandps 0x6173(%rip),%xmm0 # 851b0 <_fini+0x1c>operandghc_8.ll
in c2Bai_info$def · ghc_8.ll
7f029: mov %ebx,%r14d
7f02c: mov %eax,%eax
7f02e: mov %rax,-0x8(%rbp)
7f032: movups 0x0(%rbp),%xmm0
7f036: andps 0x6173(%rip),%xmm0 # 851b0 <_fini+0x1c> operand (diff)
observed by diff: operand, ran 1×
c2Bai_info$def ghc_8.ll
7f03d: lea -0x8(%rbp),%rax
7f041: movups %xmm0,0x0(%rbp)
7f045: mov %rax,%rbp
7f048: jmp 1b6f0 <ppadzmsha256zm0zi3zi5zm33Ttsqzzzz29RJsC1lFPqFgD_CryptoziHashziSHA256ziInternal_zdwcat_info@plt>
c2Bmb_info$defandps 0x4c63(%rip),%xmm0 # 851b0 <_fini+0x1c>operandghc_8.ll
in c2Bmb_info$def · ghc_8.ll
80539: mov %ebx,%r14d
8053c: mov %eax,%eax
8053e: mov %rax,-0x8(%rbp)
80542: movups 0x0(%rbp),%xmm0
80546: andps 0x4c63(%rip),%xmm0 # 851b0 <_fini+0x1c> operand (diff)
observed by diff: operand, ran 1×
c2Bmb_info$def ghc_8.ll
8054d: lea -0x8(%rbp),%rax
80551: movups %xmm0,0x0(%rbp)
80555: mov %rax,%rbp
80558: jmp 1b6f0 <ppadzmsha256zm0zi3zi5zm33Ttsqzzzz29RJsC1lFPqFgD_CryptoziHashziSHA256ziInternal_zdwcat_info@plt>
✓ invariant · 5 lines the secret reaches, where no run varied
c24U1_info$defcbz x14, 42250 <+0x100>branch
in c24U1_info$def
42194: orr x12, x8, x9
42198: csel w13, wzr, w13, ne // ne = any
4219c: orr x14, x12, x14
421a0: csinc w12, w13, wzr, cs // cs = hs, nlast
421a4: cbz x14, 42250 <+0x100> branch (taint)
observed by taint: branch, 32× on the secret
c24U1_info$def ?
421a8: tbz w12, #0, 42250 <+0x100>
421ac: movi v1.2d, #0x0
421b0: adrp x12, 42000 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zdwmul_info+0x70>
421b4: add x12, x12, #0x290
c25cs_info$defje 44aad <+0x17d>branch
in c25cs_info$def
44979: mov %rax,%rcx
4497c: or %r13,%rcx
4497f: or %rdx,%rcx
44982: or %r8,%rcx
44985: je 44aad <+0x17d> branch (taint)
observed by taint: branch, 32× on the secret
c25cs_info$def ?
4498b: and %r11b,%r12b
4498e: or %r12b,%r9b
44991: and %r9b,%r14b
44994: or %r14b,%sil
c25cs_info$defje 44aad <+0x17d>branch
in c25cs_info$def
44991: and %r9b,%r14b
44994: or %r14b,%sil
44997: and %sil,%r10b
4499a: or %r10b,%dil
4499d: je 44aad <+0x17d> branch (taint)
observed by taint: branch, 32× on the secret
c25cs_info$def ?
449a3: mov %r15,-0x8(%rsp)
449a8: mov 0x18(%rbp),%r15
449ac: mov 0x8(%rbp),%r10
449b0: mov 0x10(%rbp),%r11
c2ATI_info$defb.ne 7a618 <+0x48> // b.anybranch
in c2ATI_info$def
7a5d0: ldr x8, [x20, #136]
7a5d4: cmp x8, x22
7a5d8: b.ne 7a618 <+0x48> // b.any branch (taint)
observed by taint: branch, 16× on the secret
c2ATI_info$def ?
7a5dc: ldr x8, [x20, #120]
7a5e0: cmp x8, x23
7a5e4: b.ne 7a618 <+0x48> // b.any
7a5e8: ldr x8, [x20, #104]
c2BgT_info$defjne 7f285 <+0x35>branch
in c2BgT_info$def
7f24b: add %bl,0x4800009f(%rax)
…
7f250: cmp %rbx,0x88(%rbp)
7f257: jne 7f285 <+0x35> branch (taint)
observed by taint: branch, 16× on the secret
c2BgT_info$def ?
7f259: cmp %r14,0x78(%rbp)
7f25d: jne 7f285 <+0x35>
7f25f: cmp %rsi,0x68(%rbp)
7f263: jne 7f285 <+0x35>
censortiming50000 pairs · α=1.0e-6 · batch 1
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
Secp.sign_schnorr (BIP0340)aarch64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.408
Secp.sign_schnorr (BIP0340)x86_64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.692

Crypto.Curve.Secp256k1.sign_schnorr'

✓ no leak of key or derived nonce found
Signs a fixed message with the secret key (BIP0340), through a precomputed table
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
vestigiatrace
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
no branch or memory address varied with the secret in the code under audit.
outside any DIT contract · 4 lines ran outside any DIT contract, on secret-derived operands
functioninstructionvaries atsource
c1PFz_info$deffmov x29, d0operandghc_8.ll
in c1PFz_info$def · ghc_8.ll
2bde0: adds x14, x13, x30
2bde4: mov x25, x10
2bde8: ldp x17, x16, [x20, #40]
2bdec: adcs x27, x15, x29
2bdf0: fmov x29, d0 operand (diff)
observed by diff: operand, ran 130×
c1PFz_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
2bdf4: adcs x16, x18, x16
2bdf8: adcs x17, x29, x17
2bdfc: cset w18, cs // cs = hs, nlast
2be00: subs x14, x14, x11
c2D4S_info$deffmov x18, d0operandghc_8.ll
in c2D4S_info$def · ghc_8.ll
7c174: umulh x1, x16, x12
7c178: adds x17, x0, x17
7c17c: cset w0, cs // cs = hs, nlast
7c180: cmn x18, x25
7c184: fmov x18, d0 operand (diff)
observed by diff: operand, ran 1×
c2D4S_info$def ghc_8.ll
c2AAh_info$def ghc_8.ll
c2AA4_info$def ghc_8.ll
c2AzZ_info$def ghc_8.ll
c2AzS_info$def ghc_8.ll
rdzo_info$def ghc_8.ll
c2D3T_info$def ghc_8.ll
c2D30_info$def ghc_8.ll
c2D2W_info$def ghc_8.ll
c2D2S_info$def ghc_8.ll
7c188: adc x25, x30, x27
7c18c: adds x23, x29, x23
7c190: umulh x30, x16, x11
7c194: cset w27, cs // cs = hs, nlast
c2DMn_info$defandps 0x12d3(%rip),%xmm0 # 851b0 <_fini+0x1c>operandghc_8.ll
in c2DMn_info$def · ghc_8.ll
83ec9: mov %ebx,%r14d
83ecc: mov %eax,%eax
83ece: mov %rax,-0x8(%rbp)
83ed2: movups 0x0(%rbp),%xmm0
83ed6: andps 0x12d3(%rip),%xmm0 # 851b0 <_fini+0x1c> operand (diff)
observed by diff: operand, ran 1×
c2DMn_info$def ghc_8.ll
83edd: lea -0x8(%rbp),%rax
83ee1: movups %xmm0,0x0(%rbp)
83ee5: mov %rax,%rbp
83ee8: jmp 1b6f0 <ppadzmsha256zm0zi3zi5zm33Ttsqzzzz29RJsC1lFPqFgD_CryptoziHashziSHA256ziInternal_zdwcat_info@plt>
c2Dzu_info$defandps 0x27d3(%rip),%xmm0 # 851b0 <_fini+0x1c>operandghc_8.ll
in c2Dzu_info$def · ghc_8.ll
829c9: mov %ebx,%r14d
829cc: mov %eax,%eax
829ce: mov %rax,-0x8(%rbp)
829d2: movups 0x0(%rbp),%xmm0
829d6: andps 0x27d3(%rip),%xmm0 # 851b0 <_fini+0x1c> operand (diff)
observed by diff: operand, ran 1×
c2Dzu_info$def ghc_8.ll
829dd: lea -0x8(%rbp),%rax
829e1: movups %xmm0,0x0(%rbp)
829e5: mov %rax,%rbp
829e8: jmp 1b6f0 <ppadzmsha256zm0zi3zi5zm33Ttsqzzzz29RJsC1lFPqFgD_CryptoziHashziSHA256ziInternal_zdwcat_info@plt>
✓ invariant · 5 lines the secret reaches, where no run varied
c1PNR_info$defje 2c560 <+0x70>branch
in c1PNR_info$def
2c525: sete %bl
2c528: or %r9,%r10
2c52b: or %r11,%r10
2c52e: or %r14,%r10
2c531: je 2c560 <+0x70> branch (taint)
observed by taint: branch, 32× on the secret
c1PNR_info$def ?
2c533: and %sil,%r8b
2c536: or %r8b,%dl
2c539: and %dl,%dil
2c53c: or %dil,%al
c1PNR_info$defje 2c560 <+0x70>branch
in c1PNR_info$def
2c539: and %dl,%dil
2c53c: or %dil,%al
2c53f: and %al,%bl
2c541: or %bl,%cl
2c543: je 2c560 <+0x70> branch (taint)
observed by taint: branch, 32× on the secret
c1PNR_info$def ?
2c545: lea 0x44(%rip),%rax # 2c590 <c1PPy_info$def>
2c54c: mov %rax,0x0(%rbp)
2c550: lea 0x5b959(%rip),%rbx # 87eb0 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zuCURVEzuZZERO4_closure>
2c557: mov 0x5b952(%rip),%rax # 87eb0 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zuCURVEzuZZERO4_closure>
c1Py4_info$defcbz x9, 2b808 <+0x80>branch
in c1Py4_info$def
2b7d0: cmp x11, x13
2b7d4: orr x9, x9, x10
2b7d8: csel w8, wzr, w8, ne // ne = any
2b7dc: csinc w8, w8, wzr, cs // cs = hs, nlast
2b7e0: cbz x9, 2b808 <+0x80> branch (taint)
observed by taint: branch, 32× on the secret
c1Py4_info$def ?
2b7e4: tbz w8, #0, 2b808 <+0x80>
2b7e8: adrp x22, a0000 <__dso_handle>
2b7ec: add x22, x22, #0xeb0
2b7f0: adrp x9, 2b000 <c1OqN_info$def+0x58>
c2DG5_info$defjne 82c54 <+0x44>branch
in c2DG5_info$def
82c17: mov 0x80(%rbp),%r11
82c1e: mov 0x60(%rbp),%rax
82c22: mov 0x68(%rbp),%rcx
82c26: cmp %rbx,%r10
82c29: jne 82c54 <+0x44> branch (taint)
observed by taint: branch, 16× on the secret
c2DG5_info$def ?
82c2b: cmp %r14,%r11
82c2e: jne 82c54 <+0x44>
82c30: cmp %rsi,%rcx
82c33: jne 82c54 <+0x44>
c2DgE_info$defb.ne 7d4a4 <+0x44> // b.anybranch
in c2DgE_info$def
7d460: ldr x11, [x20, #144]
7d464: ldp x8, x14, [x20, #96]
7d468: ldr x15, [x20, #128]
7d46c: cmp x11, x22
7d470: b.ne 7d4a4 <+0x44> // b.any branch (taint)
observed by taint: branch, 16× on the secret
c2DgE_info$def ?
7d474: cmp x15, x23
7d478: b.ne 7d4a4 <+0x44> // b.any
7d47c: cmp x14, x24
7d480: b.ne 7d4a4 <+0x44> // b.any
censortiming50000 pairs · α=1.0e-6 · batch 1
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
Secp.sign_schnorr' (BIP0340)aarch64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.141
Secp.sign_schnorr' (BIP0340)x86_64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.520

Crypto.Curve.Secp256k1.sign_ecdsa

✓ no leak of key or deterministic nonce found
Signs a fixed message with the secret key (RFC6979, low s)
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
vestigiatrace
inputs
secret key pseudorandom in [1, n), n the secp256k1 group order
message 32 bytes, fixed
no branch or memory address varied with the secret in the code under audit.
outside any DIT contract · 3 lines ran outside any DIT contract, on secret-derived operands
functioninstructionvaries atsource
c23iG_info$deffmov x22, d0operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f00: mov x23, v0.d[1]
41f04: mov x25, v1.d[1]
41f08: ldr x8, [x20, #304]
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0 operand (diff)
observed by diff: operand, ran 2×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1
41f1c: fmov x26, d2
41f20: str q5, [x20, #288]
c23iG_info$deffmov x24, d1operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f08: ldr x8, [x20, #304]
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1 operand (diff)
observed by diff: operand, ran 2×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f1c: fmov x26, d2
41f20: str q5, [x20, #288]
41f24: add x20, x20, #0x100
41f28: blr x8
c23iG_info$deffmov x26, d2operandghc_8.ll
in c23iG_info$def · ghc_8.ll
41f0c: mov x27, v2.d[1]
41f10: fmov x22, d0
41f14: stp q3, q4, [x20, #256]
41f18: fmov x24, d1
41f1c: fmov x26, d2 operand (diff)
observed by diff: operand, ran 2×
c23iG_info$def ghc_8.ll
c23hu_info$def ghc_8.ll
c23dd_info$def ghc_8.ll
c23d9_info$def ghc_8.ll
c23d5_info$def ghc_8.ll
c239C_info$def ghc_8.ll
c239y_info$def ghc_8.ll
c239u_info$def ghc_8.ll
c239q_info$def ghc_8.ll
c238e_info$def ghc_8.ll
c237h_info$def ghc_8.ll
c237d_info$def ghc_8.ll
c2379_info$def ghc_8.ll
41f20: str q5, [x20, #288]
41f24: add x20, x20, #0x100
41f28: blr x8
41f2c: ret
✓ invariant · 13 lines the secret reaches, where no run varied
c1L1d_info$defcbz x15, 241a8 <+0x70>branch
in c1L1d_info$def
24180: csinc w14, w14, wzr, cs // cs = hs, nlast
24184: cmp x25, x13
24188: csel w14, wzr, w14, ne // ne = any
2418c: csinc w14, w14, wzr, cs // cs = hs, nlast
24190: cbz x15, 241a8 <+0x70> branch (taint)
observed by taint: branch, 16× on the secret
c1L1d_info$def ?
24194: cbz w14, 241a8 <+0x70>
24198: ldr x8, [x20, #48]!
2419c: mov x22, x9
241a0: blr x8
c1L85_info$defcbz x17, 29cac <+0x9c>branch
in c1L85_info$def
29c50: csinc w16, w16, wzr, cs // cs = hs, nlast
29c54: cmp x10, x15
29c58: csel w16, wzr, w16, ne // ne = any
29c5c: csinc w16, w16, wzr, cs // cs = hs, nlast
29c60: cbz x17, 29cac <+0x9c> branch (taint)
observed by taint: branch, 16× on the secret
c1L85_info$def ?
29c64: cbz w16, 29cac <+0x9c>
29c68: adrp x16, 29000 <c1Lyr_info$def+0x10>
29c6c: add x16, x16, #0xcf0
29c70: stp x14, x15, [x20, #-16]
c1LAH_info$defb.ne 299e4 <+0x1f4> // b.anybranch
in c1LAH_info$def
2999c: adc x9, x15, x17
299a0: adds x11, x11, x9
299a4: adc x9, x16, x13
299a8: cmp x12, x10
299ac: b.ne 299e4 <+0x1f4> // b.any branch (taint)
observed by taint: branch, 16× on the secret
c1LAH_info$def ?
299b0: ldr x12, [x20, #64]
299b4: cmp x8, x12
299b8: b.ne 299f8 <+0x208> // b.any
299bc: ldr x12, [x20, #48]
c1LPG_info$defjne 2a17d <+0x2bd>branch
in c1LPG_info$def
2a140: add %rax,%rdi
2a143: adc %rdx,%rsi
2a146: mov 0x88(%rbp),%rax
2a14d: cmp %rax,%r9
2a150: jne 2a17d <+0x2bd> branch (taint)
observed by taint: branch, 16× on the secret
c1LPG_info$def ?
2a152: cmp 0x40(%rbp),%rcx
2a156: jne 2a19b <+0x2db>
2a158: mov 0x30(%rbp),%rdx
2a15c: cmp %rdx,%rdi
c1Les_info$defb.ne 25078 <+0x1e0> // b.anybranch
in c1Les_info$def
2504c: adc x11, x16, x14
25050: adds x11, x8, x11
25054: adc x12, x13, x12
25058: cmp x9, x15
2505c: b.ne 25078 <+0x1e0> // b.any branch (taint)
observed by taint: branch, 16× on the secret
c1Les_info$def ?
25060: ldp x14, x8, [x20, #16]
25064: ldr x13, [x20, #8]
25068: cmp x10, x8
2506c: ccmp x11, x13, #0x0, eq // eq = none
c1Lgc_info$defje 24844 <+0xa4>branch
in c1Lgc_info$def
24804: mov %r8,%r14
24807: or %rax,%r14
2480a: or %rsi,%r14
2480d: or %rdi,%r14
24810: je 24844 <+0xa4> branch (taint)
observed by taint: branch, 16× on the secret
c1Lgc_info$def ?
24812: and %dl,%cl
24814: or %cl,%r12b
24817: and %r12b,%r15b
2481a: or %r15b,%r10b
c1Lgc_info$defje 24844 <+0xa4>branch
in c1Lgc_info$def
24817: and %r12b,%r15b
2481a: or %r15b,%r10b
2481d: and %r10b,%r13b
24820: or %r13b,%r11b
24823: je 24844 <+0xa4> branch (taint)
observed by taint: branch, 16× on the secret
c1Lgc_info$def ?
24825: mov 0x30(%rbp),%rcx
24829: add $0x30,%rbp
2482d: mov -0x30(%rsp),%r13
24832: mov -0x28(%rsp),%r12
c1Ln4_info$defje 2a506 <+0xe6>branch
in c1Ln4_info$def
2a47f: mov %r8,%rsi
2a482: or %rdi,%rsi
2a485: or %rdx,%rsi
2a488: or %rcx,%rsi
2a48b: je 2a506 <+0xe6> branch (taint)
observed by taint: branch, 16× on the secret
c1Ln4_info$def ?
2a48d: and %r15b,%r14b
2a490: or %r14b,%al
2a493: and %al,%r13b
2a496: or %r13b,%bl
c1Ln4_info$defje 2a506 <+0xe6>branch
in c1Ln4_info$def
2a493: and %al,%r13b
2a496: or %r13b,%bl
2a499: and %bl,%r12b
2a49c: or %r12b,%r11b
2a49f: je 2a506 <+0xe6> branch (taint)
observed by taint: branch, 16× on the secret
c1Ln4_info$def ?
2a4a1: lea 0xc8(%rip),%rax # 2a570 <c1LoB_info$def>
2a4a8: mov %rax,-0x20(%rbp)
2a4ac: mov -0x10(%rsp),%rax
2a4b1: mov %rax,-0x18(%rbp)
c1Ltr_info$defjne 25a7e <+0x2ce>branch
in c1Ltr_info$def
25a4b: add %rax,%rsi
25a4e: adc %rdx,%rdi
25a51: mov 0x70(%rbp),%rbx
25a55: cmp 0x60(%rbp),%r14
25a59: jne 25a7e <+0x2ce> branch (taint)
observed by taint: branch, 16× on the secret
c1Ltr_info$def ?
25a5b: cmp 0x18(%rbp),%r11
25a5f: jne 25a7e <+0x2ce>
25a61: cmp 0x8(%rbp),%rsi
25a65: jne 25a7e <+0x2ce>
c24U1_info$defcbz x14, 42250 <+0x100>branch
in c24U1_info$def
42194: orr x12, x8, x9
42198: csel w13, wzr, w13, ne // ne = any
4219c: orr x14, x12, x14
421a0: csinc w12, w13, wzr, cs // cs = hs, nlast
421a4: cbz x14, 42250 <+0x100> branch (taint)
observed by taint: branch, 16× on the secret
c24U1_info$def ?
421a8: tbz w12, #0, 42250 <+0x100>
421ac: movi v1.2d, #0x0
421b0: adrp x12, 42000 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zdwmul_info+0x70>
421b4: add x12, x12, #0x290
c25cs_info$defje 44aad <+0x17d>branch
in c25cs_info$def
44979: mov %rax,%rcx
4497c: or %r13,%rcx
4497f: or %rdx,%rcx
44982: or %r8,%rcx
44985: je 44aad <+0x17d> branch (taint)
observed by taint: branch, 16× on the secret
c25cs_info$def ?
4498b: and %r11b,%r12b
4498e: or %r12b,%r9b
44991: and %r9b,%r14b
44994: or %r14b,%sil
c25cs_info$defje 44aad <+0x17d>branch
in c25cs_info$def
44991: and %r9b,%r14b
44994: or %r14b,%sil
44997: and %sil,%r10b
4499a: or %r10b,%dil
4499d: je 44aad <+0x17d> branch (taint)
observed by taint: branch, 16× on the secret
c25cs_info$def ?
449a3: mov %r15,-0x8(%rsp)
449a8: mov 0x18(%rbp),%r15
449ac: mov 0x8(%rbp),%r10
449b0: mov 0x10(%rbp),%r11
censortiming50000 pairs · α=1.0e-6 · batch 1
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
Secp.sign_ecdsa (RFC6979)aarch64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.176
Secp.sign_ecdsa (RFC6979)x86_64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.981

Crypto.Curve.Secp256k1.sign_ecdsa'

✓ no leak of key or deterministic nonce found
Signs a fixed message with the secret key (RFC6979, low s), through a precomputed table
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
vestigiatrace
inputs
secret key pseudorandom in [1, n), n the secp256k1 group order
message 32 bytes, fixed
generator context precomputed once, fixed
no branch or memory address varied with the secret in the code under audit.
outside any DIT contract · 1 line ran outside any DIT contract, on secret-derived operands
functioninstructionvaries atsource
c1PFz_info$deffmov x29, d0operandghc_8.ll
in c1PFz_info$def · ghc_8.ll
2bde0: adds x14, x13, x30
2bde4: mov x25, x10
2bde8: ldp x17, x16, [x20, #40]
2bdec: adcs x27, x15, x29
2bdf0: fmov x29, d0 operand (diff)
observed by diff: operand, ran 65×
c1PFz_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
_blk_c1PYX$def ghc_8.ll
c1Q0k_info$def ghc_8.ll
2bdf4: adcs x16, x18, x16
2bdf8: adcs x17, x29, x17
2bdfc: cset w18, cs // cs = hs, nlast
2be00: subs x14, x14, x11
✓ invariant · 13 lines the secret reaches, where no run varied
c1L1d_info$defcbz x15, 241a8 <+0x70>branch
in c1L1d_info$def
24180: csinc w14, w14, wzr, cs // cs = hs, nlast
24184: cmp x25, x13
24188: csel w14, wzr, w14, ne // ne = any
2418c: csinc w14, w14, wzr, cs // cs = hs, nlast
24190: cbz x15, 241a8 <+0x70> branch (taint)
observed by taint: branch, 16× on the secret
c1L1d_info$def ?
24194: cbz w14, 241a8 <+0x70>
24198: ldr x8, [x20, #48]!
2419c: mov x22, x9
241a0: blr x8
c1Lgc_info$defje 24844 <+0xa4>branch
in c1Lgc_info$def
24804: mov %r8,%r14
24807: or %rax,%r14
2480a: or %rsi,%r14
2480d: or %rdi,%r14
24810: je 24844 <+0xa4> branch (taint)
observed by taint: branch, 16× on the secret
c1Lgc_info$def ?
24812: and %dl,%cl
24814: or %cl,%r12b
24817: and %r12b,%r15b
2481a: or %r15b,%r10b
c1Lgc_info$defje 24844 <+0xa4>branch
in c1Lgc_info$def
24817: and %r12b,%r15b
2481a: or %r15b,%r10b
2481d: and %r10b,%r13b
24820: or %r13b,%r11b
24823: je 24844 <+0xa4> branch (taint)
observed by taint: branch, 16× on the secret
c1Lgc_info$def ?
24825: mov 0x30(%rbp),%rcx
24829: add $0x30,%rbp
2482d: mov -0x30(%rsp),%r13
24832: mov -0x28(%rsp),%r12
c1PNR_info$defje 2c560 <+0x70>branch
in c1PNR_info$def
2c525: sete %bl
2c528: or %r9,%r10
2c52b: or %r11,%r10
2c52e: or %r14,%r10
2c531: je 2c560 <+0x70> branch (taint)
observed by taint: branch, 16× on the secret
c1PNR_info$def ?
2c533: and %sil,%r8b
2c536: or %r8b,%dl
2c539: and %dl,%dil
2c53c: or %dil,%al
c1PNR_info$defje 2c560 <+0x70>branch
in c1PNR_info$def
2c539: and %dl,%dil
2c53c: or %dil,%al
2c53f: and %al,%bl
2c541: or %bl,%cl
2c543: je 2c560 <+0x70> branch (taint)
observed by taint: branch, 16× on the secret
c1PNR_info$def ?
2c545: lea 0x44(%rip),%rax # 2c590 <c1PPy_info$def>
2c54c: mov %rax,0x0(%rbp)
2c550: lea 0x5b959(%rip),%rbx # 87eb0 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zuCURVEzuZZERO4_closure>
2c557: mov 0x5b952(%rip),%rax # 87eb0 <ppadzmsecp256k1zm0zi5zi9zminplace_CryptoziCurveziSecp256k1_zuCURVEzuZZERO4_closure>
c1Py4_info$defcbz x9, 2b808 <+0x80>branch
in c1Py4_info$def
2b7d0: cmp x11, x13
2b7d4: orr x9, x9, x10
2b7d8: csel w8, wzr, w8, ne // ne = any
2b7dc: csinc w8, w8, wzr, cs // cs = hs, nlast
2b7e0: cbz x9, 2b808 <+0x80> branch (taint)
observed by taint: branch, 16× on the secret
c1Py4_info$def ?
2b7e4: tbz w8, #0, 2b808 <+0x80>
2b7e8: adrp x22, a0000 <__dso_handle>
2b7ec: add x22, x22, #0xeb0
2b7f0: adrp x9, 2b000 <c1OqN_info$def+0x58>
c1RB7_info$defcbz x17, 323dc <+0x9c>branch
in c1RB7_info$def
32380: csinc w16, w16, wzr, cs // cs = hs, nlast
32384: cmp x11, x15
32388: csel w16, wzr, w16, ne // ne = any
3238c: csinc w16, w16, wzr, cs // cs = hs, nlast
32390: cbz x17, 323dc <+0x9c> branch (taint)
observed by taint: branch, 16× on the secret
c1RB7_info$def ?
32394: cbz w16, 323dc <+0x9c>
32398: adrp x16, 32000 <c1S3I_info$def+0x98>
3239c: add x16, x16, #0x420
323a0: stp x14, x15, [x20, #-16]
c1RHt_info$defb.ne 2d7e0 <+0x1e0> // b.anybranch
in c1RHt_info$def
2d7b4: adc x11, x16, x14
2d7b8: adds x11, x8, x11
2d7bc: adc x12, x13, x12
2d7c0: cmp x9, x15
2d7c4: b.ne 2d7e0 <+0x1e0> // b.any branch (taint)
observed by taint: branch, 16× on the secret
c1RHt_info$def ?
2d7c8: ldp x14, x8, [x20, #16]
2d7cc: ldr x13, [x20, #8]
2d7d0: cmp x10, x8
2d7d4: ccmp x11, x13, #0x0, eq // eq = none
c1RR2_info$defje 33986 <+0xe6>branch
in c1RR2_info$def
338ff: mov %r8,%rsi
33902: or %rdi,%rsi
33905: or %rdx,%rsi
33908: or %rcx,%rsi
3390b: je 33986 <+0xe6> branch (taint)
observed by taint: branch, 16× on the secret
c1RR2_info$def ?
3390d: and %r15b,%r14b
33910: or %r14b,%al
33913: and %al,%r13b
33916: or %r13b,%bl
c1RR2_info$defje 33986 <+0xe6>branch
in c1RR2_info$def
33913: and %al,%r13b
33916: or %r13b,%bl
33919: and %bl,%r12b
3391c: or %r12b,%r11b
3391f: je 33986 <+0xe6> branch (taint)
observed by taint: branch, 16× on the secret
c1RR2_info$def ?
33921: lea 0xc8(%rip),%rax # 339f0 <c1RSz_info$def>
33928: mov %rax,-0x20(%rbp)
3392c: mov -0x10(%rsp),%rax
33931: mov %rax,-0x18(%rbp)
c1RXo_info$defjne 2ef5e <+0x2ce>branch
in c1RXo_info$def
2ef2b: add %rax,%rsi
2ef2e: adc %rdx,%rdi
2ef31: mov 0x68(%rbp),%rbx
2ef35: cmp 0x20(%rbp),%r14
2ef39: jne 2ef5e <+0x2ce> branch (taint)
observed by taint: branch, 16× on the secret
c1RXo_info$def ?
2ef3b: cmp 0x18(%rbp),%r11
2ef3f: jne 2ef5e <+0x2ce>
2ef41: cmp 0x8(%rbp),%rsi
2ef45: jne 2ef5e <+0x2ce>
c1S3I_info$defb.ne 32158 <+0x1f0> // b.anybranch
in c1S3I_info$def
32114: adc x9, x15, x17
32118: adds x14, x12, x9
3211c: adc x9, x13, x11
32120: cmp x16, x10
32124: b.ne 32158 <+0x1f0> // b.any branch (taint)
observed by taint: branch, 16× on the secret
c1S3I_info$def ?
32128: ldr x11, [x20, #64]
3212c: ldr x16, [x20, #48]
32130: cmp x8, x11
32134: ccmp x14, x16, #0x0, eq // eq = none
c1SjD_info$defjne 33674 <+0x2d4>branch
in c1SjD_info$def
33620: add %rax,%rdi
33623: adc %rdx,%rsi
33626: mov 0x48(%rbp),%rdx
3362a: cmp %rdx,%r15
3362d: jne 33674 <+0x2d4> branch (taint)
observed by taint: branch, 16× on the secret
c1SjD_info$def ?
3362f: mov $0x88,%eax
33634: mov $0x90,%r8d
3363a: mov $0x98,%r9d
33640: mov $0xa0,%r10d
censortiming50000 pairs · α=1.0e-6 · batch 1
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
Secp.sign_ecdsa' (RFC6979)aarch64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.754
Secp.sign_ecdsa' (RFC6979)x86_64-linux
instructions
log(1/α) 0 0
no leak found · 50000 pairs · α=1.0e-6 · p=0.442

appendix

method
adversary and security property

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.

approach

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.

vestigia

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.

censor

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.

this report

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
run environments
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
run totals
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