Thanks. That part has an interesting history, and it explains why "just compare two signatures" is a stronger check than it looks.
Nonce reuse is the failure that keeps killing people. Sony signed PS3 firmware with a fixed k and the master key fell out of two signatures. The Android SecureRandom bug in 2013 drained Bitcoin wallets by the same mechanism. Blockchain-wide scans have since pulled thousands of keys straight out of the chain from repeated or biased nonces. In every case the private key was never leaked — it was computed, from signatures the victim published themselves.
RFC6979 exists because of that track record. Make the nonce a deterministic function of the key and the message, and there is no randomness left to get wrong. No entropy pool, no RNG, nothing to backdoor at signing time.
The part worth appreciating is that determinism is the rare security property a user can actually verify from outside. You cannot check that an RNG is good — that is the whole problem. But "same input, same output" is checkable by anyone, with no special tools and no cooperation from the vendor.
One practical note if you run it: compare the signature field specifically, not the whole serialised PSBT. Some tools add or reorder metadata between runs, so a byte-diff of the entire file can show differences that have nothing to do with the nonce. The DER signature on the input is the thing that must be identical.
And the limit I would keep in view: this catches an accidental leak, not a deliberate one. A signer intent on exfiltrating could bias nonces while still looking deterministic to a two-sample check — grinding the nonce so its low bits encode key material, for instance. That is what anti-exfiltration protocols address, where the host contributes randomness and then verifies the signature actually used it. Firmware bug and backdoor are different threat models, and the double-sign test is aimed squarely at the first.