Skip to main content
Version: 0.2.25

ARIA - CFB

ARIA in CFB (Cipher Feedback) mode: the IV or previous ciphertext block is encrypted to form a keystream, which is XORed with the plaintext. Same semantics as AES CFB. IV must be unique per encryption.

API

noxtls_aria_encrypt_cfb

noxtls_return_t noxtls_aria_encrypt_cfb(const uint8_t* key, const uint8_t* data, uint32_t data_len, const uint8_t* iv, uint8_t* output, noxtls_aria_type_t type);

Encrypts data in ARIA CFB mode.

Parameters: key — encryption key; data — plaintext; data_len — length; iv — 16-byte IV (unique per encryption); output — ciphertext buffer; type — ARIA key type.

Returns: noxtls_return_t: NOXTLS_RETURN_SUCCESS on success; otherwise a specific return code.

noxtls_aria_decrypt_cfb

noxtls_return_t noxtls_aria_decrypt_cfb(const uint8_t* key, const uint8_t* data, uint32_t data_len, const uint8_t* iv, uint8_t* output, noxtls_aria_type_t type);

Decrypts data in ARIA CFB mode. Use the same IV that was used for encryption.

Parameters: key — decryption key; data — ciphertext; data_len — length; iv — 16-byte IV used for this ciphertext; output — plaintext buffer; type — ARIA key type.

Returns: noxtls_return_t: NOXTLS_RETURN_SUCCESS on success; otherwise a specific return code.