-1

The Signing Data with CNG example, shows how to sign and verify using ECDSA.

I changed the code:
BCRYPT_ECDSA_P256_ALGORITHM to BCRYPT_ECDH_P256_ALGORITHM
NCRYPT_ECDSA_P256_ALGORITHM to NCRYPT_ECDH_P256_ALGORITHM

However, the signature verification fails. I can not imagine why it does not work.

I am using Windows 7 64 bits; Visual Studio 2010; Debug; win32 mode.

Articles are very welcome.

Cobaia
  • 1,503
  • 3
  • 22
  • 41

1 Answers1

1

ECDH is not a signature algorithm. Therefore, you cannot sign with it.

President James K. Polk
  • 40,516
  • 21
  • 95
  • 125