|
SharkSSL C/C++ Reference
TLS, cryptography, certificates, and PSA integration
|
AES.
Data Structures | |
| struct | SharkSslAesCtx |
| AES. More... | |
Typedefs | |
| typedef struct SharkSslAesCtx | SharkSslAesCtx |
| AES. More... | |
Functions | |
| SHARKSSL_API SHARKSSL_AES_API_STATUS | SharkSslAesCtx_constructor (SharkSslAesCtx *ctx, SharkSslAesCtx_Type type, const U8 *key, U8 keyLen) |
| Initialize. More... | |
| SHARKSSL_API SHARKSSL_AES_API_STATUS | SharkSslAesCtx_decrypt (SharkSslAesCtx *ctx, const U8 input[16], U8 output[16]) |
| Decrypt. More... | |
| SHARKSSL_API SHARKSSL_AES_API_STATUS | SharkSslAesCtx_encrypt (SharkSslAesCtx *ctx, U8 input[16], U8 output[16]) |
| Encrypt. More... | |
| SHARKSSL_API SHARKSSL_AES_API_STATUS | SharkSslAesCtx_cbc_encrypt (SharkSslAesCtx *ctx, U8 vect[16], const U8 *input, U8 *output, U32 len) |
| Encrypt. More... | |
| SHARKSSL_API SHARKSSL_AES_API_STATUS | SharkSslAesCtx_cbc_decrypt (SharkSslAesCtx *ctx, U8 vect[16], const U8 *input, U8 *output, U32 len) |
| Decrypt. More... | |
| typedef struct SharkSslAesCtx SharkSslAesCtx |
AES.
| SHARKSSL_AES_API_STATUS SharkSslAesCtx_cbc_decrypt | ( | SharkSslAesCtx * | ctx, |
| U8 | vect[16], | ||
| const U8 * | input, | ||
| U8 * | output, | ||
| U32 | len | ||
| ) |
Decrypt.
| ctx | SharkSslAesCtx *; required context constructed for decryption. |
| vect | U8[16]; required writable IV, updated to the final ciphertext block for continuation. |
| input | const U8 *; input bytes; required when len is nonzero. |
| output | U8 *; output buffer with at least len bytes; exact in-place operation is supported. |
| len | U32; byte count, a multiple of 16. This API does not add or remove padding. |
| SHARKSSL_AES_API_STATUS SharkSslAesCtx_cbc_encrypt | ( | SharkSslAesCtx * | ctx, |
| U8 | vect[16], | ||
| const U8 * | input, | ||
| U8 * | output, | ||
| U32 | len | ||
| ) |
Encrypt.
| ctx | SharkSslAesCtx *; required context constructed for encryption. |
| vect | U8[16]; required writable IV, updated to the final ciphertext block for continuation. |
| input | const U8 *; input bytes; required when len is nonzero. |
| output | U8 *; output buffer with at least len bytes; exact in-place operation is supported. |
| len | U32; byte count, a multiple of 16. This API does not add or remove padding. |
| SHARKSSL_AES_API_STATUS SharkSslAesCtx_constructor | ( | SharkSslAesCtx * | ctx, |
| SharkSslAesCtx_Type | type, | ||
| const U8 * | key, | ||
| U8 | keyLen | ||
| ) |
Initialize.
The caller owns the context.
| ctx | Uninitialized data of size sizeof(SharkSslAesCtx) |
| type | encrypt/decrypt |
| key | the encryption/decryption key |
| keyLen | 'key' length |
The key length is in bytes: 16, 24, or 32, subject to the enabled algorithms/backend. Clear the context with its destructor after use.
| SHARKSSL_AES_API_STATUS SharkSslAesCtx_decrypt | ( | SharkSslAesCtx * | ctx, |
| const U8 | input[16], | ||
| U8 | output[16] | ||
| ) |
Decrypt.
| ctx | SharkSslAesCtx *; required context constructed for decryption. |
| input | const U8[16]; one complete input block. |
| output | U8[16]; required output block; exact in-place operation is supported. |
| SHARKSSL_AES_API_STATUS SharkSslAesCtx_encrypt | ( | SharkSslAesCtx * | ctx, |
| U8 | input[16], | ||
| U8 | output[16] | ||
| ) |
Encrypt.
| ctx | SharkSslAesCtx *; required context constructed for encryption. |
| input | U8[16]; one complete input block. |
| output | U8[16]; required output block; exact in-place operation is supported. |