Sure: I've used 40-gigabit Infiniband, and of course it tries hard to avoid poking the CPU. But what exactly do you think the RNG issue is?
-
-
Replying to @hashbreaker
I like your RNG and its properties better, but caches cause jitter and use memory is all :/ does matter in some apps.
1 reply 0 retweets 0 likes -
Replying to @colmmacc @hashbreaker
I'm going to implement it, but I think I'd cache internally only to the drbg_generate() equivalent, rekey each generate call. Make sense?
1 reply 0 retweets 0 likes -
Replying to @colmmacc
How about benchmarking the simple secure thing first, and then seeing whether there's a real argument for doing something more complicated?
1 reply 0 retweets 0 likes -
Replying to @hashbreaker
Caching RNG output is a common optimization, even for urandom, but I've had to remove it several times from things.
2 replies 0 retweets 0 likes -
Replying to @colmmacc
Typical RNG code (e.g., OpenSSL RAND_bytes) takes longer to generate 1 byte than a fast-key-erasure RNG takes to fill up a 768-byte buffer.
1 reply 0 retweets 0 likes -
Replying to @hashbreaker
That's compelling, but I still don't want jitter. Seems easy enough to do.
1 reply 0 retweets 0 likes -
Replying to @colmmacc @hashbreaker
I don't think you can compare so neatly to RAND_bytes, without thread/fork safety. Either need locks or thread-local storage + fork-guard.
1 reply 0 retweets 0 likes -
Replying to @colmmacc @hashbreaker
Which will add slowness, or memory, or more likely a bit of both. Obviously the underlying algorithm is better, but locks esp can dominate.
1 reply 0 retweets 0 likes -
Replying to @colmmacc
Sure. But my point is that you're already doing a mix of miscellaneous microsecond-scale operations. This RNG is always faster than that.
1 reply 0 retweets 0 likes
Yep, not a speed thing, I just want to make randombytes() constant-time. I'll test and measure too. Very flat times possible with DPDK etc.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.