42 " |
42 " |
43 This generator uses the rdgen random generator which is built into modern intel chips. |
43 This generator uses the rdgen random generator which is built into modern intel chips. |
44 Before using, you should check via the isSupported query. |
44 Before using, you should check via the isSupported query. |
45 |
45 |
46 Warning: |
46 Warning: |
47 there have been discussions about the security of the intel rdgen instruction |
47 there have been discussions about the security of the intel rdgen instruction |
48 and whether there are NSA backdoors built into it. |
48 and whether there are NSA backdoors built into it. |
49 Linus Torwalds refuses to use it for /dev/urandom in the linux kernel, for that very reason. |
49 Linus Torwalds refuses to use it for /dev/urandom in the linux kernel, for that very reason. |
50 Be sure you know what you are doing, if you use this generator for sensitive cryptographic stuff. |
50 Be sure you know what you are doing, if you use this generator for sensitive cryptographic stuff. |
51 We recommend using one of the libcrypt-based generators and use this only to get additional |
51 We recommend using one of the libcrypt-based generators and use this only to get additional |
52 entropy for the seed. |
52 entropy for the seed. |
53 |
53 |
|
54 Warning2: |
|
55 the initial release of the AMD Ryzen3000 (without BIOS update) has a bug in returning the same |
|
56 (all 1s) random number every time. |
|
57 The code here checks for that an raises an error in the constructor if that bug is detected. |
|
58 Be sure to catch this exception in your code and fall back to another random generator if raised. |
|
59 |
54 NO WARRANTY |
60 NO WARRANTY |
55 |
61 |
56 RandomRDGen new nextInteger |
62 RandomRDGen new nextInteger |
57 |
63 |
58 [see also:] |
64 [see also:] |
59 RandomGenerator - the default; uses the machine's /dev/random if available |
65 RandomGenerator - the default; uses the machine's /dev/random if available |
60 Random - fast, but generates less quality random numbers |
66 Random - fast, but generates less quality random numbers |
61 RandomTT800 - another random generator |
67 RandomTT800 - another random generator |
62 RandomParkMiller - another random generator |
68 RandomParkMiller - another random generator |
63 RandomMT19937 - another random generator |
69 RandomMT19937 - another random generator |
64 RandomKISS - another random generator |
70 RandomKISS - another random generator |
65 exept:libcrypt - a library containing more stuff based on hashes and cyphers |
71 exept:libcrypt - a library containing more stuff based on hashes and cyphers |
66 |
72 |
67 [author:] |
73 [author:] |
68 Claus Gittinger. |
74 Claus Gittinger. |
69 " |
75 " |
70 ! ! |
76 ! ! |
71 |
77 |
72 !RandomRDRand class methodsFor:'instance creation'! |
78 !RandomRDRand class methodsFor:'instance creation'! |
73 |
79 |