diff options
author | Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> | 2018-02-03 05:27:10 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-11-28 17:16:37 +0300 |
commit | 59a26fc8cc0be0be0e30144389cfee2e55a88ab2 (patch) | |
tree | 5ee51a99ee307679437e1ba410cfd09f101d4808 /include | |
parent | cb5ed2680f28412e72aa59f5769581bdb19d4ebd (diff) |
api: crypto: add bitstring operation capability
For several wireless communication algorithms it is expected that they
operate on bit strings, which are not byte-aligned. Add cipher and auth
flags, denoting that this cipher/auth can be enabled to work in
bit-string mode.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/odp/api/spec/crypto.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index 654ae7bb9..843fdefe8 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -755,6 +755,22 @@ typedef struct odp_crypto_cipher_capability_t { /** IV length in bytes */ uint32_t iv_len; + /** Cipher is operating in bitwise mode + * + * This cipher works on series of bits, rather than sequences of bytes: + * cipher_range in odp_crypto_op_param_t and + * odp_crypto_packet_op_param_t will use bits, rather than bytes. + * + * Note: data buffer MUST start on the byte boundary, using offset + * which is not divisible by 8 is unsupported and will result in + * unspecified behaviour. + * + * Note2: currently data length MUST be divisible by 8. Specifying data + * which does not consist of full bytes will result in unspecified + * behaviour. + */ + odp_bool_t bit_mode; + } odp_crypto_cipher_capability_t; /** @@ -783,6 +799,18 @@ typedef struct odp_crypto_auth_capability_t { uint32_t inc; } aad_len; + /** Auth is operating in bitstring mode + * + * This auth works on series of bits, rather than sequences of bytes: + * auth_range in odp_crypto_op_param_t and + * odp_crypto_packet_op_param_t will use bits, rather than bytes. + * + * Note: data buffer MUST start on the byte boundary, using offset + * which is not divisible by 8 is unsupported and will result in + * unpredictable behaviour. + */ + odp_bool_t bit_mode; + } odp_crypto_auth_capability_t; /** |