OS_GetLowEntropyData

Syntax

#include <nitro/os.h>
void OS_GetLowEntropyData( u32 buffer[8] );
  

Arguments

buffer Pointer to the 32-byte buffer used to store data generated from system status.

Return Values

None.

Description

This function generates and returns 32-byte data from the system status that may differ for each execution. A pointer to 32-byte memory with 4-byte alignment must be passed into the buffer.

32 bytes of data are generated from the current Tick value, the number of vertical lines being rendered, the last RTC value read, the last touch panel data read, the last mic level sample, the reception signal strength history for wireless communications, and the MAC address. The cost of calling this function is not high because data is only read from a particular memory address.

Since RTC is loaded once during the startup sequence, an entirely different value is returned almost every time the same DS is restarted. Since data also includes a MAC address, you can expect a different value to be returned by different DS units. However, there is no guarantee that a different value will always be returned. Since the configuration of returned data may change, do not use a particular field to represent data with a particular meaning.

Although the return value differs with each call, because its degree of disorder is low, assume this function is a low-entropy source when you use it. When using as a random number source for security purposes, be sure to call this function several times and to include the data in the random number seed. When mixed together, unidirectional push functions such as MD5 and SHA1 can be used. When you use this function for purposes unrelated to security, it's enough to apply a push function to the data returned by this function and use only the result as a random number seed.

See Also

MATH_CalcSHA1

Revision History

2005/07/27 Initial version.


CONFIDENTIAL