An anti-exfil variant for airgaped signing devices using PSBTs that works with the QR code based traditional signing workflow. This proposal is anti-exfil protection level 2.
Anti-exfil protection levels (proposed):
- Level 0: No protection, chosen nonce can immediately leak private key or seed
- Level 1: Deterministic nonce (RFC6979), enables FAT, UAT, no protection from “evil maid” and low probability leaks
- Level 2: Verifiable nonce tweak with external entropy, bandwidth restricted exfil channel, enables FAT, UAT, limited protection from “evil maid” firmware attacks
- Level 3: Negotiated nonce, exfil channel fully plugged, requires multiple rounds of communication
Signing protocol:
x: private key
X: public key
m: message to sign
n: nonce extra
1. signing device
q = hash(x, m, n)
Q = q·G
k = q + hash(Q, m, n)
R = k·G
e = hash(R, X, m)
Schnorr signature
s = k + x·e
ECDSA signature
r = R.x
s = k⁻¹·(m + r·x)
2. return to wallet app
Q, s
3. wallet app calculates
R = Q + hash(Q, m, n)·G
R, s
4. verify
Schnorr verify
e = hash(R, X, m)
s·G ?= R + e·X
ECDSA verify
r = R.x
s⁻¹·m·G + s⁻¹·r·X ?= R
[Non interactive anti-exfil · GitHub](Gist, Q&A, earlier discussion)