This function frees and clears the cipher-specific context of \p ctx. Freeing \p ctx itself remains the responsibility of the caller.
The generic cipher update function. It encrypts or decrypts using the given cipher context. Writes as many block-sized blocks of data as possible to output. Any data that cannot be written immediately is either added to the next block, or flushed when mbedtls_cipher_finish() is called. Exception: For MBEDTLS_MODE_ECB, expects a single block in size. For example, 16 Bytes for AES.
This function initializes and fills the cipher-context structure with the appropriate values. It also clears the structure. \internal Currently, the function also clears the structure. In future versions, the caller will be required to call mbedtls_cipher_init() on the structure first.
This function sets the key to use with the given context.
This function returns the mode of operation for the cipher. For example, MBEDTLS_MODE_CBC.
This function initializes a \p cipher_context as NONE.
This function returns the block size of the given cipher.
This function resets the cipher state.
The generic cipher finalization function. If data still needs to be flushed from an incomplete block, the data contained in it is padded to the size of the last block, and written to the \p output buffer.
The generic autenticated encryption (AEAD) function.
The generic autenticated decryption (AEAD) function.
This function adds additional data for AEAD ciphers. Currently supported with GCM and ChaCha20+Poly1305. This must be called exactly once, after mbedtls_cipher_reset().
This function writes a tag for AEAD ciphers. Currently supported with GCM and ChaCha20+Poly1305. This must be called after mbedtls_cipher_finish().
This function checks the tag for AEAD ciphers. Currently supported with GCM and ChaCha20+Poly1305. This must be called after mbedtls_cipher_finish().
The generic all-in-one encryption/decryption function, for all ciphers except AEAD constructs.
This function returns the size of the IV or nonce of the cipher, in Bytes.
This function returns the type of the given cipher.
This function returns the name of the given cipher as a string.
This function returns the key length of the cipher.
This function returns the operation of the given cipher.