Skip to main content

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:

  1. crypto_accel_aes_expand_keys
  2. crypto_accel_aes_ecb_enc
  3. crypto_accel_aes_ecb_dec
  4. crypto_accel_aes_cbc_enc
  5. crypto_accel_aes_cbc_dec
  6. crypto_accel_aes_ctr_be_enc
  7. crypto_accel_aes_xts_enc
  8. crypto_accel_aes_xts_dec
  9. crypto_accel_sha256_compress
  10. crypto_accel_sha512_compress

Scope Boundaries

  • RVA22 support is excluded.
  • Scalar RISC-V cryptography drivers are excluded.
  • Acceleration of libtomcrypt or libmbedtls through 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_drv APIs.
  • OP-TEE build-system integration.
  • Automated coverage for the accelerated operations.
  • Upstream-ready code and supporting documentation.