iPXE
|
Cryptographic API. More...
Go to the source code of this file.
Data Structures | |
struct | digest_algorithm |
A message digest algorithm. More... | |
struct | cipher_algorithm |
A cipher algorithm. More... | |
struct | pubkey_algorithm |
A public key algorithm. More... | |
Macros | |
#define | cipher_encrypt(cipher, ctx, src, dst, len) |
#define | cipher_decrypt(cipher, ctx, src, dst, len) |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | digest_init (struct digest_algorithm *digest, void *ctx) |
static void | digest_update (struct digest_algorithm *digest, void *ctx, const void *data, size_t len) |
static void | digest_final (struct digest_algorithm *digest, void *ctx, void *out) |
static int | cipher_setkey (struct cipher_algorithm *cipher, void *ctx, const void *key, size_t keylen) |
static void | cipher_setiv (struct cipher_algorithm *cipher, void *ctx, const void *iv) |
static void | cipher_encrypt (struct cipher_algorithm *cipher, void *ctx, const void *src, void *dst, size_t len) |
static void | cipher_decrypt (struct cipher_algorithm *cipher, void *ctx, const void *src, void *dst, size_t len) |
static int | is_stream_cipher (struct cipher_algorithm *cipher) |
static int | pubkey_init (struct pubkey_algorithm *pubkey, void *ctx, const void *key, size_t key_len) |
static size_t | pubkey_max_len (struct pubkey_algorithm *pubkey, void *ctx) |
static int | pubkey_encrypt (struct pubkey_algorithm *pubkey, void *ctx, const void *data, size_t len, void *out) |
static int | pubkey_decrypt (struct pubkey_algorithm *pubkey, void *ctx, const void *data, size_t len, void *out) |
static int | pubkey_sign (struct pubkey_algorithm *pubkey, void *ctx, struct digest_algorithm *digest, const void *value, void *signature) |
static int | pubkey_verify (struct pubkey_algorithm *pubkey, void *ctx, struct digest_algorithm *digest, const void *value, const void *signature, size_t signature_len) |
static void | pubkey_final (struct pubkey_algorithm *pubkey, void *ctx) |
static int | pubkey_match (struct pubkey_algorithm *pubkey, const void *private_key, size_t private_key_len, const void *public_key, size_t public_key_len) |
Variables | |
struct digest_algorithm | digest_null |
struct cipher_algorithm | cipher_null |
struct pubkey_algorithm | pubkey_null |
Cryptographic API.
Definition in file crypto.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Definition at line 172 of file crypto.h.
Referenced by asn1_okx(), chap_init(), cms_digest(), dbg_md5_da(), digest_cost(), digest_exec(), digest_frag_okx(), hash_df(), hmac_final(), hmac_init(), hmac_reduce_key(), http_digest_init(), icert_cert(), md5_sha1_init(), ntlm_key(), ocsp_check_signature(), ocsp_compare_responder_key_hash(), ocsp_request(), peerblk_reset(), peerdist_info_passphrase_okx(), tls_restart(), x509_check_signature(), and x509_fingerprint().
|
inlinestatic |
Definition at line 177 of file crypto.h.
References ctx, data, digest, and len.
Referenced by asn1_okx(), chap_update(), cms_digest(), dbg_md5_da(), digest_cost(), digest_exec(), digest_frag_okx(), hash_df(), hmac_final(), hmac_init(), hmac_reduce_key(), hmac_update(), http_digest_update(), icert_cert(), md5_sha1_update(), ntlm_key(), ocsp_check_signature(), ocsp_compare_responder_key_hash(), ocsp_request(), peerblk_decrypt(), peerblk_raw_rx(), peerdist_info_passphrase_okx(), tls_add_handshake(), x509_check_signature(), and x509_fingerprint().
|
inlinestatic |
Definition at line 182 of file crypto.h.
References ctx, digest, and out.
Referenced by asn1_okx(), chap_respond(), cms_digest(), dbg_md5_da(), digest_cost(), digest_exec(), digest_frag_okx(), hash_df(), hmac_final(), hmac_reduce_key(), http_digest_final(), icert_cert(), md5_sha1_final(), ntlm_key(), ocsp_check_signature(), ocsp_compare_responder_key_hash(), ocsp_request(), peerblk_done(), peerdist_info_passphrase_okx(), tls_verify_handshake(), x509_check_signature(), and x509_fingerprint().
|
inlinestatic |
Definition at line 187 of file crypto.h.
References ctx, key, and cipher_algorithm::setkey.
Referenced by aes_unwrap(), aes_wrap(), cbc_setkey(), ccmp_init(), cipher_cost(), cipher_decrypt_okx(), cipher_encrypt_okx(), peerblk_parse_header(), tkip_decrypt(), tkip_encrypt(), tls_generate_keys(), wep_decrypt(), and wep_encrypt().
|
inlinestatic |
Definition at line 192 of file crypto.h.
References ctx, iv, and cipher_algorithm::setiv.
Referenced by cipher_cost(), cipher_decrypt_okx(), cipher_encrypt_okx(), peerblk_parse_iv(), and tls_generate_keys().
|
inlinestatic |
Definition at line 197 of file crypto.h.
References ctx, cipher_algorithm::encrypt, len, and src.
|
inlinestatic |
Definition at line 207 of file crypto.h.
References ctx, cipher_algorithm::decrypt, len, and src.
|
inlinestatic |
Definition at line 217 of file crypto.h.
References cipher_algorithm::blocksize.
Referenced by tls_new_ciphertext(), and tls_send_plaintext().
|
inlinestatic |
Definition at line 221 of file crypto.h.
References ctx, pubkey_algorithm::init, and key.
Referenced by cms_verify_digest(), icert_cert(), ocsp_check_signature(), tls_send_certificate_verify(), tls_validator_done(), and x509_check_signature().
|
inlinestatic |
Definition at line 226 of file crypto.h.
References ctx, and pubkey_algorithm::max_len.
Referenced by icert_cert(), tls_send_certificate_verify(), and tls_send_client_key_exchange().
|
inlinestatic |
Definition at line 231 of file crypto.h.
References ctx, data, pubkey_algorithm::encrypt, len, and out.
Referenced by tls_send_client_key_exchange().
|
inlinestatic |
Definition at line 236 of file crypto.h.
References ctx, data, pubkey_algorithm::decrypt, len, and out.
|
inlinestatic |
Definition at line 241 of file crypto.h.
References ctx, digest, pubkey_algorithm::sign, signature, and value.
Referenced by icert_cert(), and tls_send_certificate_verify().
|
inlinestatic |
Definition at line 247 of file crypto.h.
References ctx, digest, signature, value, and pubkey_algorithm::verify.
Referenced by cms_verify_digest(), ocsp_check_signature(), and x509_check_signature().
|
inlinestatic |
Definition at line 254 of file crypto.h.
References ctx, and pubkey_algorithm::final.
Referenced by cms_verify_digest(), icert_cert(), ocsp_check_signature(), tls_clear_cipher(), tls_send_certificate_verify(), and x509_check_signature().
|
inlinestatic |
Definition at line 258 of file crypto.h.
References pubkey_algorithm::match, and private_key_len.
Referenced by certstore_find_key().
struct digest_algorithm digest_null |
Definition at line 48 of file crypto_null.c.
struct cipher_algorithm cipher_null |
Definition at line 79 of file crypto_null.c.
struct pubkey_algorithm pubkey_null |
Definition at line 131 of file crypto_null.c.