# OS_GetLowEntropyData

## C Specification

      #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 the degree of disorder is low, use this function assuming a low-entropy source. 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 pruposes 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_CalcMD5, MATH_CalcSHA1`

## Revision History

07/27/2005 Initial version.

CONFIDENTIAL