BearSSL
|
Class type for CBC decryption implementations. More...
Data Fields | |
size_t | context_size |
Size (in bytes) of the context structure appropriate for containing subkeys. More... | |
unsigned | block_size |
Size of individual blocks (in bytes). More... | |
unsigned | log_block_size |
Base-2 logarithm of the size of individual blocks, expressed in bytes. More... | |
void(* | init )(const br_block_cbcdec_class **ctx, const void *key, size_t key_len) |
Initialisation function. More... | |
void(* | run )(const br_block_cbcdec_class *const *ctx, void *iv, void *data, size_t len) |
Run the CBC decryption. More... | |
Class type for CBC decryption implementations.
A br_block_cbcdec_class
instance points to the functions implementing a specific block cipher, when used in CBC mode for decrypting data.
unsigned br_block_cbcdec_class::block_size |
Size of individual blocks (in bytes).
size_t br_block_cbcdec_class::context_size |
Size (in bytes) of the context structure appropriate for containing subkeys.
void(* br_block_cbcdec_class::init) (const br_block_cbcdec_class **ctx, const void *key, size_t key_len) |
Initialisation function.
This function sets the vtable
field in the context structure. The key length MUST be one of the key lengths supported by the implementation.
ctx | context structure to initialise. |
key | secret key. |
key_len | key length (in bytes). |
unsigned br_block_cbcdec_class::log_block_size |
Base-2 logarithm of the size of individual blocks, expressed in bytes.
void(* br_block_cbcdec_class::run) (const br_block_cbcdec_class *const *ctx, void *iv, void *data, size_t len) |
Run the CBC decryption.
The iv
parameter points to the IV for this run; it is updated with a copy of the last encrypted block. The data is decrypted "in place"; its length (len
) MUST be a multiple of the block size.
ctx | context structure (already initialised). |
iv | IV for CBC decryption (updated). |
data | data to decrypt. |
len | data length (in bytes, multiple of block size). |