mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
crypto/cryptodev: export ivlen to support different cipher algs
Add ivlen field to crypt_op and crp_ivlen to cryptop structure to support cipher algorithms with different IV lengths. Signed-off-by: makejian <makejian@xiaomi.com>
This commit is contained in:
parent
143547128b
commit
66f9329839
2 changed files with 3 additions and 0 deletions
|
|
@ -476,6 +476,7 @@ static int cryptodev_op(FAR struct csession *cse,
|
|||
}
|
||||
|
||||
crp->crp_iv = cop->iv;
|
||||
crp->crp_ivlen = cop->ivlen;
|
||||
}
|
||||
|
||||
if (cop->dst)
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@ struct cryptop
|
|||
uint64_t crp_sid; /* Session ID */
|
||||
int crp_ilen; /* Input data total length */
|
||||
int crp_olen; /* Result total length */
|
||||
int crp_ivlen; /* IV length */
|
||||
int crp_alloctype; /* Type of buf to allocate if needed */
|
||||
int crp_etype; /* Error type (zero means no error).
|
||||
* All error codes except EAGAIN
|
||||
|
|
@ -399,6 +400,7 @@ struct crypt_op
|
|||
uint16_t flags;
|
||||
unsigned len;
|
||||
unsigned olen;
|
||||
unsigned ivlen;
|
||||
unsigned aadlen;
|
||||
caddr_t src, dst; /* become iov[] inside kernel */
|
||||
caddr_t mac; /* must be big enough for chosen MAC */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue