1528 views|2 replies

47

Posts

0

Resources
The OP
 

Shanghai Hangxin ACM32F070 Development Board + Touch Function Evaluation Board - Part 4 HRNG Module and Random Number Generation Time Measurement [Copy link]

 This post was last edited by oxygen_sh on 2022-10-26 22:54

This evaluation experiment uses the TRNG module to generate 256-bit random numbers and measures the random number generation time.

According to chip data, the HRNG module contains a reliable noise oscillator that generates random numbers that meet international and national cryptographic testing standards.

The execution time of the random number generation function HAL_HRNG_GetHrng() can be measured using Systick. See the code below for details.

Here is the implementation code:

void APP_Hrng_Test(void)
{
	UINT32 i;
	UINT32 j;
	UINT32 tickcount;

	printfS("---------HRNG test-------\n");
	SysTick->VAL   = 0UL;  
	HAL_HRNG_GetHrng(data_buf, 32);
	tickcount = SysTick->VAL;
	tickcount = 640000 - tickcount;
	printfS("time used: %d us\r\n", tickcount/64);
	
	for(i = 1; i < 32; i++)
	{
		printfS("%x", data_buf);

	}
		printfS("\r\n");
}

Test results: When the main clock frequency is 64MHz, the random number generation time is about 190us.

In addition, the generation time may differ by several us each time. Due to limited information about HRNG, it is unclear what causes this time difference.

This post is from Domestic Chip Exchange

Latest reply

According to the chip data, the HRNG module contains a reliable noise oscillator, and the random number generation meets international and national cryptographic testing standards. This function is quite powerful.   Details Published on 2022-10-27 09:35
 
 

6555

Posts

0

Resources
2
 

There is not much information about HRNG. Netizens are welcome to share some

This post is from Domestic Chip Exchange
 
 
 

6818

Posts

11

Resources
3
 

According to the chip data, the HRNG module contains a reliable noise oscillator, and the random number generation meets international and national cryptographic testing standards. This function is quite powerful.

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list