Repository navigation
Allow ML-DSA account keys - #570
Conversation
| return acme.MalformedProblem(fmt.Sprintf( | ||
| "JWS signature header algorithm %s does not match expected algorithm %s for JWK", | ||
| jwsAlgorithm, algorithm)) |
There was a problem hiding this comment.
This change LGTM. Noting for posterity that we check that the JWS's alg field is acceptable, and return BadSignatureAlgorithmProblem if it is not, when first parsing the JWS.
| return acme.MalformedProblem(fmt.Sprintf( | ||
| "JWK key header algorithm %s does not match expected algorithm %s for JWK", | ||
| key.Algorithm, algorithm)) |
There was a problem hiding this comment.
However, this removes the only place where Pebble currently returns BadPublicKeyProblem. I think I agree that this is not the right place to do it, but I don't think that removing it entirely is right, either.
We should have a list of acceptable JWK algorithms, and we should check against that list when we get a pubkey. This should probably happen in extractJWK, i.e. when we're first being presented with a JWK during new account creation or during account key rollover.
There was a problem hiding this comment.
BadPublicKeyProblem is returned above after checking the algorithmForKey. Which also matches the logic in boulder.
It might be too lax after the last commit, as algorithmForKey doesn't explicitly test all 3 possible ML-DSA parameter sets. However, I found that go-jose already rejects unsupported AKP algs before we even see the parsed jwk in pebble.
There was a problem hiding this comment.
Aha, you're right. RFC 8555 wants us to return BadPublicKey when the server "does not support or chooses to reject the public key jwk". I think it would be much cleaner to do that when we're actually parsing the key out of the POST, not when we're trying to check for key-to-algorithm correspondence. But I think it's reasonable to say that that's out of scope for this PR, and the status quo is fine for now.
(For what it's worth, matching Boulder's logic is explicitly not a goal for Pebble. We want Pebble to be spec-compliant, but lean towards having Pebble behave differently from Boulder any time there's room for variation. This helps ensure that ACME clients don't over-index on Boulder's specific implementation. For example, this PR is going to allow all three sizes of ML-DSA keys; Boulder is only going to allow ML-DSA-44.)
For any key of type AKP, "alg" must be present and must match the key algorithm or parameter set. go-jose validates this when parsing JWK from JSON and guarantees that the Algorithm value is correct.
f81760b to
2d3c1a2
Compare
|
On a slightly related note, I see that |
Yep! |
Based on #568; will rebase and mark as ready once it's merged.
Tested with one client. I haven't seen post-quantum algorithms support in other popular clients, hopefully this will motivate more people to work on it.