Skip to content

Commit 2eff4c7

Browse files
committed
- Added code to clear temporary variable on the stack before exiting the
trng_get_bytes; - Removed lp ticker as it does not satisfy the requirements of the lp timer.
1 parent de2b526 commit 2eff4c7

File tree

3 files changed

+4
-260
lines changed

3 files changed

+4
-260
lines changed

targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/api/lp_ticker_api.c

Lines changed: 0 additions & 259 deletions
This file was deleted.

targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/api/trng_api.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ int trng_get_bytes(trng_t *obj, uint8_t *output, size_t length, size_t *output_l
110110

111111
// Save the output
112112
output[i] = (uint8_t)(nRandomNum & 0xFF);
113+
114+
// Clear the nRandomNum variable for security purposes
115+
nRandomNum = 0;
113116
}
114117

115118
*output_length = length;

targets/targets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@
618618
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
619619
"macros": ["__ADUCM4050__", "EV_COG_AD4050LZ"],
620620
"extra_labels": ["Analog_Devices", "ADUCM4X50", "ADUCM4050", "EV_COG_AD4050LZ", "FLASH_CMSIS_ALGO"],
621-
"device_has": ["SERIAL", "STDIO_MESSAGES", "TRNG", "SLEEP", "INTERRUPTIN", "LOWPOWERTIMER", "RTC", "SPI", "I2C", "FLASH", "ANALOGIN"],
621+
"device_has": ["SERIAL", "STDIO_MESSAGES", "TRNG", "SLEEP", "INTERRUPTIN", "RTC", "SPI", "I2C", "FLASH", "ANALOGIN"],
622622
"device_name": "ADuCM4050",
623623
"detect_code": ["0603"],
624624
"release_versions": ["5"]

0 commit comments

Comments
 (0)