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 | __attribute__ ((always_inline)) void digest_init(struct digest_algorithm *digest |
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_init (void *ctx, const void *key, size_t key_len) |
size_t | pubkey_null_max_len (void *ctx) |
int | pubkey_null_encrypt (void *ctx, const void *plaintext, size_t plaintext_len, void *ciphertext) |
int | pubkey_null_decrypt (void *ctx, const void *ciphertext, size_t ciphertext_len, void *plaintext) |
int | pubkey_null_sign (void *ctx, struct digest_algorithm *digest, const void *value, void *signature) |
int | pubkey_null_verify (void *ctx, struct digest_algorithm *digest, const void *value, const void *signature, size_t signature_len) |
Variables | |
static void * | ctx |
static void const void * | data |
static void const void size_t | len |
static void void * | out |
static void const void * | key |
static void const void size_t | keylen |
static void const void * | iv |
static void const void size_t | ivlen |
static void const void * | src |
static void const void void * | dst |
static void void * | auth |
static void const void size_t | key_len |
static void struct digest_algorithm * | digest |
HMAC-MD5 digest. More... | |
static void struct digest_algorithm const void * | value |
static void struct digest_algorithm const void void * | signature |
static void struct digest_algorithm const void const void size_t | signature_len |
static const void * | private_key |
Private key. More... | |
static const void size_t | private_key_len |
static const void size_t const void * | public_key |
static const void size_t const void size_t | public_key_len |
static const void * | base |
Base address. More... | |
static const void const void * | scalar |
static const void const void void * | result |
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 268 of file crypto.h.
References cipher_algorithm::blocksize.
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_init | ( | void * | ctx, |
const void * | key, | ||
size_t | key_len | ||
) |
size_t pubkey_null_max_len | ( | void * | ctx | ) |
int pubkey_null_encrypt | ( | void * | ctx, |
const void * | plaintext, | ||
size_t | plaintext_len, | ||
void * | ciphertext | ||
) |
int pubkey_null_decrypt | ( | void * | ctx, |
const void * | ciphertext, | ||
size_t | ciphertext_len, | ||
void * | plaintext | ||
) |
int pubkey_null_sign | ( | void * | ctx, |
struct digest_algorithm * | digest, | ||
const void * | value, | ||
void * | signature | ||
) |
int pubkey_null_verify | ( | void * | ctx, |
struct digest_algorithm * | digest, | ||
const void * | value, | ||
const void * | signature, | ||
size_t | signature_len | ||
) |
void* ctx |
void const void size_t len |
void const void size_t void* out |
void const void size_t keylen |
Definition at line 233 of file crypto.h.
Referenced by aes_setkey(), aes_test_exec(), arc4_setkey(), arc4_skip(), cbc_setkey(), ccmp_init(), des_setkey(), gcm_setkey(), gcm_test_exec(), peerblk_parse_header(), tkip_init(), and wep_init().
void const void* iv |
Definition at line 238 of file crypto.h.
Referenced by cbc_setiv(), cipher_cost(), gcm_setiv(), tkip_kie_decrypt(), tls_new_ciphertext(), tls_send_plaintext(), wep_decrypt(), and wep_encrypt().
void const void size_t ivlen |
Definition at line 239 of file crypto.h.
Referenced by cbc_setiv(), and gcm_setiv().
static __always_inline void off_t userptr_t src |
Definition at line 244 of file crypto.h.
Referenced by __attribute__(), __memmove(), aes_decrypt(), aes_encrypt(), aes_unwrap(), aes_wrap(), arc4_skip(), arc4_xor(), bnxt_add_vlan(), bnxt_get_pkt_vlan(), bzimage_parse_header(), cbc_decrypt(), cbc_encrypt(), cbc_xor(), ccmp_ctr_xor(), cipher_null_decrypt(), cipher_null_encrypt(), copy_from_user(), copy_to_real(), copy_to_user(), crc32_le(), des_decrypt(), des_encrypt(), dhcpv6_rx(), dns_copy(), ecb_decrypt(), ecb_encrypt(), efi_paths(), efi_pxe_udp_write(), efi_undi_fill_header(), efi_undi_receive(), eth_pio_read(), eth_pio_write(), exanic_transmit(), fbcon_draw(), fc_els_rx(), fc_xchg_rx(), gcc_implicit_memcpy(), gcm_decrypt(), gcm_encrypt(), gcm_process(), gcm_xor_block(), gdbstub_from_hex_buf(), gdbstub_to_hex_buf(), generic_memcpy(), generic_memcpy_reverse(), generic_memmove(), hv_wait_for_message(), ipv4_rx(), ipv6_route_okx(), ipv6_rx(), ipv6_tx(), memchr(), memcpy_0(), memcpy_1(), memcpy_10(), memcpy_11(), memcpy_12(), memcpy_13(), memcpy_14(), memcpy_15(), memcpy_16(), memcpy_17(), memcpy_18(), memcpy_19(), memcpy_2(), memcpy_20(), memcpy_21(), memcpy_22(), memcpy_23(), memcpy_24(), memcpy_25(), memcpy_26(), memcpy_27(), memcpy_28(), memcpy_29(), memcpy_3(), memcpy_30(), memcpy_31(), memcpy_4(), memcpy_5(), memcpy_6(), memcpy_7(), memcpy_8(), memcpy_9(), memcpy_test_speed(), memcpy_var(), mschapv2_expand_hash(), nii_sync(), shuffle(), strcat(), strchr(), strcpy(), strdup(), string_copy(), string_test_exec(), strlen(), strncpy(), strndup(), strnlen(), strrchr(), trivial_memcpy_user(), trivial_memmove_user(), udp_tx(), and uri_copy_fields().
static void const void void * dst |
Definition at line 244 of file crypto.h.
Referenced by aes_decrypt(), aes_encrypt(), arc4_skip(), arc4_xor(), bzimage_update_header(), cbc_decrypt(), cbc_encrypt(), cbc_xor(), cipher_null_decrypt(), cipher_null_encrypt(), des_decrypt(), des_encrypt(), dns_copy(), dns_copy_fail_okx(), dns_copy_okx(), dns_encode(), ecb_decrypt(), ecb_encrypt(), efi_paths(), eth_pio_read(), eth_pio_write(), exanic_transmit(), gcm_decrypt(), gcm_encrypt(), gcm_process(), gcm_xor(), gcm_xor_block(), gdbstub_from_hex_buf(), gdbstub_to_hex_buf(), mschapv2_expand_hash(), and nii_sync().
void void* auth |
Definition at line 264 of file crypto.h.
Referenced by cipher_decrypt_okx(), cipher_encrypt_okx(), http_authentication(), http_format_authorization(), http_format_ntlm_auth(), http_parse_www_authenticate(), http_transfer_complete(), mschapv2_auth(), mschapv2_okx(), net80211_handle_auth(), net80211_send_auth(), ntlm_authenticate(), ntlm_authenticate_okx(), and tls_new_ciphertext().
void const void size_t key_len |
Definition at line 285 of file crypto.h.
Referenced by add_parameter(), cipher_cost(), cipher_cost_decrypt(), cipher_cost_encrypt(), efi_snp_hii_process(), hmac_init(), iscsi_handle_string(), pbkdf2_sha1(), prf_sha1(), rsa_init(), and xenbus_probe_device().
uint8_t digest |
HMAC-MD5 digest.
Definition at line 308 of file crypto.h.
Referenced by __attribute__(), asn1_okx(), certstat(), chap_init(), cms_digest(), cms_verify_digest(), dbg_md5_da(), digest_cost(), digest_exec(), digest_frag_okx(), hash_df(), hmac_final(), hmac_init(), hmac_okx(), hmac_update(), http_digest_final(), icert_cert(), icert_certs(), md5_sha1_final(), ntlm_key(), ocsp_check_signature(), ocsp_compare_responder_key_hash(), ocsp_request(), peerblk_decrypt(), peerblk_done(), peerblk_open(), peerdist_info_passphrase_okx(), peerdist_info_segment_hash(), rsa_encode_digest(), rsa_find_prefix(), rsa_sign(), rsa_verify(), tls_add_handshake(), tls_hmac(), tls_hmac_final(), tls_hmac_init(), tls_hmac_list(), tls_hmac_update(), tls_hmac_update_va(), tls_new_ciphertext(), tls_new_finished(), tls_p_hash_va(), tls_select_cipher(), tls_select_handshake(), tls_send_certificate_verify(), tls_send_finished(), tls_send_plaintext(), tls_signature_hash_algorithm(), tls_verify_dh_params(), tls_verify_handshake(), x509_check_root(), x509_check_signature(), x509_fingerprint(), and x509_name().
void struct digest_algorithm const void* value |
void struct digest_algorithm const void const void* signature |
void struct digest_algorithm const void const void size_t signature_len |
Definition at line 316 of file crypto.h.
Referenced by rsa_verify(), tls_send_certificate_verify(), and tls_verify_dh_params().
const void* private_key |
const void size_t private_key_len |
Definition at line 327 of file crypto.h.
Referenced by rsa_match().
const void size_t const void* public_key |
Definition at line 327 of file crypto.h.
Referenced by cms_verify_digest(), ocsp_check_signature(), rsa_match(), x509_check_issuer(), x509_check_signature(), and x509_parse_public_key().
uint64_t base |
Base address.
Base.
Definition at line 335 of file crypto.h.
Referenced by bigint_mod_exp_raw(), bigint_mod_exp_sample(), bios_mp_start_all(), deflate_init(), ecam_access(), efi_file_varlen(), efi_local_open_path(), efi_pxe_arp(), efi_pxe_dhcp(), efi_pxe_discover(), efi_pxe_mtftp(), efi_pxe_set_ip_filter(), efi_pxe_set_packets(), efi_pxe_set_parameters(), efi_pxe_set_station_ip(), efi_pxe_start(), efi_pxe_stop(), efi_pxe_udp_read(), efi_pxe_udp_write(), ena_set_base(), eth_probe(), gma_read32(), hvm_cpuid_base(), icplus_set_base(), init_eheap(), intelxl_init_admin(), pci_msix_control(), pci_msix_dump(), pci_msix_ioremap(), pci_msix_map(), pcibridge_probe(), pciea_bar_start(), qib7322_create_send_bufs(), skge_qset(), skge_ring_alloc(), smscusb_mii_read(), smscusb_mii_wait(), smscusb_mii_write(), strtoul(), strtoul_pre(), strtoull(), uri_resolve_okx(), virtio_pci_map_capability(), x25519_curve_multiply(), x25519_key(), x25519_key_okx(), x25519_ladder(), and x25519_step().
const void const void* scalar |
Definition at line 335 of file crypto.h.
Referenced by aes_invmixcolumns_entry(), aes_mixcolumns_entry(), pnm_data(), x25519_curve_multiply(), x25519_key(), x25519_key_okx(), and x25519_ladder().
return result |
Definition at line 335 of file crypto.h.
Referenced by ath5k_get_interpolated_value(), ath5k_hw_get_capability(), atl1e_mdio_read(), bigint_mod_exp_raw(), bigint_mod_exp_sample(), bigint_mod_multiply_raw(), bigint_mod_multiply_sample(), bigint_multiply_raw(), bigint_multiply_sample(), bnx2_poll(), cs89x0_probe(), dhe_key(), ethtool_adv_to_mii_adv_x(), hfa384x_copy_from_bap(), hfa384x_copy_to_bap(), hfa384x_drvr_getconfig(), hfa384x_drvr_setconfig(), hfa384x_prepare_bap(), isqrt(), memmap_settings_fetch(), mii_adv_to_ethtool_adv_x(), myri10ge_command(), prism2_poll(), prism2_probe(), prism2_transmit(), rdrand_get_noise(), velocity_mii_read(), vmxnet3_command(), x25519_add(), x25519_curve_multiply(), x25519_invert(), x25519_key(), x25519_ladder(), x25519_multiply(), and x25519_subtract().
struct digest_algorithm digest_null |
Definition at line 48 of file crypto_null.c.
Referenced by tls_clear_handshake().
struct cipher_algorithm cipher_null |
Definition at line 83 of file crypto_null.c.
struct pubkey_algorithm pubkey_null |
Definition at line 135 of file crypto_null.c.