diff options
author | Janne Peltonen <janne.peltonen@nokia.com> | 2023-06-19 13:39:16 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2023-07-10 13:08:12 +0300 |
commit | 48948c24a43681fa6b0e32bc5569277f0a977078 (patch) | |
tree | fc02a3744acab05adb29b3981f916b305c5174af /bootstrap | |
parent | 21ae3c664b368c52ef28914188c3abaa85a3ac16 (diff) |
api: crypto: add bit mode session parameters for cipher and auth
Add cipher_range_in_bits and auth_range_in_bits session parameters that
control whether cipher/auth range is given in bits or bytes. By default
the range is in bytes.
Change bit_mode cipher/auth capability flag to indicate whether bit mode
is supported in addition to byte mode that is always supported. Previously
bit_mode capability told whether the cipher/auth had to be used in bit
or byte mode.
This simplifies crypto API usage as ODP applications that do not require
bit mode can simply request byte mode sessions and do not have to check
in which mode a particular algorithm in a particular ODP implementation
has to be used and then convert range units accordingly.
After this change it is possible for an ODP implementation to start
supporting bit mode for an algorithm without affecting applications that
use byte mode and do not fully do the capability checking and unit
conversion dance.
This also removes the ambiguity regarding the range units of the null
algorithms. Currently some ODP implementations advertise null algorithm
capabilities both with and without bit_mode, which is inconsistent and
will break as soon as the ranges of the null algorithms are not ignored
(as then the ODP implementation could not tell if the range given to
it was in bits or bytes).
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
Diffstat (limited to 'bootstrap')
0 files changed, 0 insertions, 0 deletions