Recent

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

AlanTheBeast

  • Jr. Member
  • **
  • Posts: 73
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.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1132
    • 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.0.10 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux

 

TinyPortal © 2005-2018