The MASM Forum
64 bit assembler => 64 Bit Assembler => Topic started by: Gunther on September 30, 2013, 08:41:42 AM
-
Attached is the archive RAND1.ZIP; it contains the sources and the running EXE for a first RDRAND test application. It generates 1 billion random numbers and checks for generating errors. Here is the output of the program:
Generating 1 billion random numbers with RDRAND
That'll take a little while ...
Number of generated random numbers = 1000000000
Generating errors = 0
Gunther
-
Gunther,
I have read the links to the various discussions about rdrand, and checked my PDF's for my AMD laptop. I see no reference to RDRAND in any of the PDF's. Is this not supported except for INTEL chips?
Or is it just not mentioned for security reasons?
Dave.
-
It would be great to include a speed testing ;)
-
@KeepingRealBusy
As far as I know, AMD does not support RdRAND.
You can check this by first using CPUID then checking to see if bit 30 of ecx is set.
(as Gunther does in his code).
If not set means your cpu does not support RdRAND.
Another related instruction is RdSEED which can be used to seed a PRNG of arbitary width.
-
RdRand is only available on intel ivy bridge processors, so far
from the wiki page...
A new random number generator and the RdRand instruction, codenamed Bull Mountain.
it's as though it was named so you could make your own punchline :lol:
-
it's as though it was named so you could make your own punchline :lol:
A few come to mind. :biggrin:
-
an interesting article...
http://spectrum.ieee.org/computing/hardware/behind-intels-new-randomnumber-generator (http://spectrum.ieee.org/computing/hardware/behind-intels-new-randomnumber-generator)
it's a shame the cloud of conspiracy might impair the future of technology
-
Very nice article dedndave.
Now if I can only find a lava lamp with USB interface. :biggrin:
-
Dave,
I have read the links to the various discussions about rdrand, and checked my PDF's for my AMD laptop. I see no reference to RDRAND in any of the PDF's. Is this not supported except for INTEL chips?
Up to now only for Intel Ivy Bridge processors.
Habran,
It would be great to include a speed testing ;)
it's only quick and dirty. At the moment I'm writing a Monte Carlo simulation. Please have patience.
Gunther
-
At the moment I'm writing a Monte Carlo simulation :icon_eek:
Please explain???
-
Habran,
At the moment I'm writing a Monte Carlo simulation :icon_eek:
Please explain???
you're impatient. I'll provide not only the source (C + Assembly Language), but also the necessary mathematical background information.
Gunther
-
Sagenhaft 8)