Intel® Enhanced Privacy ID SDK 2.0.0

Functions
ecdsa
epid » common » math

Elliptic Curve Digital Signature Algorithm Primitives. More...

## Functions
EpidStatus | EcdsaVerifyBuffer (void const *buf, size_t buf_len, EcdsaPublicKey const *pubkey, EcdsaSignature const *sig)
| Verifies authenticity of a digital signature over a buffer. More...
EpidStatus | EcdsaSignBuffer (void const *buf, size_t buf_len, EcdsaPrivateKey const *privkey, BitSupplier rnd_func, void *rnd_param, EcdsaSignature *sig)
| Creates ECDSA signature of buffer. More...

## Detailed Description

Elliptic Curve Digital Signature Algorithm Primitives.

Provides APIs for computing and checking buffer signatures using the Elliptic Curve Digital Signature Algorithm.

## Function Documentation

EpidStatus EcdsaSignBuffer | ( | void const * | buf,
|  | size_t | buf_len,
|  | EcdsaPrivateKey const * | privkey,
|  | BitSupplier | rnd_func,
|  | void * | rnd_param,
|  | EcdsaSignature * | sig
| ) |  |

Creates ECDSA signature of buffer.

Uses Elliptic Curve Digital Signature Algorithm (ECDSA) to generate a signature of the SHA256 hash of the input buffer with the provided private key.

The operation is over the standard secp256r1 curve.

Parameters

  [in] | buf | Pointer to buffer containing message to sign.
  [in] | buf_len | The size of buf in bytes.
  [in] | privkey | The ECDSA private key on secp256r1 curve.
  [in] | rnd_func | Random number generator.
  [in] | rnd_param | Pass through context data for rnd_func.
  [out] | sig | The resulting ECDSA signature.

Returns
  EpidStatus

Return values

  kEpidRandMaxIterErr | Failed to sign after maximum number of iterations due to bad luck in random number generation.

See also
  EcdsaSignBuffer

EpidStatus EcdsaVerifyBuffer | ( | void const * | buf,
|  | size_t | buf_len,
|  | EcdsaPublicKey const * | pubkey,
|  | EcdsaSignature const * | sig
| ) |  |

Verifies authenticity of a digital signature over a buffer.

Uses Elliptic Curve Digital Signature Algorithm (ECDSA) to verify that the SHA256 hash of the input buffer was signed with the private key corresponding to the provided public key.

The operation is over the standard secp256r1 curve.

Warning
  It is the responsibility of the caller to verify the identity of the public key.

Parameters

  [in] | buf | Pointer to buffer containing message to verify.
  [in] | buf_len | The size of buf in bytes.
  [in] | pubkey | The ECDSA public key on secp256r1 curve.
  [in] | sig | The ECDSA signature to be verified.

Returns
  EpidStatus

Return values

  kEpidSigValid | EcdsaSignature is valid for the given buffer.
  kEpidSigInvalid | EcdsaSignature is invalid for the given buffer.

See also
  EcdsaSignBuffer