|
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... | |
| struct | elliptic_curve |
| An elliptic curve. 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, size_t ivlen) |
| 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 void | cipher_auth (struct cipher_algorithm *cipher, void *ctx, void *auth) |
| static int | is_stream_cipher (struct cipher_algorithm *cipher) |
| static int | is_block_cipher (struct cipher_algorithm *cipher) |
| static int | is_auth_cipher (struct cipher_algorithm *cipher) |
| static int | pubkey_encrypt (struct pubkey_algorithm *pubkey, const struct asn1_cursor *key, const struct asn1_cursor *plaintext, struct asn1_builder *ciphertext) |
| static int | pubkey_decrypt (struct pubkey_algorithm *pubkey, const struct asn1_cursor *key, const struct asn1_cursor *ciphertext, struct asn1_builder *plaintext) |
| static int | pubkey_sign (struct pubkey_algorithm *pubkey, const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, struct asn1_builder *signature) |
| static int | pubkey_verify (struct pubkey_algorithm *pubkey, const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, const struct asn1_cursor *signature) |
| static int | pubkey_match (struct pubkey_algorithm *pubkey, const struct asn1_cursor *private_key, const struct asn1_cursor *public_key) |
| static int | elliptic_multiply (struct elliptic_curve *curve, const void *base, const void *scalar, void *result) |
| void | digest_null_init (void *ctx) |
| void | digest_null_update (void *ctx, const void *src, size_t len) |
| void | digest_null_final (void *ctx, void *out) |
| int | cipher_null_setkey (void *ctx, const void *key, size_t keylen) |
| void | cipher_null_setiv (void *ctx, const void *iv, size_t ivlen) |
| void | cipher_null_encrypt (void *ctx, const void *src, void *dst, size_t len) |
| void | cipher_null_decrypt (void *ctx, const void *src, void *dst, size_t len) |
| void | cipher_null_auth (void *ctx, void *auth) |
| int | pubkey_null_encrypt (const struct asn1_cursor *key, const struct asn1_cursor *plaintext, struct asn1_builder *ciphertext) |
| int | pubkey_null_decrypt (const struct asn1_cursor *key, const struct asn1_cursor *ciphertext, struct asn1_builder *plaintext) |
| int | pubkey_null_sign (const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, struct asn1_builder *signature) |
| int | pubkey_null_verify (const struct asn1_cursor *key, struct digest_algorithm *digest, const void *value, const struct asn1_cursor *signature) |
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 196 of file crypto.h.
References ctx, and digest_algorithm::init.
Referenced by asn1_okx(), chap_init(), cms_digest(), dbg_md5_da(), digest_cost(), digest_exec(), digest_frag_okx(), hash_df(), hmac_final(), hmac_init(), http_digest_init(), icert_cert(), md5_sha1_init(), mschapv2_auth(), mschapv2_challenge_hash(), mschapv2_hash_hash(), mschapv2_password_hash(), ntlm_key(), ocsp_check_signature(), ocsp_compare_responder_key_hash(), ocsp_request(), peerblk_reset(), peerdist_info_passphrase_okx(), pubkey_sign_okx(), tls_select_handshake(), tls_verify_dh_params(), x509_check_signature(), and x509_fingerprint().
|
inlinestatic |
Definition at line 201 of file crypto.h.
References ctx, data, len, and digest_algorithm::update.
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_update(), http_digest_update(), icert_cert(), md5_sha1_update(), mschapv2_auth(), mschapv2_challenge_hash(), mschapv2_hash_hash(), mschapv2_password_hash(), ntlm_key(), ocsp_check_signature(), ocsp_compare_responder_key_hash(), ocsp_request(), peerblk_decrypt(), peerblk_raw_rx(), peerdist_info_passphrase_okx(), pubkey_sign_okx(), tls_add_handshake(), tls_verify_dh_params(), x509_check_signature(), and x509_fingerprint().
|
inlinestatic |
Definition at line 207 of file crypto.h.
References ctx, digest_algorithm::final, 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_init(), http_digest_final(), icert_cert(), md5_sha1_final(), mschapv2_auth(), mschapv2_challenge_hash(), mschapv2_hash_hash(), mschapv2_password_hash(), ntlm_key(), ocsp_check_signature(), ocsp_compare_responder_key_hash(), ocsp_request(), peerblk_done(), peerdist_info_passphrase_okx(), pubkey_sign_okx(), tls_verify_dh_params(), tls_verify_handshake(), x509_check_signature(), and x509_fingerprint().
|
inlinestatic |
Definition at line 212 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(), cms_cipher_key(), gcm_setkey(), mschapv2_challenge_response(), peerblk_parse_header(), tkip_decrypt(), tkip_encrypt(), tls_generate_keys(), wep_decrypt(), and wep_encrypt().
|
inlinestatic |
Definition at line 218 of file crypto.h.
References ctx, iv, and cipher_algorithm::setiv.
Referenced by cipher_cost(), cipher_decrypt_okx(), cipher_encrypt_okx(), cms_cipher_key(), peerblk_parse_iv(), tls_new_ciphertext(), and tls_send_record().
|
inlinestatic |
Definition at line 224 of file crypto.h.
References ctx, cipher_algorithm::encrypt, len, and src.
|
inlinestatic |
Definition at line 234 of file crypto.h.
References ctx, cipher_algorithm::decrypt, len, and src.
|
inlinestatic |
Definition at line 244 of file crypto.h.
References cipher_algorithm::auth, and ctx.
Referenced by cipher_decrypt_okx(), cipher_encrypt_okx(), cms_decrypt(), tls_new_ciphertext(), and tls_send_record().
|
inlinestatic |
|
inlinestatic |
Definition at line 254 of file crypto.h.
References cipher_algorithm::blocksize.
Referenced by cms_decrypt(), cms_verify_padding(), tls_iob_reserved(), tls_new_ciphertext(), and tls_send_record().
|
inlinestatic |
Definition at line 259 of file crypto.h.
References cipher_algorithm::authsize.
Referenced by cipher_decrypt_okx(), cipher_encrypt_okx(), tls_new_ciphertext(), and tls_send_record().
|
inlinestatic |
Definition at line 264 of file crypto.h.
References pubkey_algorithm::encrypt, and key.
Referenced by pubkey_okx(), and tls_send_client_key_exchange_pubkey().
|
inlinestatic |
Definition at line 271 of file crypto.h.
References pubkey_algorithm::decrypt, and key.
Referenced by cms_cipher_key(), and pubkey_okx().
|
inlinestatic |
Definition at line 278 of file crypto.h.
References key, pubkey_algorithm::sign, signature, and value.
Referenced by icert_cert(), pubkey_sign_okx(), and tls_send_certificate_verify().
|
inlinestatic |
Definition at line 285 of file crypto.h.
References key, signature, value, and pubkey_algorithm::verify.
Referenced by cms_verify_digest(), ocsp_check_signature(), pubkey_sign_okx(), tls_verify_dh_params(), and x509_check_signature().
|
inlinestatic |
Definition at line 292 of file crypto.h.
References pubkey_algorithm::match.
Referenced by pubkey_okx(), pubkey_sign_okx(), and x509_find_key().
|
inlinestatic |
Definition at line 299 of file crypto.h.
References base, elliptic_curve::multiply, and result.
Referenced by ecdhe_key(), and elliptic_okx().
| void digest_null_init | ( | void * | ctx | ) |
| void digest_null_update | ( | void * | ctx, |
| const void * | src, | ||
| size_t | len | ||
| ) |
| void digest_null_final | ( | void * | ctx, |
| void * | out | ||
| ) |
| int cipher_null_setkey | ( | void * | ctx, |
| const void * | key, | ||
| size_t | keylen | ||
| ) |
| void cipher_null_setiv | ( | void * | ctx, |
| const void * | iv, | ||
| size_t | ivlen | ||
| ) |
| void cipher_null_encrypt | ( | void * | ctx, |
| const void * | src, | ||
| void * | dst, | ||
| size_t | len | ||
| ) |
| void cipher_null_decrypt | ( | void * | ctx, |
| const void * | src, | ||
| void * | dst, | ||
| size_t | len | ||
| ) |
| void cipher_null_auth | ( | void * | ctx, |
| void * | auth | ||
| ) |
| int pubkey_null_encrypt | ( | const struct asn1_cursor * | key, |
| const struct asn1_cursor * | plaintext, | ||
| struct asn1_builder * | ciphertext | ||
| ) |
| int pubkey_null_decrypt | ( | const struct asn1_cursor * | key, |
| const struct asn1_cursor * | ciphertext, | ||
| struct asn1_builder * | plaintext | ||
| ) |
| int pubkey_null_sign | ( | const struct asn1_cursor * | key, |
| struct digest_algorithm * | digest, | ||
| const void * | value, | ||
| struct asn1_builder * | signature | ||
| ) |
| int pubkey_null_verify | ( | const struct asn1_cursor * | key, |
| struct digest_algorithm * | digest, | ||
| const void * | value, | ||
| const struct asn1_cursor * | signature | ||
| ) |
| struct digest_algorithm digest_null |
Definition at line 48 of file crypto_null.c.
Referenced by cms_parse_participants(), and tls_clear_handshake().
| struct cipher_algorithm cipher_null |
Definition at line 83 of file crypto_null.c.
Referenced by cms_message().
| struct pubkey_algorithm pubkey_null |
Definition at line 122 of file crypto_null.c.
Referenced by cms_parse_participants().
1.8.15