ThePassionate opened a new pull request, #18029:
URL: https://github.com/apache/nuttx/pull/18029

   ## Summary
   
   This PR includes four improvements to the NuttX crypto subsystem:
   
   1. **Add olen field for virtio mode support** - Add `olen` field to 
`crypt_op` structure and `crp_olen` to `cryptop` structure to support output 
length tracking in virtio crypto mode.
   
   2. **Export ivlen to support different cipher algorithms** - Add `ivlen` 
field to `crypt_op` and `crp_ivlen` to `cryptop` structure to support cipher 
algorithms with different IV lengths.
   
   3. **Optimize cryptodev without dynamic memory** - Replace dynamic memory 
allocation with stack-based variables in `cryptodev_op()`. This eliminates 
`kmm_malloc`/`kmm_free` overhead and simplifies error handling by removing the 
need for goto bail cleanup paths.
   
   4. **Determine the order of crypto drivers** - After adding the cross-core 
crypto driver, there are now three encryption modes:
      - Hardware driver in local core
      - Crypto driver in remote core  
      - Software encryption in local core
      
      This prioritizes local hardware driver first, then remote driver 
(typically hardware), and finally local software encryption as a fallback.
   
   ## Impact
   
   These changes improve crypto subsystem flexibility, performance, and support 
for virtio-based crypto operations.
   
   ## Testing
   
   Build and runtime tested on NuttX with software crypto drivers.


-- 
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]

Reply via email to