The case of the 9 bit AES key
48 points by ledoge 3 hours ago | 16 comments
tptacek 24 minutes ago
"MuPDF versions before 1.28.5 use an implementation of the drand48 family" yeah, ok, so they're basically not doing real encryption. The number of bits in the key space isn't the real story; the keys simply aren't cryptographically random.
replyubutler 35 minutes ago
Rule #1 of rolling your own RNG: don’t.
replyRule #2? Please don’t.
j16sdiz 23 minutes ago
That's why we use the system RNG !
replyflanz_10 7 minutes ago
btw, the idea that the system rng isnt good enough, or "runs out" or whatever, is no longer true on pretty much every modern, widely used os.
replybtw... im sure there's some legacy rng in windows or some shit that isnt good. read the docs but if it's the blessed system rng, you're probably fine!
although... i suppose if this is news to you (the person reading this), then you probably shouldn't be implementing whatever you are that really requires prng. ask a friend for help. im not trying to be a jerk, i just want to make sure you dont hurt yourself!
jeffbee 2 hours ago
You'd have to be completely off your rocker to use a PDF tool written in C anyway.
replyadvisedwang 53 minutes ago
very VERY few people judge tools like this by the language used to develop them.
replylirolero 2 hours ago
Genuine question, since I'm not very knowledgeable about this: why is using C for a PDF tool such a bad idea?
replytptacek 22 minutes ago
I think the claim is hyperbolic, since most people memory-unsafe PDF implementations, but PDF is a monster format, a metaformat that brings in virtually every conceivable display format, and their renderer implementations with them, often poorly-maintained, never-touched reference implementations from the before times. PDF is pretty scary.
reply