2

I am trying to use the ECDsa Class in System.Security.Cryptography, but need to generate deterministic signatures.

Some libraries like bouncycastle implement something that looks like this

ECDsaSigner signer = new ECDsaSigner(new HMacDsaKCalculator(new Sha256Digest()));

Where the ECDsaSigner takes an object which allows you to control K to some degree.

Is there some way to use the ECDsa Class in System.Security.Cryptography and control K ?

Warrick FitzGerald
  • 2,455
  • 3
  • 23
  • 31
  • 2
    As far as I know deterministic ECDSA (see RFC 6979) is not supported in .NET out of the box, i.e. for this you need a third party library, e.g. BouncyCastle. – Topaco Aug 10 '21 at 14:49
  • 1
    agreed, not exposed, if it were you should use the hash of the message or equiv. Anyway, try EdDSA its usually deterministic. – Woodstock Aug 10 '21 at 15:36
  • Thanks you both, it does seem that you're correct. – Warrick FitzGerald Aug 16 '21 at 18:26

0 Answers0