WebCrypto AlgorithmIdentifier for ECDSA signing w/SECP256R1 & SHA-256 ?

Hi,

how does one specify a WebCrypto AlgorithmIdentifier such that it
represents "sign operation using ECDSA key on SECP256R1 curve with SHA-256
hash" ?

Here's my guess:

  // WebCrytpo AlgorithmIdentifier stipulating:
  //
  //  "sign operation using ECDSA key on SECP256R1 curve with SHA-256 hash"
  //
  // See: http://www.w3.org/TR/WebCryptoAPI/#ecdsa
  //
  // Note: the private key used to sign MUST have been created using
  //       NIST recommended curve P-256, also known as secp256r1, and with
  //       a KeyUsage including "sign".
  //

  var algSign__ECDSA_SECP256R1_SHA256 = {
    name: "ECDSA",
    hash: "SHA-256"
  }

Is that correct, including the "Note:" in the comment ?


thanks,

=JeffH

Received on Thursday, 17 December 2015 01:03:01 UTC