|
iPXE
|
Elliptic curves. More...
#include <assert.h>#include <errno.h>#include <string.h>#include <ipxe/crypto.h>#include <ipxe/elliptic.h>Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| int | elliptic_share (struct exchange_algorithm *exchange, const void *private, void *public) |
| Share public key. | |
| int | elliptic_agree (struct exchange_algorithm *exchange, const void *private, const void *partner, void *shared) |
| Agree shared secret. | |
Elliptic curves.
Definition in file elliptic.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
| int elliptic_share | ( | struct exchange_algorithm * | exchange, |
| const void * | private, | ||
| void * | public ) |
Share public key.
| exchange | Key exchange algorithm |
| private | Private key |
| public | Public key to fill in |
| rc | Return status code |
Definition at line 47 of file elliptic.c.
References assert, elliptic_curve::base, ELLIPTIC_FORMAT_UNCOMPRESSED, elliptic_multiply(), elliptic_uncompressed_t, elliptic_curve::keysize, len, elliptic_curve::pointsize, exchange_algorithm::priv, exchange_algorithm::privsize, exchange_algorithm::pubsize, rc, result, and exchange_algorithm::sharedsize.
| int elliptic_agree | ( | struct exchange_algorithm * | exchange, |
| const void * | private, | ||
| const void * | partner, | ||
| void * | shared ) |
Agree shared secret.
| exchange | Key exchange algorithm |
| private | Private key |
| partner | Partner public key |
| shared | Shared secret to fill in |
| rc | Return status code |
Definition at line 80 of file elliptic.c.
References assert, base, ELLIPTIC_FORMAT_UNCOMPRESSED, elliptic_is_infinity(), elliptic_multiply(), elliptic_uncompressed_t, EPERM, elliptic_curve::keysize, len, memcpy(), partner, elliptic_curve::pointsize, exchange_algorithm::priv, exchange_algorithm::privsize, exchange_algorithm::pubsize, rc, result, and exchange_algorithm::sharedsize.