Linking an application with HAVEGE
Just link your application with HAVEGE(ARCH).o and HardClock(ARCH).s
GENERAL USAGE: int ndrand() high performance
high quality random numbers for current usage.
-
ndrand() outperforms usual rand() and random() generators.
-
Using the inlined version reduces execution time
of the generator by approximately one third (see the example HAVEGESPEEDINLINE).
-
Caution: ndrand () has been optimized for distribution
quality and throughput. Internal state of data variables is not intentionally
completely hidden from the outside world. ndrand() should not be used for
cryptographic applications.
CRYPTOGRAPHIC USAGE: int cryptondrand()
high performance high quality random numbers for cryptography.
-
cryptondrand() produces several megabytes of unpredictable
random numbers per cycle.
-
Each 1 Mbyte sequence of cryptondrand() results is
the exclusive-OR of the previous sequence with 32 consecutive 1 Mbyte sequences
of a ndrand()-like function results.
-
Each of these 33 individual sequences are already
high quality random number sequences.
-
Collection of a 1 Mbyte sequence spans over several
tens of operating system interrupts.
-
The 31 intermediate sequences are hidden from the
outside world. Hiding a single intermediate sequence is sufficient to ensure
irreproducibility.
Remark: When
possible you should avoid HAVEGE(ARCH).o new generation.
The number of iterations in the main loop of
HAVEGE coded in file LoopBody.h has been optimized in order to get the
executable for this loop body to fit in the instruction cache. The exact
size of this executable depends on the exact compiler version and the exact
compiler options used for its generation.
Back to HAVEGE main page