News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Quick and dirty RDRAND test

Started by Gunther, September 30, 2013, 08:41:42 AM

Previous topic - Next topic

Gunther

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
You have to know the facts before you can distort them.

KeepingRealBusy

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.

habran

It would be great to include a speed testing  ;)
Cod-Father

Paulo

@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.

dedndave

RdRand is only available on intel ivy bridge processors, so far

from the wiki page...
QuoteA 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:

Paulo

Quote from: dedndave

it's as though it was named so you could make your own punchline   :lol:

A few come to mind.   :biggrin:

dedndave

an interesting article...

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

Paulo

Very nice article dedndave.
Now if I can only find a lava lamp with USB interface. :biggrin:

Gunther

Dave,

Quote from: KeepingRealBusy on September 30, 2013, 09:09:06 AM
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,

Quote from: habran on September 30, 2013, 09:40:21 AM
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
You have to know the facts before you can distort them.

habran

QuoteAt the moment I'm writing a Monte Carlo simulation :icon_eek:
Please explain???
Cod-Father

Gunther

Habran,

Quote from: habran on September 30, 2013, 10:53:23 PM
QuoteAt 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
You have to know the facts before you can distort them.

habran

Cod-Father