|
iPXE
|
Cipher-block chaining. More...
Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static void | cbc_xor (const void *src, void *dst, size_t len) |
| XOR data blocks. More... | |
| void | cbc_encrypt (void *ctx, const void *src, void *dst, size_t len, struct cipher_algorithm *raw_cipher, void *cbc_ctx) |
| Encrypt data. More... | |
| void | cbc_decrypt (void *ctx, const void *src, void *dst, size_t len, struct cipher_algorithm *raw_cipher, void *cbc_ctx) |
| Decrypt data. More... | |
Cipher-block chaining.
Definition in file cbc.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
XOR data blocks.
| src | Input data |
| dst | Second input data and output data buffer |
| len | Length of data |
Definition at line 44 of file cbc.c.
References assert(), len, and src.
Referenced by cbc_decrypt(), and cbc_encrypt().
| void cbc_encrypt | ( | void * | ctx, |
| const void * | src, | ||
| void * | dst, | ||
| size_t | len, | ||
| struct cipher_algorithm * | raw_cipher, | ||
| void * | cbc_ctx | ||
| ) |
Encrypt data.
| ctx | Context |
| src | Data to encrypt |
| dst | Buffer for encrypted data |
| len | Length of data |
| raw_cipher | Underlying cipher algorithm |
| cbc_ctx | CBC context |
Definition at line 66 of file cbc.c.
References assert(), cipher_algorithm::blocksize, cbc_xor(), cipher_encrypt, ctx, len, memcpy(), and src.
| void cbc_decrypt | ( | void * | ctx, |
| const void * | src, | ||
| void * | dst, | ||
| size_t | len, | ||
| struct cipher_algorithm * | raw_cipher, | ||
| void * | cbc_ctx | ||
| ) |
Decrypt data.
| ctx | Context |
| src | Data to decrypt |
| dst | Buffer for decrypted data |
| len | Length of data |
| raw_cipher | Underlying cipher algorithm |
| cbc_ctx | CBC context |
Definition at line 92 of file cbc.c.
References assert(), cipher_algorithm::blocksize, cbc_xor(), cipher_decrypt, ctx, len, memcpy(), and src.
1.8.15