Skip to content
Commit 0ff77b10 authored by Siddharth Chandrasekaran's avatar Siddharth Chandrasekaran Committed by Carles Cufí
Browse files

crypto: api: New capability flag CAP_NO_IV_PREFIX



Zephyr crypto API currently does not allow IV to be treated as separate
entity. This is mostly due to fact that underlying libraries expect the
IV to be prefixed to the cipher/plain text for performance reasons. But
there are cases where the IV is derived from other sources and not
directly transmitted to the other end. In such cases, it must be treated
as a first class citizen.

This patch adds a new capability flag `CAP_NO_IV_PREFIX` to the crypto
API that allows operations without prefixing the IV to the cipher/plain
text. When `CAP_NO_IV_PREFIX` is active (and supported), the IV passed
to cipher_*_op() must not be modified.

As a side effect, the length of the cipher/plain texts are equal;
allowing for in-place encryption/decryption.

Signed-off-by: default avatarSiddharth Chandrasekaran <siddharth@embedjournal.com>
parent d0f76528
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment