digitalbazaar / http-signature-header

BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Make algorithm default to `hs2019` #23

Closed aljones15 closed 3 years ago

aljones15 commented 4 years ago

"algorithm" RECOMMENDED. The "algorithm" parameter contains the name of the signature's Algorithm, as registered in the HTTP Signature Algorithms Registry defined by this document. Verifiers MUST determine the signature's Algorithm from the "keyId" parameter rather than from "algorithm". If "algorithm" is provided and differs from or is incompatible with the algorithm or key material identified by "keyId" (for example, "algorithm" has a value of "rsa-sha256" but "keyId" identifies an EdDSA key), then implementations MUST produce an error. Implementers should note that previous versions of this specification determined the signature's Algorithm using the "algorithm" parameter only, and thus could be utilized by attackers to expose security vulnerabilities. The default value for this parameter is "hs2019". https://tools.ietf.org/html/draft-ietf-httpbis-message-signatures-00#section-4.1

Algorithm is not required, but defaults to hs2019

   If the signature's Algorithm name does not start with "rsa",
   "hmac", or "ecdsa", signers SHOULD include "(created)" and
   "(request-target)" in the list.

If the signature's Algorithm starts with "rsa", "hmac", or "ecdsa", signers SHOULD include "date" and "(request-target)" in the list.

aljones15 commented 3 years ago

NOTE: this appears to be a feature in version 13 of the spec.

aljones15 commented 3 years ago

closing this as this version of the spec is no longer relevant.