Tech News
← Home  ·  All topics

Random Number Generation

2 GoKawiil briefs on this topic · RSS for random number generation

MuPDF and Foxit found to generate weak AES-256 keys for encrypted PDFs

Researchers found that several PDF applications claiming AES-256 encryption actually derive their 32-byte file keys from a tiny or predictable pool of randomness. MuPDF, before version 1.28.5, seeded its random number generator with only the current time in seconds, leaving just 9 bits of effective entropy in the resulting key, while Foxit was found to base its key generation on time-based randomness with similar weaknesses.

Modulo-based random selection skews uniform distributions

A technical explainer breaks down a widely used pattern in which a random 64-bit integer is reduced via the modulo operator to select among a fixed number of choices. It shows mathematically that when the number of choices does not evenly divide the range of the random number generator, some choices end up more likely than others, breaking the assumption of equal probability.