CV-Bowen opened a new pull request, #4085:
URL: https://github.com/apache/nuttx-apps/pull/4085
## Summary
The cryptodev tests leave fields of `struct session_op` and `struct
crypt_op` unset that only the software driver can do without. A
hardware driver such as virtio-crypto (apache/nuttx#{nuttxpr}) needs
them:
- `testing/drivers/crypto: set olen and the cipher op`: the output
length and, at session creation, the cipher direction, in the 3DES and
AES-CBC tests, including the AES-CBC stream test.
- `testing/drivers/crypto: pass the IV length`: cryptodev forwards
`cop->ivlen` to the driver; a hardware driver uses it, so a test that
leaves it at 0 sends no IV. Set it in the 3DES, AES-CBC and AES-CMAC
tests.
## Impact
Tests only. The software driver ignores these fields, so its results do
not change.
## Testing
Host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu
13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU
Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205
- With virtio-crypto on QEMU: `aescbc` one-shot passes all 6 vectors; the
full setup and log are in apache/nuttx#{nuttxpr}. Without this PR the
driver gets a zero-length output buffer and QEMU stops the device
(`virtio: zero sized buffers are not allowed`).
- sim:nsh with the software driver (`CRYPTO_CRYPTODEV_SOFTWARE_CRYPTO`),
before and after this PR: `des3cbc` passes; `aescbc` passes vectors 0
to 3 and fails vector 4 in both, which is the 192 and 256-bit key support
the
test added in fcc9ff455/978f5a8e7 expects and nuttx master does not
have yet.
- `aescmac` was not built: on current master it uses
`CRYPTO_AES_256_CMAC`, which nuttx master does not define yet.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]