iPXE
|
Ephemeral Diffie-Hellman key exchange. More...
#include <stdint.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
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) |
Calculate Diffie-Hellman key. More... | |
Ephemeral Diffie-Hellman key exchange.
Definition in file dhe.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
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 | ||
) |
Calculate Diffie-Hellman key.
modulus | Prime modulus |
len | Length of prime modulus |
generator | Generator |
generator_len | Length of generator |
partner | Partner public key |
partner_len | Length of partner public key |
private | Private key |
private_len | Length of private key |
public | Public key (length equal to prime modulus) |
shared | Shared secret (length equal to prime modulus) |
rc | Return status code |
Definition at line 53 of file dhe.c.
References __attribute__, bigint_done, bigint_init, bigint_mod_exp, bigint_mod_exp_tmp_len, bigint_required_size, bigint_t(), ctx, DBGC, DBGC2, DBGC2_HDA, EINVAL, ENOMEM, free, len, malloc(), partner, rc, result, size, and tmp.
Referenced by dhe_key_okx(), and tls_send_client_key_exchange_dhe().