Repository navigation
Commit 2ad499c
committed
testing/crypto: add key management test
Exercise the cryptodev key-id mechanism: with CRD_F_KEYID the key
field of a session or kprocess request references an imported key
in the swkey store instead of the key material.
Every case runs a full key lifecycle (allocate, import, operate by
key id, delete) - the delete also on the failure paths, so a failed
run leaves nothing behind in the store: the lifecycle round trip
itself, AES-CBC, HMAC, AES-CMAC (cipher and mac keys both by id),
ECDSA (generate then sign/verify by id) and RSA-1024 (n/e/d as
three key ids: encrypt/decrypt round trip and a raw private-key
operation with type-2 padding, checked with the public key).
Signed-off-by: makejian <makejian@xiaomi.com>1 parent bce81d5 commit 2ad499c
4 files changed
Lines changed: 1182 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
343 | 357 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
175 | 179 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
| |||
0 commit comments