Milestone 4
Milestone 4 Status
This milestone is planned.
Background
OP-TEE provides a crypto_drv abstraction for hardware-accelerated cryptographic operations, but Arm is the only architecture with an implementation currently. RISC-V RVA23 defines vector-cryptography extensions for AES and SHA-256/512, although the relevant NIST extension bundle is optional.
OP-TEE selects accelerated implementations at compile time, so this work adds a scoped RISC-V implementation using mandatory build-time constraints rather than runtime extension probing.
Milestone Description
Milestone 4 provides a RISC-V implementation of the OP-TEE crypto_drv acceleration abstraction for selected NIST algorithms using RVV 1.0 vector-cryptographic instructions.
Requirements
- Target RVA23 systems.
- Implement the NIST AES, SHA-256, and SHA-512 acceleration functions in scope.
- Integrate the RISC-V acceleration implementation into the OP-TEE build system.
- Select accelerated implementations through compile-time configuration.
- Require the necessary vector-cryptography extensions at compile time.
- Add test coverage and submit the implementation for upstream review.
The required API functions are:
crypto_accel_aes_expand_keyscrypto_accel_aes_ecb_enccrypto_accel_aes_ecb_deccrypto_accel_aes_cbc_enccrypto_accel_aes_cbc_deccrypto_accel_aes_ctr_be_enccrypto_accel_aes_xts_enccrypto_accel_aes_xts_deccrypto_accel_sha256_compresscrypto_accel_sha512_compress
Scope Boundaries
- RVA22 support is excluded.
- Scalar RISC-V cryptography drivers are excluded.
- Acceleration of
libtomcryptorlibmbedtlsthrough general RVV extensions is excluded. - Runtime probing for the optional vector-cryptography extension bundles is excluded.
- SHA-1, SHA-3, SM3, and SM4 acceleration APIs are excluded.
Deliverables
- RISC-V implementations of the ten required
crypto_drvAPIs. - OP-TEE build-system integration.
- Automated coverage for the accelerated operations.
- Upstream-ready code and supporting documentation.