mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 18:11:49 +03:00
[crypto] Add Ephemeral Diffie-Hellman key exchange algorithm
Add an implementation of the Ephemeral Diffie-Hellman key exchange algorithm as defined in RFC2631, with test vectors taken from the NIST Cryptographic Toolkit. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
19
src/include/ipxe/dhe.h
Normal file
19
src/include/ipxe/dhe.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _IPXE_DHE_H
|
||||
#define _IPXE_DHE_H
|
||||
|
||||
/** @file
|
||||
*
|
||||
* Ephemeral Diffie-Hellman key exchange
|
||||
*
|
||||
*/
|
||||
|
||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern int dhe_key ( const void *modulus, size_t len, const void *generator,
|
||||
size_t generator_len, const void *partner,
|
||||
size_t partner_len, const void *private,
|
||||
size_t private_len, void *public, void *shared );
|
||||
|
||||
#endif /* _IPXE_DHE_H */
|
||||
@@ -400,6 +400,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
#define ERRFILE_linux_acpi ( ERRFILE_OTHER | 0x00570000 )
|
||||
#define ERRFILE_dynkeymap ( ERRFILE_OTHER | 0x00580000 )
|
||||
#define ERRFILE_pci_cmd ( ERRFILE_OTHER | 0x00590000 )
|
||||
#define ERRFILE_dhe ( ERRFILE_OTHER | 0x005a0000 )
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user