Post Reply 
Does the HP Prime have HWRNG?
01-13-2021, 05:35 AM
Post: #1
Does the HP Prime have HWRNG?
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?

Cemetech | YouTube
Visit this user's website Find all posts by this user
Quote this message in a reply
01-13-2021, 06:33 AM
Post: #2
RE: Does the HP Prime have HWRNG?
(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()
Find all posts by this user
Quote this message in a reply
01-13-2021, 09:02 AM
Post: #3
RE: Does the HP Prime have HWRNG?
I think random() is a pseudo-random number generator, rather than a hardware random number generator.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
01-13-2021, 09:59 AM (This post was last modified: 01-13-2021 10:00 AM by C.Ret.)
Post: #4
RE: HP Prime does NOT have any HWRNG.
No doubt, even the in-display [ [?] Help ] key state it.

Quote:RANDOM([a],[b][c])

Returns a pseudo-random number generated using a seed value, and updates the seed value.
Find all posts by this user
Quote this message in a reply
01-13-2021, 11:49 AM (This post was last modified: 01-13-2021 11:49 AM by Peet.)
Post: #5
RE: Does the HP Prime have HWRNG?
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?
Find all posts by this user
Quote this message in a reply
01-13-2021, 03:57 PM
Post: #6
RE: Does the HP Prime have HWRNG?
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."
Find all posts by this user
Quote this message in a reply
01-13-2021, 04:25 PM
Post: #7
RE: Does the HP Prime have HWRNG?
(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.
Find all posts by this user
Quote this message in a reply
01-13-2021, 07:33 PM
Post: #8
RE: Does the HP Prime have HWRNG?
"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.
Find all posts by this user
Quote this message in a reply
01-13-2021, 09:36 PM (This post was last modified: 01-13-2021 09:41 PM by Peet.)
Post: #9
RE: Does the HP Prime have HWRNG?
(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.
Find all posts by this user
Quote this message in a reply
01-13-2021, 10:05 PM
Post: #10
RE: Does the HP Prime have HWRNG?
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.
Find all posts by this user
Quote this message in a reply
01-13-2021, 10:49 PM
Post: #11
RE: Does the HP Prime have HWRNG?
(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 Big Grin
Find all posts by this user
Quote this message in a reply
01-18-2021, 07:02 PM
Post: #12
RE: Does the HP Prime have HWRNG?
(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?"

Nope. It still has a period, and is deterministic. Cryptologists are very, very picky about their RNG's.

Some stuff:
https://csrc.nist.gov/projects/random-bit-generation

https://www.picoquant.com/scientific/pro...duct-study

HP 33C 34C 11C 41CX 12C 15C HP71B 35s 50g Prime Rev. A, C, D. DM 41X, 42. TI 58C, 59, 74, 92-II, Voyage 200, nspire CX II-T, Sanyo ICC 82D and more
Find all posts by this user
Quote this message in a reply
01-19-2021, 12:26 PM
Post: #13
RE: Does the HP Prime have HWRNG?
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.

GĂ©rard.
Find all posts by this user
Quote this message in a reply
01-20-2021, 01:49 PM
Post: #14
RE: Does the HP Prime have HWRNG?
(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

HP 33C 34C 11C 41CX 12C 15C HP71B 35s 50g Prime Rev. A, C, D. DM 41X, 42. TI 58C, 59, 74, 92-II, Voyage 200, nspire CX II-T, Sanyo ICC 82D and more
Find all posts by this user
Quote this message in a reply
01-27-2021, 05:53 AM
Post: #15
RE: Does the HP Prime have HWRNG?
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!

Cemetech | YouTube
Visit this user's website Find all posts by this user
Quote this message in a reply
01-27-2021, 07:36 PM
Post: #16
RE: Does the HP Prime have HWRNG?
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.
Find all posts by this user
Quote this message in a reply
01-27-2021, 09:46 PM
Post: #17
RE: Does the HP Prime have HWRNG?
Which is why I wrote a Mersenne Twister for the Prime. 8^)
Find all posts by this user
Quote this message in a reply
01-28-2021, 01:21 AM
Post: #18
RE: Does the HP Prime have HWRNG?
(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.../random.py
https://docs.python.org/3/library/random.html

HP 33C 34C 11C 41CX 12C 15C HP71B 35s 50g Prime Rev. A, C, D. DM 41X, 42. TI 58C, 59, 74, 92-II, Voyage 200, nspire CX II-T, Sanyo ICC 82D and more
Find all posts by this user
Quote this message in a reply
01-28-2021, 02:53 PM
Post: #19
RE: Does the HP Prime have HWRNG?
I just searched the Prime Library for "Twister"
https://www.hpmuseum.org/forum/thread-7716.html

Of course, some folks suggested improvements. 8^)
Find all posts by this user
Quote this message in a reply
01-28-2021, 09:29 PM (This post was last modified: 01-29-2021 01:52 AM by Wolfgang.)
Post: #20
RE: Does the HP Prime have HWRNG?
(01-28-2021 02:53 PM)KeithB Wrote:  I just searched the Prime Library for "Twister"
https://www.hpmuseum.org/forum/thread-7716.html

Of course, some folks suggested improvements. 8^)

OMG, you are right! Sorry!
Thank you! Very nice work!

A very nice article:
http://h20331.www2.hp.com/hpsub/download...ors_V1.pdf

From Page 4: The Randomness of HP by Nelson&Shammas,
Appendix A HP's Pseudorandom Number Generator, Appendix B Selected PRNG Programs

HP 33C 34C 11C 41CX 12C 15C HP71B 35s 50g Prime Rev. A, C, D. DM 41X, 42. TI 58C, 59, 74, 92-II, Voyage 200, nspire CX II-T, Sanyo ICC 82D and more
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)