Schnorr signing and 4x64 scalar multiplication leave local temporaries uncleared after their last use. These temporaries can retain information from which the secret key can be recovered if an attacker can read the residual memory.
- Clear the Schnorr signing accumulator
eafter its final use. On success it holds the public signature scalar, but with a valid keypair and a failing nonce callback or a nonce that reduces to zero, signing continues with the dummy noncek = 1. The signature output is erased on failure whileeretains1 + challenge * skmodulo the group order. Given the message and public key, this value permits key recovery when the challenge is nonzero. - Clear the 4x64 scalar multiplication buffer
l[8]immediately after reduction. It contains the full 512-bit product and is separate from the signing accumulator. During ordinary successful Schnorr signing, it can retainchallenge * sk, which also permits key recovery given the public nonzero challenge.
Both commits use the existing compiler-resistant clearing primitives. The accumulator change applies across scalar backends; the multiplication-buffer change is specific to 4x64.