Software Archive
Read-only legacy content

rdrand failing on i7-4960x

ed_e_
초급자
1,182 조회수

I verified that it is supported on this chip by issuing CPUID, EAX=1, and find bit 30 set in ECX. However, when trying the loop below, RAX and CF are zeroed on first call and stay zero forever. I tried same code on an I7-4770K and it works fine, native and in a Hyper-V VM running on that system.

Does anyone know why this wouldn't work on the 4960x? Is something needed to kickstart the hardware rand generator?

thanks,

top: rdrand

       jnc top

       ret

 

 

0 포인트
5 응답
Bernard
소중한 기여자 I
1,182 조회수
0 포인트
ed_e_
초급자
1,182 조회수

Thanks, I have already seen that doc and there is not anything in it other than use CPUID to verify support(I already did that) and issue the command, checking CF afterwards.

It is a one-instruction process, not much to it, and I am sure my code is OK because it works on other processors.

 I am looking for someone that has experience with rdrand and access to, or experience with, i7-4960x.

thanks,

 

0 포인트
Bernard
소중한 기여자 I
1,182 조회수

Maybe you should post your question on ISA forum.

0 포인트
zalia64
새로운 기여자 I
1,182 조회수

Ed: When / if you find the answer, please post it. I, too, wish to use that command - it solves a pressing need.

There are many projects in Physics and Applied Mathematics where a good random generator is useful. However, I would hesitate using it for high security cryptographic jobs: Are the numbers really random?   Recall the time when code of PGP encryption was 'munitions' and 'not allowed for export', long before September 11th. How come NSA allowed the rdrand mnemonic?  When the System offers a good cryptographic solution to anyone (including every terrorist) for free, be wary.

0 포인트
Bernard
소중한 기여자 I
1,182 조회수

@zalia64

You raised an interesting question.

0 포인트
응답