Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

leanSPHINCS

The second authorization method is a stateless hash-based signature on a digest of the transaction, made outside the proof and verified inside the host’s transaction. The signature and the public key are witnesses, which the zero-knowledge fold hides, so spends stay unlinkable and no re-randomized signature is needed. The scheme is leanSPHINCS, the signature of post-quantum Ethereum [EIP-8288] [Lit26]. A signature is 4,276 bytes with [Wam26]’s pruned key of lifetime , the configuration priced here, 6,332 with its layered forest key, and 7,740 with Ethereum’s provisional set. Signing is hashing alone. The pruned key adds 16,384 grinding digests per signature, and its proved lifetime is 126,900 signatures, one per transaction. The grind is the signer’s, since it is keyed and the key cannot leave the signer without revealing which leaves it kept; a full tree with a helper building and storing it has no grind, which Hardware wallets takes up.

The message

Since the signature is made outside the proof, its message has to bind the transaction’s effecting data. In Zoodles it is a BLAKE3 digest of them: each spend’s two nullifiers, each output’s commitment, the change commitment, the fee, and the epoch, 235 bytes or 4 compressions. The digest is a PCD header value: an authorization node verifies the signature over it, once for each spending key and not once a spend (Spend authorization), and the fee step recomputes it from the nullifiers and commitments that its children’s headers carry. The verification, not the digest, is the expensive part of the method. In ZIP 2005’s Recovery Statement [ZIP-2005] the message is the SigHash.

The verifier in the circuit

The host proves the verifier inside its transaction: 298 BLAKE3 or BLAKE2s compressions, or 262 Keccak-f permutations, for the pruned key, against 462 compressions or 408 permutations for the layered one and 515 permutations for Ethereum’s. XOR is not free in a digit arithmetization, so in Kishu a BLAKE3 compression is 11,344 committed bits, a BLAKE2s compression 16,096, and a Keccak-f permutation 92,160. The verifier is therefore 3.39 million digits with BLAKE3 and 4.81 million with BLAKE2s, so BLAKE3’s is 71 percent of BLAKE2s’s, since its compression has seven rounds to BLAKE2s’s ten. With Keccak it is 24.2 million, 5.0 times BLAKE2s’s, which is Ethereum’s open hash question seen from the circuit. In a Boolean circuit with XOR free the Keccak-to-BLAKE2s ratio is 2.3. With zero knowledge Kishu proves the BLAKE3 verifier in 0.0961 s on one M4 core in a step of  digits, the BLAKE2s one in 0.121 s in a step of  digits, and the Keccak one in 0.674 s in a step of  digits, beside 0.0860 s for the recovery circuit itself. Ethereum’s draft fixes Keccak-256 as the scheme’s only primitive, and the circuit and the device both argue against it. If Ethereum keeps Keccak, there is no compatibility to gain from BLAKE2s either, and the choice is between Keccak and BLAKE3, Zoodles’ own hash and the cheapest of the three in the circuit. On the device BLAKE3’s compression has fewer rounds than BLAKE2s’s, though [Wam26]’s benchmark did not measure it.

References