ThePassionate opened a new pull request, #17932:
URL: https://github.com/apache/nuttx/pull/17932
# Crypto: Add Support for AES-CBC with 192/256-bit Key Sizes
## Summary
This PR extends the AES-CBC algorithm support in the cryptodev module to
include 192-bit and 256-bit key sizes in addition to the existing 128-bit
support. This enhancement provides broader compatibility with cryptographic
standards and enables applications to use additional key length options based
on their security requirements.
## Key Changes
1. **Cryptodev Module Enhancement**:
- Added support for CRYPTO_AES_192_CBC cipher type
- Added support for CRYPTO_AES_256_CBC cipher type
- Extended ioctl handler to recognize new AES-CBC key size variants
- Integrated with existing cryptographic algorithm framework
2. **Cryptodev Header Update**:
- Added macro definitions for 192-bit and 256-bit AES-CBC algorithms
- Maintained backward compatibility with existing 128-bit implementation
## Impact
• **Compatibility**: Extends support to match modern cryptographic standards
that commonly use 192/256-bit key sizes
• **Security**: Provides applications with higher security assurance through
longer key lengths
• **Flexibility**: Allows developers to choose appropriate key sizes for
different security scenarios
• **Backward Compatible**: All changes are fully backward compatible;
existing code continues to work unchanged
## Testing
**Test Environment:**
- Host: Linux x86_64
- Configuration: CRYPTO with AES-CBC enabled
- Build: NuttX standard build system
**Test Procedure:**
1. Build NuttX with cryptodev module enabled
2. Verify AES-CBC support for 128/192/256-bit key sizes
3. Test ioctl operations with all three key size variants
4. Validate compatibility with existing AES-CBC code
**Test Results:**
- ✅ AES-CBC 128-bit key size support verified (existing functionality)
- ✅ AES-CBC 192-bit key size support added and functional
- ✅ AES-CBC 256-bit key size support added and functional
- ✅ Ioctl handler properly recognizes all key size variants
- ✅ Backward compatibility maintained
- ✅ No regressions in existing tests
--
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]