kanidm / webauthn-rs

An implementation of webauthn components for Rustlang servers
Mozilla Public License 2.0
488 stars 80 forks source link

[Discussion] What order should COSEAlgorithms be in secure_algs and all_possible_algs? #404

Closed zacknewman closed 9 months ago

zacknewman commented 9 months ago

While the example in RFC 9053 shows EdDSA curves as prioritized over ECDSA curves, it is not a formal recommendation let alone requirement. I cannot seem to find any RFC or other specification related to WebAuthn, CBOR, or JOSE that specifies what order of algorithms SHOULD/MUST be used yet.

WebAuthn Level 3 appears will have Ed25519, ES256, and RSA256; but that is not yet official.

I'd like to start a discussion around what should be the order of webauthn-rs-proto::cose::COSEAlgorithms in the returned alloc::vec::Vecs from COSEAlgorithm::secure_algs and COSEAlgorithm::all_possible_algs.

I believe—once my diff is merged—the order should follow this hypothetical spec if for no other reason forward compatibility. Even in the unlikely case the spec will not state what order algorithms should be preferred in, I still think the order should be as stated. Why?