I am using an HSM which signs bytes using the secp256k1 curve. For a given set of input bytes, I blake2b hash them and sign them.
My understanding is that most cryptocurrencies use deterministic signatures (RFC 6979) in order to prevent transaction malleability. The particular HSM I am using does not generate deterministic signatures and instead chooses a random
k which results varying
Is there any way to get this set up to generate a valid signature for Tezos? Specifically:
- Does Tezos require deterministic signatures?
- If yes, is it possible to generate a deterministic signature from a non-deterministicly chosen
s, the input bytes, and the public key?
I've been able to determine that Tezos will accept a non-deterministic signature.
However, sometimes I receive an
r or an
s value that is 33 bytes long. Is there a way to normalize these values to 32 bytes? It appears that Tezos will only accept two 32 byte values.