#prng

Felix Palmen :freebsd: :c64:zirias@bsd.cafe
2025-04-15

About the #random thingie ... I need random data in #swad to generate unpredictable #session IDs.

I previously had an implementation trying the #Linux-originating #getrandom if available, with a fallback to a stupid internal #xorshift #PRNG, which could be disabled because it's obviously NOT cryptographically secure, and WAS disabled for the generation of session IDs.

Then I learned #arc4random is available on many systems nowadays (#FreeBSD, #NetBSD, even Linux with a recent-enough glibc), so I decided to add a compile check for it and replace the whole mess with nothing but an arc4random call IF it is available.

arc4random originates from #OpenBSD and provides the only sane way to get cryptographically secure random data. It automatically and transparently (re-)seeds from OS entropy sources, but uses an internal CSPRNG most of the time (nowadays typically #ChaCha20, so it's a misnomer, but hey ...). It never fails, it never blocks. It just works. Awesome.

Gea-Suan Lingslin@abpe.org
2024-12-17

從 Dart 的 PRNG 問題學一些經驗...

從 Lobste.rs 上看到的文章,在講 Dart 的 PRNG 問題:「Far From Random: Three Mistakes From Dart/Flutter's Weak PRNG」。

主要的經驗有兩組,第一個是 PRNG 與 CSPRNG 的差異,後者保證了難以預測的特性 (cryptographically

blog.gslin.org/archives/2024/1

#Computer #Murmuring #Programming #Security #Software #cryptography #csprng #dart #entropy #flutter #prng #random #security #seed

Gonçalo Valériodethos@s.ovalerio.net
2024-12-12

"Far From Random: Three Mistakes From Dart/Flutter's Weak PRNG"

zellic.io/blog/proton-dart-flu

#security #cybersecurity #infosec #prng

2024-11-30

Beating Pokemon Platinum Comprehensively
Obsession is simultaneously a wonderful and a terrible thing. Wonderful to behold from outside, awful to experience from within.

What kind of obsession produces an effort, not just to complete Pokemon Platinum, which after all was sold to kids with the expectation that they would be able to
setsideb.com/beating-pokemon-p
#retro #gamefreak #nintendo #nuzlocke #pokemon #PokemonPlatinum #PRNG #retro #video #youtube

2024-08-15

What’s So Random About Ms. Pac-Man
I'm not going to say that famously Ms. Pac-Man is a more random game than Pac-Man, because who really knows things like that who isn't a hardcore gamenerd. But among hardcore game nerds, it's common knowledge. (If you didn't know, A. congrats on your coolness, and B
setsideb.com/whats-so-random-a
#retro #ballymidway #mspacman #namco #PRNG #randomness #retro #retrogamemechanicsex #retrogamemechanicsexplained #RNG #video #youtube

Josué Boisvert :raylib:greenmoonmoon@mastodon.gamedev.place
2024-06-12

I was somewhat aware that a lot of literature had been written on #random number generation... but trying to get clean random number in #C lead me into a way deeper rabbit hole than I anticipated!
I'm not understanding half of what I'm reading but I'm becoming increasingly paranoid about my poor generated numbers!
#prng

Dantali0n :arch: :i3:dantalion@fosstodon.org
2024-03-30

In my journey to quantify the numerical error of my personal and several open source #FFT algorithms I have created a scaled pseudo random number generator with arbitrary precision floating point numbers. Here is a histogram of several ranges when the #PRNG output is scaled to be within -0.5 and 0,5

Histograms to demonstrate the uniformity of a random number generator that supports arbitrary precision floating point numbers.
2023-11-02
2023-07-09

The #Zobrist hash function used in Polyglot opening books is roughly 2.4 times faster than the #Zobrist hash #Stockfish uses for their transposition table. One reason is because the former uses a constant array of random u64 numbers to generate randomness whereas the latter uses a #PRNG with a constant seed. Also former requires pseudo-legality for en-passant whereas latter requires full-legality. #jja #chess

Jeroen Ruigrok van der Wervenasmodai
2023-05-29
Gonçalo Valériodethos@s.ovalerio.net
2023-05-01

"Funds of every wallet created with the Trust Wallet browser extension could have been stolen without any user interaction"

blog.ledger.com/Funds-of-every

#security #infosec #prng #cryptocurrencies

Ted Pavlic (he/him)tedpavlic@mas.to
2023-04-25

That's interesting. Every time I ask Google's #bard for random whole numbers, it gives me sawtooth-like ramping patterns. This is a great example for a stochastic simulation/numerical methods course -- uniformity, but not independence (i.e., bad random number generator).
#GPT #bard #LLM #randomness #PRNG #RNG

cynicalsecurity :cm_2:cynicalsecurity@bsd.network
2023-03-11
2023-03-08

Just started to compare pure-rand random number generators #prng with the ones coming within other #npm libraries and it is blazing fast 🤯 (guess what? it is now used by @fbjest🤫)

Joel K. Petterssonjoelkp@fosstodon.org
2023-01-29

I've made a fast soft-saturated #Gaussian approximation #PRNG.

joelkp.frama.io/blog/ran-softs

It's based on the Box-Muller transform, but changes it to:
1) Map each 32-bit integer input to two "independent" 32-bit uniform random numbers.
2) Use polynomials to transform those into the output, instead of sqrt(), log(), and sin() or cos().

For audio, when bounded amplitude is wanted, I think it's better than a real Gaussian PRNG. It's also in saugns v0.4.0 (sau.frama.io/language.html#ras).

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst