mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
crypto/cryptodev: add encrypt op and olen for support virtio mode
Add olen field to crypt_op structure and crp_olen to cryptop structure to support output length tracking in virtio crypto mode. Signed-off-by: makejian <makejian@xiaomi.com>
This commit is contained in:
@@ -152,6 +152,7 @@ struct cryptoini
|
||||
int cri_klen; /* Key length, in bits */
|
||||
int cri_rnd; /* Algorithm rounds, where relevant */
|
||||
int cri_sid;
|
||||
int cri_op;
|
||||
caddr_t cri_key; /* key to use */
|
||||
union
|
||||
{
|
||||
@@ -363,6 +364,7 @@ struct cryptocap
|
||||
struct session_op
|
||||
{
|
||||
uint32_t cipher; /* ie. CRYPTO_AES_EBC */
|
||||
uint16_t op; /* i.e. COP_ENCRYPT */
|
||||
uint32_t mac;
|
||||
uint32_t keylen; /* cipher key */
|
||||
caddr_t key;
|
||||
@@ -396,6 +398,7 @@ struct crypt_op
|
||||
|
||||
uint16_t flags;
|
||||
unsigned len;
|
||||
unsigned olen;
|
||||
unsigned aadlen;
|
||||
caddr_t src, dst; /* become iov[] inside kernel */
|
||||
caddr_t mac; /* must be big enough for chosen MAC */
|
||||
|
||||
Reference in New Issue
Block a user