diff options
author | Michael Brown | 2024-01-30 14:14:21 +0100 |
---|---|---|
committer | Michael Brown | 2024-01-30 14:21:01 +0100 |
commit | 27398f136030efb8845c45fbe154e544feefd7e5 (patch) | |
tree | 11a7010a065c90bb0e0cd8040a158cf9cb41e09c /src/include/ipxe/errfile.h | |
parent | [bnxt] Add support for additional chip IDs (diff) | |
download | ipxe-27398f136030efb8845c45fbe154e544feefd7e5.tar.gz ipxe-27398f136030efb8845c45fbe154e544feefd7e5.tar.xz ipxe-27398f136030efb8845c45fbe154e544feefd7e5.zip |
[crypto] Check for all-zeros result from X25519 key exchange
RFC7748 states that it is entirely optional for X25519 Diffie-Hellman
implementations to check whether or not the result is the all-zero
value (indicating that an attacker sent a malicious public key with a
small order). RFC8422 states that implementations in TLS must abort
the handshake if the all-zero value is obtained.
Return an error if the all-zero value is obtained, so that the TLS
code will not require knowledge specific to the X25519 curve.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/errfile.h')
-rw-r--r-- | src/include/ipxe/errfile.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h index 320835a3..060a42a3 100644 --- a/src/include/ipxe/errfile.h +++ b/src/include/ipxe/errfile.h @@ -407,6 +407,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #define ERRFILE_efi_rng ( ERRFILE_OTHER | 0x005c0000 ) #define ERRFILE_efi_shim ( ERRFILE_OTHER | 0x005d0000 ) #define ERRFILE_efi_settings ( ERRFILE_OTHER | 0x005e0000 ) +#define ERRFILE_x25519 ( ERRFILE_OTHER | 0x005f0000 ) /** @} */ |