|
iPXE
|
A cipher algorithm. More...
#include <crypto.h>
Data Fields | |
| const char * | name |
| Algorithm name. | |
| size_t | ctxsize |
| Context size. | |
| size_t | blocksize |
| Block size. | |
| size_t | alignsize |
| Alignment size. | |
| size_t | authsize |
| Authentication tag size. | |
| int | confidential |
| Cipher is capable of providing confidentiality. | |
| int(* | setkey )(struct cipher_algorithm *cipher, void *ctx, const void *key, size_t keylen) |
| Set key. | |
| int(* | setiv )(struct cipher_algorithm *cipher, void *ctx, const void *iv, size_t ivlen) |
| Set initialisation vector. | |
| void(* | encrypt )(struct cipher_algorithm *cipher, void *ctx, const void *src, void *dst, size_t len) |
| Encrypt data. | |
| void(* | decrypt )(struct cipher_algorithm *cipher, void *ctx, const void *src, void *dst, size_t len) |
| Decrypt data. | |
| void(* | auth )(struct cipher_algorithm *cipher, void *ctx, void *auth) |
| Generate authentication tag. | |
| void * | priv |
| Algorithm private data. | |
| const char* cipher_algorithm::name |
Algorithm name.
Definition at line 60 of file crypto.h.
Referenced by peerblk_parse_header(), and tls_select_cipher().
| size_t cipher_algorithm::ctxsize |
Context size.
Definition at line 62 of file crypto.h.
Referenced by cbc_decrypt(), cbc_encrypt(), cbc_setiv(), cbc_setkey(), cipher_cost(), cipher_decrypt_okx(), cipher_encrypt_okx(), cms_decrypt(), gcm_auth(), gcm_decrypt(), gcm_encrypt(), gcm_process(), gcm_setiv(), gcm_setkey(), peerblk_parse_header(), and tls_set_cipher().
| size_t cipher_algorithm::blocksize |
Block size.
Every call to encrypt() or decrypt() must be for a multiple of this size.
Definition at line 68 of file crypto.h.
Referenced by asn1_parse_cbc(), cbc_decrypt(), cbc_encrypt(), cbc_setiv(), cbc_setkey(), cipher_cost(), cipher_okx(), cms_decrypt(), cms_verify_padding(), ecb_decrypt(), ecb_encrypt(), is_block_cipher(), is_stream_cipher(), peerblk_decrypt(), peerblk_parse_iv(), peerblk_retrieval_close(), tls_iob_reserved(), and tls_send_record().
| size_t cipher_algorithm::alignsize |
Alignment size.
Every call to encrypt() or decrypt() must begin at a multiple of this offset from the start of the stream. (Equivalently: all but the last call to encrypt() or decrypt() must be for a multiple of this size.)
For ciphers supporting additional data, the main data stream and additional data stream are both considered to begin at offset zero.
Definition at line 80 of file crypto.h.
Referenced by cipher_okx(), and tls_newdata_process_header().
| size_t cipher_algorithm::authsize |
Authentication tag size.
Definition at line 82 of file crypto.h.
Referenced by cipher_decrypt_okx(), cipher_encrypt_okx(), cms_decrypt(), cms_parse_enveloped(), is_auth_cipher(), tls_iob_reserved(), tls_new_ciphertext(), and tls_send_record().
| int cipher_algorithm::confidential |
Cipher is capable of providing confidentiality.
Definition at line 84 of file crypto.h.
Referenced by cipher_okx().
| int(* cipher_algorithm::setkey) (struct cipher_algorithm *cipher, void *ctx, const void *key, size_t keylen) |
| int(* cipher_algorithm::setiv) (struct cipher_algorithm *cipher, void *ctx, const void *iv, size_t ivlen) |
| void(* cipher_algorithm::encrypt) (struct cipher_algorithm *cipher, void *ctx, const void *src, void *dst, size_t len) |
| void(* cipher_algorithm::decrypt) (struct cipher_algorithm *cipher, void *ctx, const void *src, void *dst, size_t len) |
| void(* cipher_algorithm::auth) (struct cipher_algorithm *cipher, void *ctx, void *auth) |
Generate authentication tag.
Definition at line 135 of file crypto.h.
Referenced by cipher_auth(), cipher_decrypt_okx(), cipher_encrypt_okx(), and cms_decrypt().
| void* cipher_algorithm::priv |
Algorithm private data.
Definition at line 138 of file crypto.h.
Referenced by cbc_decrypt(), cbc_encrypt(), cbc_setkey(), ecb_decrypt(), ecb_encrypt(), ecb_setkey(), gcm_auth(), gcm_process(), and gcm_setkey().