Has anyone seen a similar case involving MT19937 and nonce/key reuse?
Full disclosure of milksad vulnerability mention MT19937 used by older version of
bx binary.
We follow the call path:
pseudo_random::fill(data_chunk& out) -> pseudo_random::next() -> pseudo_random::next(uint8_t begin, uint8_t end) -> std::mt19937& pseudo_random::get_twister()Wait a moment.
mt19937,
twister - this uses the
Mersenne Twister PRNG? 🤔
At this point, the first alarm bells are going off. Mersenne Twister is not a CSPRNG, so it shouldn’t be in any code path that generates secrets. One alarming property of the Mersenne Twister is that its internal state can be reversed by an attacker who knows a few hundred outputs, endangering the secrecy of the other outputs of the same stream that the attacker doesn’t know (in simplified terms).