flat assembler
Message board for the users of flat assembler.

Index > Main > Intel has added a new instruction (RDRAND) Kewl !

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 17 Aug 2011, 04:50
Say hello to a new instruction RDRAND, Random number generator.

Here is the full changes post: http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developers-manual.html?wapkw=developers%20manual
Page 9

PS: Requires flash.
Post 17 Aug 2011, 04:50
View user's profile Send private message Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto 17 Aug 2011, 07:16
Thanks for your report, Do you know which set of processors support this instruction Question

_________________
Nil Volentibus Arduum Razz
Post 17 Aug 2011, 07:16
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1670
Location: Toronto, Canada
AsmGuru62 17 Aug 2011, 13:03
In that same manual there is a CPUID bit described as indicating the instruction presence.
Post 17 Aug 2011, 13:03
View user's profile Send private message Send e-mail Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 977
Location: Czechoslovakia
MazeGen 17 Aug 2011, 16:18
There's a chapter somewhere at the beginning of the manual that lists processors covered by the manual. Therefore, if the manual introduces new instruction, the most recent processor mentioned in the list should be the first one that supports it. There may be exceptions to this rule, of course.
Post 17 Aug 2011, 16:18
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1905
DOS386 18 Aug 2011, 04:39
> Intel has added a new instruction Kewl !

COOL Smile What does the new KEWL instruction do ?

> PS: Requires flash.

I see ... or not ... I can't download anything from them. Intel brings hot compatibility breaking technology again Sad
Post 18 Aug 2011, 04:39
View user's profile Send private message Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz 18 Aug 2011, 09:43
DOS386
http://www.urbandictionary.com/define.php?term=kewl Laughing I know, you're just trolling ^^
Post 18 Aug 2011, 09:43
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 20 Aug 2011, 05:30
Crap, now my processor requires Flash? WTF!
Post 20 Aug 2011, 05:30
View user's profile Send private message Reply with quote
me239



Joined: 06 Jan 2011
Posts: 200
me239 20 Aug 2011, 05:58
So how do we use? FASM doesn't support it yet, so what's the opcode for it along with the parameters?
Post 20 Aug 2011, 05:58
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 20 Aug 2011, 06:32
Direct link to PDF:

http://www.intel.com/content/dam/doc/manual/64-ia-32-architectures-software-developers-manual.pdf
me239 wrote:
So how do we use? FASM doesn't support it yet, so what's the opcode for it along with the parameters?
It is explained in the doc.
Post 20 Aug 2011, 06:32
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 20 Aug 2011, 07:46
me239 wrote:
FASM doesn't support it yet (...)

Not true. It is supported since 1.69.15
Post 20 Aug 2011, 07:46
View user's profile Send private message Visit poster's website Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto 20 Aug 2011, 08:10
version 1.69.15 (Aug 24, 2010)

[+] Added support for AVX, AES, PCLMULQDQ, FMA, RDRAND, FSGSBASE, F16C, FMA4
and XOP instruction sets. Wink

_________________
Nil Volentibus Arduum Razz
Post 20 Aug 2011, 08:10
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1905
DOS386 20 Aug 2011, 08:12
Quote:
version 1.69.15 (Aug 24, 2010)

[+] Added support for AVX, AES, PCLMULQDQ, FMA, RDRAND, FSGSBASE, F16C, FMA4, KEWL and XOP instruction sets.


1 year ago ... this was HOT news Shocked

> Page 9

NO. Page 11.

> so what's the opcode for it along with the parameters?

$0F, $C7, $F0 (latter for AX / EAX as operand)

Sad it hadn't been in since 8086 Sad

Anyone has an idea how much power or how many transistors it costs ?


Description: KEWL/RDRAND
Filesize: 21.4 KB
Viewed: 29180 Time(s)

KEWL.PNG



_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 20 Aug 2011, 08:12
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 20 Aug 2011, 08:29
I wonder what do they use for Nondeterministic random bit generator. Anyone has an idea?
Post 20 Aug 2011, 08:29
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1905
DOS386 20 Aug 2011, 08:36
Radioactive decay ??? Oops, it produces heat, Alpha or Beta + Gamma radiation, besides nondeterministic behavior Sad
Post 20 Aug 2011, 08:36
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1670
Location: Toronto, Canada
AsmGuru62 20 Aug 2011, 12:24
I once was a part of a project (1989, I believe) where RNG was done using the delays of a simple OR,AND elements. The fact is that delays between two pulses are not the exactly same - they differ in a miniscule sense, however some are smaller than average and some are larger. It may depend on a number of factors: background radiation levels, sun exposure, cosmic rays, temperature, magnetism, etc. So, basically, very presice pulse generator counts the size of delays and random sequence may be generated. Also, inside the device - the flow of delays can change - it may go through a different set of elements every time a number is generated. I wrote a self-test routine for this to detect if device is working properly.
Post 20 Aug 2011, 12:24
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 20 Aug 2011, 12:28
Usually the thermal noise across a resistor is the easiest way to generate non-determinism. It is also an easy circuit to make both in the nanometre silicon and the discrete domains. The only real problem with it is the proper way to ensure you don't sample too fast and start getting poor quality bits. Intel seemed to have solved this with a PRNG following the RNG to create higher bandwidth number generation.
Post 20 Aug 2011, 12:28
View user's profile Send private message Visit poster's website Reply with quote
emc



Joined: 20 Aug 2011
Posts: 90
Location: France
emc 21 Aug 2011, 02:19
I liked the use of RDTSC instruction to get randomized values... Sad
Post 21 Aug 2011, 02:19
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 21 Aug 2011, 12:20
emc wrote:
I liked the use of RDTSC instruction to get randomized values...
Yeah, and it worked also. But only if your read timings were already random. And only if you throw away the top bits and only use the low few bits. And only if a virus has not put you in hypervisor mode and is manipulating the counter value. Plus, doing that many times in a small loop is generally not a good way to generate high quality randomness.


Last edited by revolution on 21 Aug 2011, 13:23; edited 1 time in total
Post 21 Aug 2011, 12:20
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 21 Aug 2011, 13:17
emc wrote:
I liked the use of RDTSC instruction to get randomized values... Sad
I hope you haven't been dealing with cryptography.

_________________
Image - carpe noctem
Post 21 Aug 2011, 13:17
View user's profile Send private message Visit poster's website Reply with quote
emc



Joined: 20 Aug 2011
Posts: 90
Location: France
emc 21 Aug 2011, 14:25
Don't worry, I haven't been dealing with cryptography (fortunately). But before that new instruction, programmers had to work with rdtsc only?
Post 21 Aug 2011, 14:25
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.