cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for testing firmware to dump raw RNG entropy source data for testing purposes

w8ivf
Associate

In both RM0433 and AN4320 reference is made to contact STMicroelectronics if one wants to attempt to dump the data from the RNG's raw entropy data for testing (like that described in the RM0433 document. I have tried opening a ticket with STMicroelectronics but they directed me to this forum instead as my request is not related to a company but an individual project. Can anyone help me either get a copy of this testing firmware to dump the raw entropy source data, or explain which combination of registers need to be set to get the raw entropy data.

Excerpts from documents referencing it.

"""

RM0433

Contact STMicroelectronics if above samples need to be retrieved for your product

"""

"""

AN4320

5.1.1 STM32 MCU side

The firmware package is provided upon request. For more details, contact the local ST

sales representative.

"""

I don't think it really matters so much, but just incase the device I intend to test with is the STM32H743VIT6.

Thanks!

2 REPLIES 2
TDK
Guru

The way I read it, I don't think the raw data (unconditioned) is available to the user. Only ST can do that.

If you feel a post has answered your question, please click "Accept as Solution".
w8ivf
Associate

Hey TDK, thanks for the reply. So there's a chance I may have misunderstood but let me put the full quote from the reference manual just to provide more context for why they made me think it was possible to obtain the raw data (perhaps with a special firmware).

From RM0433:

"""

RM0433 Page 1272

34.6 RNG entropy source validation

34.6.1 Introduction

In order to assess the amount of entropy available from the RNG, STMicroelectronics has

tested the peripheral using German BSI AIS-31 statistical tests (T0 to T8). The results can

be provided on demand or the customer can reproduce the tests.

34.6.2

Validation conditions

STMicroelectronics has tested the RNG true random number generator in the following

conditions:

RNG clock rng_clk= 48 MHz (CED bit = ’0’ in RNG_CR register) and rng_clk = 400 kHz

(CED bit = ‘1’ in RNG_CR register).

RM0433 Rev 7RM0433

34.6.3

True random number generator (RNG)

Data collection

In order to run statistical tests it is required to collect samples from the entropy source at raw

data level as well as at the output of the entropy source.

Contact STMicroelectronics if above samples need to be retrieved for your product.

"""

You will notice they say "the customer can reproduce the tests" and "In order to run statistical tests it is required to collect samples from the entropy source at raw

data level as well as at the output of the entropy source. Contact STMicroelectronics if above samples need to be retrieved for your product."

Regarding the note about STM being able to supply the firmware in AN4320, it was unclear to me whether this firmware would supply the raw entropy data, however upon further reading of AN4320 it does appear they are running the tests on the data after the conditioning engine has processed it (which is what one would want to do), so let's exclude that from further discussion, I apologize for misinterpreting it.

I took a brief look at

https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Zertifizierung/Interpretationen/AIS_31_Functionality_classes_for_random_number_generators_e.pdf

Source code available here

https://github.com/mjosaarinen/ais31-testsuite-v1.0

I don't fully understand the T0 through T8 tests but based on the document it does seem like one would want to feed preconditioned data into the tests to verify the characteristics of the raw entropy source are close to ideal. This seems to match with the statement from STM "from the entropy source at rawdata level as well as at the output of the entropy source".

I guess the only remaining comment I'de have is they are not clear whether after one "Contact STMicroelectronics if above samples need to be retrieved for your product." if they are going to provide a tool for one to extract the samples ones-self, or if one is going to need STM to physically extract them for the customer. I can't imagine it's the later, but perhaps it is.