How random is random ()

Discussion and questions about programming with Ultibo.
pjde
Posts: 425
Joined: Tue Feb 09, 2016 6:21 am
Location: Sydney, Australia

How random is random ()

Postby pjde » Thu Apr 12, 2018 11:24 pm

Hi Garry

I am currently trying to devise a suitable entropy source for TLS.

My intial attempt is to define a single strong source based on the random function.

Do you know if it is sufficently random to be a good source or should I add other sources?

Regards

Paul
User avatar
Ultibo
Site Admin
Posts: 2079
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: How random is random ()

Postby Ultibo » Fri Apr 13, 2018 10:48 am

pjde wrote:I am currently trying to devise a suitable entropy source for TLS.

My intial attempt is to define a single strong source based on the random function.

Do you know if it is sufficently random to be a good source or should I add other sources?

As per the FPC documentation Random() uses the Mersenne Twister random number generator which according to Wikipedia is not cryptographically secure.

On the other hand, the BCM283X SoC includes a hardware random number generator device that is apparently random enough for cryptography, you can access it in Ultibo via the RandomRead* functions in the Platform unit or from the RandomDevice* functions in the Devices unit.
Ultibo.org | Make something amazing
https://ultibo.org
pjde
Posts: 425
Joined: Tue Feb 09, 2016 6:21 am
Location: Sydney, Australia

Re: How random is random ()

Postby pjde » Sun Apr 15, 2018 3:50 am

Thanks Garry

I will probably use the RandomRead functions to derive a strong entropy source and keep the random based function as a weak entropy source.

Regards

Paul

Return to “General”

Who is online

Users browsing this forum: No registered users and 4 guests