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


  • Full Member
  • ***
  • Posts: 184
  • 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.


  • Hero Member
  • *****
  • Posts: 1171
    • 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; //
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.

Lazarus 2.0.12 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux


TinyPortal © 2005-2018