Recent

Author Topic: Random - update library to use i7 DRNG?  (Read 2084 times)

AlanTheBeast

  • Sr. Member
  • ****
  • Posts: 348
  • My software never cras....
Random - update library to use i7 DRNG?
« on: April 06, 2015, 03:33:42 pm »
Is there any intention to implement the DRNG instruction in FPC?

Pros:   fast, high entropy

Cons:  specific, possibly compromised by the NSA.

Using the Ivy Bridge DRNG would probably require "mixing" with other DRNG's to remove biases created by the rumoured (supposed) NSA tinkering where crypto is concerned. But where other uses are concerned (simulation, gaming...) it would be much faster than current methods.
Everyone talks about the weather but nobody does anything about it.
..Samuel Clemens.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Random - update library to use i7 DRNG?
« Reply #1 on: April 06, 2015, 05:20:39 pm »
DRNG may be used to improve the entropy of Free Pascal's random number generator, if combined with other sources of randomness, but it shouldn't be the only source of entropy. Additionally, any platform dependence should be avoided, since DRNG is only implemented in certain Intel architectures like the Ivy Bridge chipset.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

 

TinyPortal © 2005-2018