This adds crypto::backend functions for generating P256 keys and signing with ECDSA P256 SHA256.
The "Add Credential" function in the Virtual Authenticator API (https://w3c.github.io/webauthn/#sctn-automation-add-credential) provides the private key as an RFC 5958 PrivateKeyInfo. I've made ecdsa_p256_sha256_sign_raw a public function within the crypto module since it already acts on PrivateKeyInfos. If we start signing outside of tests, then we'll want a richer type for wrapping private keys. But we'll probably use EncryptedPrivateKeyInfo instead, so I'm going to defer locking in those details.
This adds
crypto::backend
functions for generating P256 keys and signing with ECDSA P256 SHA256.The "Add Credential" function in the Virtual Authenticator API (https://w3c.github.io/webauthn/#sctn-automation-add-credential) provides the private key as an RFC 5958
PrivateKeyInfo
. I've madeecdsa_p256_sha256_sign_raw
a public function within the crypto module since it already acts onPrivateKeyInfo
s. If we start signing outside of tests, then we'll want a richer type for wrapping private keys. But we'll probably useEncryptedPrivateKeyInfo
instead, so I'm going to defer locking in those details.Depends on #278 and https://github.com/mozilla/nss-gk-api/pull/8.