mirror of
https://github.com/ipxe/ipxe
synced 2026-05-20 05:09:59 +03:00
0c617b9132
Add support for the RSA-PSS signature scheme as defined in RFC 8017 and required for TLS version 1.3. Signature verification is deliberately implemented by first deriving the salt value and then reconstructing the entire expected signature. This is arguably inefficient since it involves two invocations of the mask generation function when only one is required. However, this implementation approach keeps the code size minimal (since there is no need to implement separate verification logic), and makes it provably impossible to accidentally omit a verification step (such as checking the leading zero bits or the fixed 0x01 or 0xbc bytes). Since signature verification is not a fast-path operation, the guaranteed correctness is more valuable than a marginally faster execution. Signed-off-by: Michael Brown <mcb30@ipxe.org>