iPXE
|
A public key algorithm. More...
#include <crypto.h>
Data Fields | |
const char * | name |
Algorithm name. More... | |
size_t(* | max_len )(const struct asn1_cursor *key) |
Calculate maximum output length. More... | |
int(* | encrypt )(const struct asn1_cursor *key, const void *data, size_t len, void *out) |
Encrypt. More... | |
int(* | decrypt )(const struct asn1_cursor *key, const void *data, size_t len, void *out) |
Decrypt. More... | |
int(* | sign )(const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, void *signature) |
Sign digest value. More... | |
int(* | verify )(const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, const void *signature, size_t signature_len) |
Verify signed digest value. More... | |
int(* | match )(const struct asn1_cursor *private_key, const struct asn1_cursor *public_key) |
Check that public key matches private key. More... | |
const char* pubkey_algorithm::name |
Algorithm name.
Definition at line 123 of file crypto.h.
Referenced by tls_select_cipher(), tls_send_certificate_verify(), and tls_verify_dh_params().
size_t( * pubkey_algorithm::max_len) (const struct asn1_cursor *key) |
Calculate maximum output length.
key | Key |
max_len | Maximum output length |
Definition at line 129 of file crypto.h.
Referenced by pubkey_max_len(), pubkey_okx(), and tls_send_client_key_exchange_pubkey().
int( * pubkey_algorithm::encrypt) (const struct asn1_cursor *key, const void *data, size_t len, void *out) |
Encrypt.
key | Key |
plaintext | Plaintext |
plaintext_len | Length of plaintext |
ciphertext | Ciphertext |
ciphertext_len | Length of ciphertext, or negative error |
Definition at line 138 of file crypto.h.
Referenced by pubkey_encrypt().
int( * pubkey_algorithm::decrypt) (const struct asn1_cursor *key, const void *data, size_t len, void *out) |
Decrypt.
key | Key |
ciphertext | Ciphertext |
ciphertext_len | Ciphertext length |
plaintext | Plaintext |
plaintext_len | Plaintext length, or negative error |
Definition at line 148 of file crypto.h.
Referenced by pubkey_decrypt().
int( * pubkey_algorithm::sign) (const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, void *signature) |
Sign digest value.
key | Key |
digest | Digest algorithm |
value | Digest value |
signature | Signature |
signature_len | Signature length, or negative error |
Definition at line 158 of file crypto.h.
Referenced by pubkey_sign().
int( * pubkey_algorithm::verify) (const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, const void *signature, size_t signature_len) |
Verify signed digest value.
key | Key |
digest | Digest algorithm |
value | Digest value |
signature | Signature |
signature_len | Signature length |
rc | Return status code |
Definition at line 170 of file crypto.h.
Referenced by pubkey_verify().
int( * pubkey_algorithm::match) (const struct asn1_cursor *private_key, const struct asn1_cursor *public_key) |
Check that public key matches private key.
private_key | Private key |
public_key | Public key |
rc | Return status code |
Definition at line 179 of file crypto.h.
Referenced by pubkey_match().