I need to recover public keys on the bitcoin chain for a project, my current flow is like this: Get hash + signature from bigquery -> Use nodeJS secp256k1 module (native bindings) to import signature from DER signature -> recover public key from signature and hash-> verify public key against signature and hash. The problem is, only about half of the public keys verify. Initially I thought it's either y-coordinate issues or issues with the recid number, but as far as I can tell, neither is the case. Oddities that I have found: No matter whether I put 0 or 1 as recid, either both (different) recovered public keys verify, or neither do. DER Signatures with a 144 hex length (72 bytes) never have their recovered public keys verify, while shorter signatures become increasingly more likely to correctly verify. My code: var uintsig = Uint8Array.from(Buffer.from(textasm, 'hex')); var uinthash = Uint8Array.from(Buffer.from(texthash, 'hex')); var sig ...