|
iPXE
|
Elliptic curves. More...
Go to the source code of this file.
Macros | |
| #define | elliptic_uncompressed_t(len) |
| An uncompressed elliptic curve point. | |
| #define | ELLIPTIC_FORMAT_UNCOMPRESSED 0x04 |
| Format byte for uncompressed curve point representation. | |
| #define | ELLIPTIC_EXCHANGE(_name, _exchange, _len, _curve) |
| Define an uncompressed elliptic curve point key exchange algorithm. | |
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.h.
| #define elliptic_uncompressed_t | ( | len | ) |
An uncompressed elliptic curve point.
Definition at line 17 of file elliptic.h.
Referenced by elliptic_agree(), and elliptic_share().
| #define ELLIPTIC_FORMAT_UNCOMPRESSED 0x04 |
Format byte for uncompressed curve point representation.
Definition at line 30 of file elliptic.h.
Referenced by elliptic_agree(), and elliptic_share().
| #define ELLIPTIC_EXCHANGE | ( | _name, | |
| _exchange, | |||
| _len, | |||
| _curve ) |
Define an uncompressed elliptic curve point key exchange algorithm.
Definition at line 39 of file elliptic.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
extern |
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.
|
extern |
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.