1

The private and public key blobs generated by BcryptGenerateKeyPair are big-endian encoded (http://msdn.microsoft.com/en-us/library/windows/desktop/aa375520%28v=vs.85%29.aspx).

Using these keys, i sign a data using BcryptSignHash and generate a 64-byte signature which ideally should be (r,s). Is this signature also big-endian encoded?

I need this information to extract r and s from 64-byte signature. I am assuming 64-byte signature to be concatenation of r (first 32 bytes) and s (last 32 bytes).

Please correct me if am wrong

Fazlin
  • 2,285
  • 17
  • 29

1 Answers1

1

For DSA signatures, yes the signature output from BCryptSignHash is as you describe, namely (r,s) in big-endian format.

(I've had to extract these values in the past when interoperating with OpenSSL).

softwariness
  • 4,022
  • 4
  • 33
  • 41