Secure Randomness in Go 1.22
https://go.dev/blog/chacha8rand [go.dev]
2024-05-07 06:15
tags:
development
go
programming
random
security
update
Computers aren’t random. On the contrary, hardware designers work very hard to make sure computers run every program the same way every time. So when a program does need random numbers, that requires extra effort. Traditionally, computer scientists and programming languages have distinguished between two different kinds of random numbers: statistical and cryptographic randomness. In Go, those are provided by math/rand and crypto/rand, respectively. This post is about how Go 1.22 brings the two closer together, by using a cryptographic random number source in math/rand (as well as math/rand/v2, as mentioned in our previous post). The result is better randomness and far less damage when developers accidentally use math/rand instead of crypto/rand.
source: HN
Randar: A Minecraft exploit that uses LLL lattice reduction to crack server RNG
https://github.com/spawnmason/randar-explanation/blob/master/README.md [github.com]
2024-04-19 01:22
tags:
gaming
java
math
opsec
programming
random
Every time a block is broken in Minecraft versions Beta 1.8 through 1.12.2, the precise coordinates of the dropped item can reveal another player’s location. “Randar” is an exploit for Minecraft which uses LLL lattice reduction to crack the internal state of an incorrectly reused java.util.Random in the Minecraft server, then works backwards from that to locate other players currently loaded into the world.
source: HN
When Random Isn't
https://orlp.net/blog/when-random-isnt/ [orlp.net]
2024-01-16 05:43
tags:
gaming
programming
random
security
So there were two environments: an insecure one where you can get all information but can’t act on it, and a secure one where you can act but can’t get the information needed for automation.
An evil idea came in my head: random number generators (RNGs) used in computers are almost always pseudorandom number generators with (hidden) internal state. If I can manipulate this state, perhaps I can use that to pass information into the secure environment.
source: HN
The digital ranging system that measured the distance to the Apollo spacecraft
http://www.righto.com/2022/04/the-digital-ranging-system-that.html [www.righto.com]
2022-04-24 18:44
tags:
hardware
random
retro
space
The basic idea was to send a radio signal to the spacecraft and determine how long it takes to return. Since the signal traveled at the speed of light, the time delay gives the distance. The main problem is that due to the extreme distance to the spacecraft, a radar-like return pulse would be too weak. The ranging system solved this in two ways. First, a complex transponder on the spacecraft sent back an amplified signal. Second, instead of sending a pulse, the system transmitted a long pseudorandom bit sequence. By correlating this sequence over multiple seconds, a weak signal could be extracted from the noise.
In this blog post I explain this surprisingly-complex ranging system. Generating and correlating pseudorandom sequences was difficult with the transistor circuitry of the 1960s. The ranging codes had to be integrated with Apollo’s “Unified S-Band” communication system, which used high-frequency microwave signals. Onboard the spacecraft, a special frequency-multiplying transponder supported Doppler speed measurements. Finally, communicating with the spacecraft required a complex network of ground stations spanning the globe.
And: https://righto.com/apollo/ranging-xor.html
http://www.righto.com/2022/05/talking-with-moon-inside-apollos.html
Changing std::sort at Google’s Scale and Beyond
https://danlark.org/2022/04/20/changing-stdsort-at-googles-scale-and-beyond/ [danlark.org]
2022-04-20 18:32
tags:
bugfix
cxx
library
perf
programming
random
sorting
We are changing std::sort in LLVM’s libcxx. That’s a long story of what it took us to get there and all possible consequences, bugs you might encounter with examples from open source. We provide some benchmarks, perspective, why we did this in the first place and what it cost us with exciting ideas from Hyrum’s Law to reinforcement learning. All changes went into open source and thus I can freely talk about all of them.
This article is split into 3 parts, the first is history with all details of recent (and not so) past of sorting in C++ standard libraries. Second part is about what it takes to switch from one sorting algorithm to another with various bugs. The final one is about the implementation we have chosen with all optimizations we have done.
source: HN
The games Nintendo didn't want you to play: Tengen
https://nicole.express/2022/the-center-point-can-not-hold.html [nicole.express]
2022-04-17 20:04
tags:
article
business
development
gaming
hardware
random
retro
Recently, I took a look at Nintendo’s MMC line of mappers, and some other boards. All boards for the NES’ western releases had to be manufactured by Nintendo, and so they generally met certain standards set by Nintendo. But these rules were enforced by technology, not by law. And the company that had previously killed the American game industry decided to break those rules. Madness? No. This… is Tengen.
Lots of custom cartridges here.
Some additional info: https://hackmii.com/2010/01/the-weird-and-wonderful-cic/
source: HN
Harder Drive: Hard drives we didn't want or need
http://tom7.org/harder/ [tom7.org]
2022-04-13 04:29
tags:
hardware
networking
random
retro
solder
storage
video
Dissecting Lemire’s nearly divisionless random
https://veryseriousblog.com/posts/dissecting-lemire [veryseriousblog.com]
2020-10-03 03:40
tags:
math
perf
programming
random
The idea was simple, I’ve always felt that code readability is undervalued so I figured I’d put cold hard cash up. I announced a $1,000 pot, divided into $500, $300, and $200 prizes for the most readable implementations of Daniel Lemire’s nearly divisionless algorithm for selecting a random number from an interval. I now have winners to announce and congratulate, and they’re in this blog post, but there’s more to this story.
'A Million Random Digits' Was a Number-Cruncher’s Bible. Now One Has Exposed Flaws in the Disorder.
https://www.wsj.com/articles/rand-million-random-digits-numbers-book-error-11600893049 [www.wsj.com]
2020-09-25 03:25
tags:
investigation
random
retro
A 1955 Rand Corp. book had a reputation as the go-to source for figures used by pollsters, analysts, researchers; engineer Gary Briggs has ruined it
I would say ruined is more than a bit strong, but good story.
Mr. Briggs hypothesized a technician dropped cards and put them back in the wrong order. He envisioned running computer simulations to re-create the error by moving a card or two out of place.
Another look at two Linux KASLR patches
https://www.kryptoslogic.com/blog/2020/03/another-look-at-two-linux-kaslr-patches/ [www.kryptoslogic.com]
2020-03-25 01:51
tags:
linux
math
random
security
In the end, this random number generator was quickly removed, and that was that. But one can still wonder—is this generator secure but unanalyzed, or would it have been broken just to prove a point?
source: R
The Linux CSPRNG Is Now Good!
https://buttondown.email/cryptography-dispatches/archive/cryptography-dispatches-the-linux-csprng-is-now/ [buttondown.email]
2020-02-10 23:27
tags:
development
linux
random
security
update
Oceans of ink and hours on stage have been spent to convince the world that the best random number generator is /dev/urandom, the kernel one. And it is, and it’s always been. However, an uncomfortable truth was that the Linux CSPRNG really could have been better than it was. Userspace CSPRNGs couldn’t be better than the kernel one, so our advice was still valid, but that space for improvement always frustrated me.
Good news everyone! In recent years, the Linux CSPRNG got a number of great incremental improvements, and I can now say in good conscience that it’s not only the best, it’s also good.
On Linux's Random Number Generation
https://research.nccgroup.com/2019/12/19/on-linuxs-random-number-generation/ [research.nccgroup.com]
2019-12-20 23:40
tags:
linux
random
security
I have been asked about the usefulness of security monitoring of entropy levels in the Linux kernel. This calls for some explanation of how random generation works in Linux systems.
So, randomness and the Linux kernel. This is an area where there is longstanding confusion, notably among some Linux kernel developers, including Linus Torvalds himself.
source: HN
OpenSSH Key Shielding
https://xorhash.gitlab.io/xhblog/0010.html [xorhash.gitlab.io]
2019-12-18 13:48
tags:
crypto
defense
openbsd
programming
random
security
sidechannel
On June 21, 2019, support for SSH key shielding was introduced into the OpenBSD tree, from which the OpenSSH releases are derived. SSH key shielding is a measure intended to protect private keys in RAM against attacks that abuse bugs in speculative execution that current CPUs exhibit. This functionality has been part of OpenSSH since the 8.1 release. SSH private keys are now being held in memory in a shielded form; keys are only unshielded when they are used and re‐shielded as soon as they are no longer in active use. When a key is shielded, it is encrypted in memory with AES‐256‐CTR; this is how it works:
source: L
How a months-old AMD microcode bug destroyed my weekend
https://arstechnica.com/gadgets/2019/10/how-a-months-old-amd-microcode-bug-destroyed-my-weekend/ [arstechnica.com]
2019-10-29 21:35
tags:
bugfix
cpu
hardware
linux
random
Unfortunately, unpatched Ryzen 3000 says “yes” to the CPUID 01H call, sets the carry bit indicating it has successfully created the most artisanal, organic high-quality random number possible... and gives you a 0xFFFFFFFF for the “random” number, every single time.
Unfortunately, after successfully applying the update and rebooting again, I realized my error—yes, Asus showed a later date for the BIOS, but the actual version was the same as the one I already had—3.2.0. My CPU still thought 0xFFFFFFFF was the randomest number ever, always, no matter what.
At this point, I began to get paranoid—systemd had already quietly worked around the bug. But with most applications just quietly ignoring the problem, how would I know if it ever had been patched? What if two years later, I was still vulnerable to stack-smashing that I shouldn’t have been, due to ASLR that wasn’t actually randomizing?
Another entry for the bad workarounds file.
source: HN
Visual Information Theory
https://colah.github.io/posts/2015-09-Visual-Information/ [colah.github.io]
2019-09-24 23:09
tags:
article
compsci
ideas
math
random
visualization
Information theory gives us precise language for describing a lot of things. How uncertain am I? How much does knowing the answer to question A tell me about the answer to question B? How similar is one set of beliefs to another? I’ve had informal versions of these ideas since I was a young child, but information theory crystallizes them into precise, powerful ideas. These ideas have an enormous variety of applications, from the compression of data, to quantum physics, to machine learning, and vast fields in between.
Unfortunately, information theory can seem kind of intimidating. I don’t think there’s any reason it should be. In fact, many core ideas can be explained completely visually!
source: E
The history of Tetris randomizers
https://simon.lc/the-history-of-tetris-randomizers [simon.lc]
2019-09-08 19:52
tags:
gaming
random
In Tetris, a randomizer is a function which returns a randomly chosen piece. Over the years, the rules of how pieces are chosen has evolved, affecting gameplay and actual randomness.
Several of them have been reversed engineered and documented. I’ve curated a list of ones that I believed to be important and show how the state of Tetris has changed over the years.
source: trivium
The Synchronization of Periodic Routing Messages
https://www.icir.org/floyd/papers/sync_94.pdf [www.icir.org]
2019-09-06 22:05
tags:
compsci
networking
paper
pdf
perf
random
systems
The paper considers a network with many apparently-independent periodic processes and discusses one method by which these processes can inadvertently become synchronized. In particular, we study the synchronization of periodic routing messages, and offer guidelines on how to avoid inadvertent synchronization. Using simulations and analysis, we study the process of synchronization and show that the transition from unsynchronized to synchronized traffic is not one of gradual degradation but is instead a very abrupt ‘phase transition’: in general, the addition of a single router will convert a completely unsynchronized traffic stream into a completely synchronized one. We show that synchronization can be avoided by the addition of randomization to the traffic sources and quantify how much randomization is necessary. In addition, we argue that the inadvertent synchronization of periodic processes is likely to become an increasing problem in computer networks.
Cache Attacks on CTR_DRBG
https://security.cohney.info/blackswans/ [security.cohney.info]
2019-09-04 18:47
tags:
crypto
exploit
paper
random
security
This post presents results from our paper “Pseudorandom Black Swans: Cache Attacks on CTR_DRBG”. We illustrate how omissions in the threat model of a U.S government’s standard lead to a practical, end-to-end attack on the most popular generator contained within.
Very nice.
paper: https://cohney.info/blackswans.pdf
source: HN
OpenSSH Taking Minutes To Become Available, Booting Takes Half An Hour ... Because Your Server Waits For A Few Bytes Of Randomness
https://daniel-lange.com/archives/152-hello-buster.html [daniel-lange.com]
2019-07-17 17:22
tags:
admin
bugfix
development
linux
random
turtles
Basically as of now the entropy file saved as /var/lib/systemd/random-seed will not - drumroll - add entropy to the random pool when played back during boot. Actually it will. It will just not be accounted for. So Linux doesn’t know. And continues blocking getrandom(). This is obviously different from SysVinit times2 when /var/lib/urandom/random-seed (that you still have lying around on updated systems) made sure the system carried enough entropy over reboot to continue working right after enough of the system was booted.
And then... it just kinda keeps getting worse. The problem is understandable, the inability to resolve it less so.
Looking for Entropy in All the Wrong Places
https://nullprogram.com/blog/2019/04/30/ [nullprogram.com]
2019-05-02 14:23
tags:
c
programming
random
systems
Imagine we’re writing a C program and we need some random numbers.