mirror of
https://github.com/apple/swift-certificates
synced 2026-11-22 04:20:39 +00:00
Motivation We have a check that requires that the bit strings for Ed25519 signatures don't have any padding bits. That check is good, but the same check should have been applied to all the signatures, and it wasn't. There is no particular security risk with this: while it allows moderate signature malleability (as we accept multiple signatures that have different bits as equally valid), there is no way we can conceive of to launch an attack based on this malleability: the signature itself needs to remain valid. The only note is that the representation differs. Modifications Centralise the check and apply it to all the code paths. Make sure the OCSP code doesn't lose track of whether there was any padding. Add tests for the OCSP verifier and the signature code directly. Result No more signature malleability.