Does the HP Prime have HWRNG? - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Does the HP Prime have HWRNG? (/thread-16171.html) |
Does the HP Prime have HWRNG? - TheLastMillennial - 01-13-2021 05:35 AM As I was comparing the HP Prime to a TI-89 ti, I discovered that the TI-89 has a Hardware Random Number Generator. Although I would assume the HP Prime would have such a feature, I'm not certain and I didn't see it documented anywhere. I was wondering if someone could clear this up? RE: Does the HP Prime have HWRNG? - Peet - 01-13-2021 06:33 AM (01-13-2021 05:35 AM)TheLastMillennial Wrote: I didn't see it documented anywhere. I was wondering if someone could clear this up? from the manual: random() RE: Does the HP Prime have HWRNG? - StephenG1CMZ - 01-13-2021 09:02 AM I think random() is a pseudo-random number generator, rather than a hardware random number generator. RE: HP Prime does NOT have any HWRNG. - C.Ret - 01-13-2021 09:59 AM No doubt, even the in-display [ [?] Help ] key state it. Quote:RANDOM([a],[b][c]) RE: Does the HP Prime have HWRNG? - Peet - 01-13-2021 11:49 AM A few questions: What did the TO mean, a) true random or b) hardcoded funktion? If he means "a", how does this work on the TI? Is the sequence "randseed() random()" a true/hardware random number generator? RE: Does the HP Prime have HWRNG? - KeithB - 01-13-2021 03:57 PM No, a hardware random number generator (Or TRNG) does not need a seed. On the TI cc1310 it uses: "The TRNG is built on 24 ring oscillators that create unpredictable output to feed a complex nonlinear combinatorial circuit.That post-processing of the output data is required to obtain cryptographically secure random data." RE: Does the HP Prime have HWRNG? - Peet - 01-13-2021 04:25 PM (01-13-2021 03:57 PM)KeithB Wrote: a hardware random number generator (Or TRNG) does not need a seed. It was a philosophical question. Isn't a PRN with a time-based seed not a TRN? (01-13-2021 03:57 PM)KeithB Wrote: On the TI cc1310 ... Is this in the way the TI-89ti does it? I can't find any info to TRNG on this calculator. RE: Does the HP Prime have HWRNG? - KeithB - 01-13-2021 07:33 PM "It was a philosophical question. Isn't a PRN with a time-based seed not a TRN?" Nope. It still has a period, and is deterministic. Cryptologists are very, very picky about their RNG's. I have no idea what the TI calculator uses. I just happen to be familiar with the CC1310. My google-foo failed looking up the TI-89 ti. Everything I see says it is a Motorola 68000 processor, which would mean no TRNG. RE: Does the HP Prime have HWRNG? - Peet - 01-13-2021 09:36 PM (01-13-2021 07:33 PM)KeithB Wrote: My google-foo failed looking up the TI-89 ti. Everything I see says it is a Motorola 68000 processor, which would mean no TRNG. I also found nothing about TRNG on the TI-89ti. So I assumed the TO may asked not about true random but a hardcoded function and asked for more information. (01-13-2021 07:33 PM)KeithB Wrote: It still has a period, and is deterministic. assumption (philosophical not science): randseed() without parameter uses the current time as seed. The start time of a manually started program cannot be determined or reproduced. So the first random() may be considered as a true random number. No clock in the world ist 100% accurate. If you use a new randseed() without parameter after the time when the inaccuracy of one's own clock occurred it also isn't a period. RE: Does the HP Prime have HWRNG? - KeithB - 01-13-2021 10:05 PM I am pretty sure that the NSA has the algorithm for every calculator's random function. Even changing the seed regularly will not protect your generator. RE: Does the HP Prime have HWRNG? - Peet - 01-13-2021 10:49 PM (01-13-2021 10:05 PM)KeithB Wrote: I am pretty sure that the NSA has the algorithm for every calculator's random function. On paper, scanned with Xerox RE: Does the HP Prime have HWRNG? - Wolfgang - 01-18-2021 07:02 PM (01-13-2021 07:33 PM)KeithB Wrote: "It was a philosophical question. Isn't a PRN with a time-based seed not a TRN?" Some stuff: https://csrc.nist.gov/projects/random-bit-generation https://www.picoquant.com/scientific/product-studies/pqrng-150-product-study RE: Does the HP Prime have HWRNG? - ggauny@live.fr - 01-19-2021 12:26 PM Hi Wolfgang my friend, Happy to read you!Do you have tried my little routine "Advent Sunday" ? May be you want to add to your DFX. Take care of you. RE: Does the HP Prime have HWRNG? - Wolfgang - 01-20-2021 01:49 PM (01-19-2021 12:26 PM)ggauny@live.fr Wrote: May be you want to add to your DFX. Cher Gerard, I take a look at first advent sunday. My HP11C purchased in the early eighties does generate Pseudo Random Numbers passing Knuth's spectral test (manual page 54). For my purposes enough. BTW: PM and Mail are ending in nirvana? ;-) No answers since last summer... Best wishes, Wolfgang RE: Does the HP Prime have HWRNG? - TheLastMillennial - 01-27-2021 05:53 AM Thank you for your answers everyone! I don't know what kind of HWRNG the TI-89 has, I was just curious if the HP Prime had one at all. It's interesting it doesn't have one but I don't expect that to be a problem at all. I completely forgot how well documented the help menu is, I didn't even think to check it on the RANDOM command! RE: Does the HP Prime have HWRNG? - John Keith - 01-27-2021 07:36 PM Another relevant point: Home on the prime uses the same linear congruential PRNG as other 12-digit calculators have since the 71b. CAS mode uses the Mersenne Twister algorithm. RE: Does the HP Prime have HWRNG? - KeithB - 01-27-2021 09:46 PM Which is why I wrote a Mersenne Twister for the Prime. 8^) RE: Does the HP Prime have HWRNG? - Wolfgang - 01-28-2021 01:21 AM (01-27-2021 09:46 PM)KeithB Wrote: Which is why I wrote a Mersenne Twister for the Prime. 8^) Wow, please show us the code! Do you use TT800 or MT19937? I'm interested in initialization, speed, and purposes. https://github.com/python/cpython/blob/3.9/Lib/random.py https://docs.python.org/3/library/random.html RE: Does the HP Prime have HWRNG? - KeithB - 01-28-2021 02:53 PM I just searched the Prime Library for "Twister" https://www.hpmuseum.org/forum/thread-7716.html Of course, some folks suggested improvements. 8^) RE: Does the HP Prime have HWRNG? - Wolfgang - 01-28-2021 09:29 PM (01-28-2021 02:53 PM)KeithB Wrote: I just searched the Prime Library for "Twister" OMG, you are right! Sorry! Thank you! Very nice work! A very nice article: http://h20331.www2.hp.com/hpsub/downloads/Apr13/S08_From_the_Editors_V1.pdf From Page 4: The Randomness of HP by Nelson&Shammas, Appendix A HP's Pseudorandom Number Generator, Appendix B Selected PRNG Programs |