0

Fix Ed25519 COSE algorithm identifier in virtual FIDO device

In what appears to be a copy-paste error, the GetPublicKey method for
Ed25519PrivateKey returns a public key with the RS256 identifier. This
patch is a one-line fix changing RS256 to EdDSA.

Bug: None
Change-Id: I104f150fbf39eb9ae344a0b695f26de8963a0845
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5838716
Reviewed-by: Adam Langley <agl@chromium.org>
Reviewed-by: Nina Satragno <nsatragno@chromium.org>
Commit-Queue: Adam Langley <agl@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1352334}
This commit is contained in:
Spencer Wilson
2024-09-06 22:22:34 +00:00
committed by Chromium LUCI CQ
parent 188776d7f2
commit 6443fadd6a
2 changed files with 2 additions and 1 deletions

@ -1339,6 +1339,7 @@ Sooho Park <sooho1000@gmail.com>
Soojung Choi <crystal2840@gmail.com>
Soorya R <soorya.r@samsung.com>
Soren Dreijer <dreijerbit@gmail.com>
Spencer Wilson <spencer@spencerwilson.org>
Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Srirama Chandra Sekhar Mogali <srirama.m@samsung.com>
Stacy Kim <stacy.kim@ucla.edu>

@ -237,7 +237,7 @@ class Ed25519PrivateKey : public EVPBackedPrivateKey {
EVP_marshal_public_key>(pkey_.get()));
return std::make_unique<PublicKey>(
static_cast<int32_t>(CoseAlgorithmIdentifier::kRs256), *cbor_bytes,
static_cast<int32_t>(CoseAlgorithmIdentifier::kEdDSA), *cbor_bytes,
std::move(der_bytes));
}