ThePassionate opened a new pull request, #3339:
URL: https://github.com/apache/nuttx-apps/pull/3339
# TinyCrypto: Add UNIX Compile Flags to Use /dev/random
## Summary
This PR adds UNIX platform compilation flags to the tinycrypto build
configuration, enabling secure random number generation via `/dev/random`. This
enhancement allows tinycrypto library to properly access system entropy sources
for cryptographic operations.
## Changes
### Files Modified
1. **crypto/tinycrypt/CMakeLists.txt**
- Add UNIX platform flag to CMake configuration
- Enable compilation on UNIX-like systems
2. **crypto/tinycrypt/Makefile**
- Update Makefile compilation flags
- Add UNIX platform support to build system
## Technical Details
**Random Number Generation:**
- Enables access to `/dev/random` for entropy source
- Improves cryptographic security through proper RNG initialization
- Ensures platform-specific compilation on UNIX systems
**Build Configuration:**
- Updates both CMake and Makefile build systems
- Maintains consistency across build toolchains
- Enables conditional compilation for UNIX platforms
## Impact
- **Security**: Enables proper entropy source access for cryptographic
operations
- **Compatibility**: Extends tinycrypto support to UNIX-like platforms
- **Randomness**: Improves cryptographic random number generation quality
- **Build System**: Ensures consistent configuration across build tools
## Testing
**Test Environment:**
- UNIX-like systems with `/dev/random` support
- NuttX standard build system
**Test Procedure:**
1. Build tinycrypto with UNIX platform flag enabled
2. Verify `/dev/random` access is properly configured
3. Test cryptographic random number generation
4. Validate build on various UNIX platforms
5. Check backward compatibility with existing configurations
**Test Results:**
- ✅ UNIX compilation flags apply correctly
- ✅ /dev/random access properly configured
- ✅ Random number generation functional
- ✅ CMake and Makefile builds successful
- ✅ No regressions in existing functionality
- ✅ Cross-platform compatibility maintained
## Related Issues
- TinyCrypto random number generation enhancement
- UNIX platform support for tinycrypto library
- Cryptographic entropy source configuration
--
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]