aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAakash Sasidharan <asasidharan@marvell.com>2020-09-21 18:56:23 +0530
committerPetri Savolainen <petri.savolainen@nokia.com>2020-09-29 09:05:30 +0300
commit75a2b9701284604c21691fdbafdf96747d251c00 (patch)
tree0ef4720ce110d22f312d7122c65b9c184c56108f /include
parentfee7dadd0e18003ca7464a7df25a2e6f7ba19d03 (diff)
api: crypto: remove data length restriction in bit mode
Remove the limitation of input data length to be a multiple of 8 for bit mode crypto operation. Clarify the bit order for the data in the last byte when the length is not a multiple of 8. Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'include')
-rw-r--r--include/odp/api/spec/crypto.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h
index ae96214e2..446d93a51 100644
--- a/include/odp/api/spec/crypto.h
+++ b/include/odp/api/spec/crypto.h
@@ -915,9 +915,12 @@ typedef struct odp_crypto_cipher_capability_t {
* 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.
+ * Note2: If the data length is not a multiple of 8, the remaining
+ * bits of the data in the last byte of the input/output will be the
+ * most significant bits, i.e. the most significant bit is considered
+ * to be the first bit of a byte for the purpose of input and output
+ * data range. The output bits that fall out of the output range are
+ * undefined.
*/
odp_bool_t bit_mode;
@@ -958,6 +961,13 @@ typedef struct odp_crypto_auth_capability_t {
* 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.
+ *
+ * Note2: If the data length is not a multiple of 8, the remaining
+ * bits of the data in the last byte of the input/output will be the
+ * most significant bits, i.e. the most significant bit is considered
+ * to be the first bit of a byte for the purpose of input and output
+ * data range. The output bits that fall out of the output range are
+ * undefined.
*/
odp_bool_t bit_mode;