Added support for ES256K algorithm.

It uses secp256k1 curve with SHA-256.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2023-08-16 12:18:42 +02:00
parent 5105545df0
commit 8ffd1bfe38
3 changed files with 11 additions and 1 deletions

View File

@@ -177,6 +177,9 @@ int cbor_make_credential(const uint8_t *data, size_t len) {
else if (pubKeyCredParams[i].alg == FIDO2_ALG_ES512) {
curve = FIDO2_CURVE_P521;
}
else if (pubKeyCredParams[i].alg == FIDO2_ALG_ES256K) {
curve = FIDO2_CURVE_P256K1;
}
else if (pubKeyCredParams[i].alg == 0) { // no present
curve = -1;
}