mbedtls_aria_crypt_cfb128() function
This function performs an ARIA-CFB128 encryption or decryption operation. It performs the operation defined in the \p mode parameter (encrypt or decrypt), on the input data buffer defined in the \p input parameter. For CFB, you must set up the context with mbedtls_aria_setkey_enc(), regardless of whether you are performing an encryption or decryption operation, that is, regardless of the \p mode parameter. This is because CFB mode uses the same key schedule for encryption and decryption.
Arguments
ctx
The ARIA context to use for encryption or decryption. This must be initialized and bound to a key.
mode
The mode of operation. This must be either #MBEDTLS_ARIA_ENCRYPT for encryption, or #MBEDTLS_ARIA_DECRYPT for decryption.
length
The length of the input data \p input in Bytes.
iv_off
The offset in IV (updated after use). This must not be larger than 15.
iv
The initialization vector (updated after use). This must be a readable buffer of size 16 Bytes.
input
The buffer holding the input data. This must be a readable buffer of length \p length Bytes.
output
The buffer holding the output data. This must be a writable buffer of length \p length Bytes.
Return value
\c 0 on success. A negative error code on failure.
Notes
Upon exit, the content of the IV is updated so that you can call the same function again on the next block(s) of data and get the same result as if it was encrypted in one call. This allows a "streaming" usage. If you need to retain the contents of the IV, you must either save it manually or use the cipher module instead.