Anthropic has made a major breakthrough in theoretical cryptanalysis (opens external site)
View full thread · View on Hacker News
To get push notifications on iPhone or iPad, add Hack and Chat to your Home Screen: tap Share → Add to Home Screen, then open the installed app and enable push in Settings.
View full thread · View on Hacker News
> any process f(x) that is easy to compute is also easy to invert in the sense that, for almost all values of x, given f(x), it is possible to find some x' with f(x') = f(x) in roughly the same amount of time it took to compute f(x).
In other words, under this hypothetical, any hash function like BLAKE3 is also (almost always) invertible. So, one possible attack against your stream cipher is: if you have a ciphertext and a crib, then you can invert the hash function to recover one possible key and decrypt the rest of the message (there may be multiple candidates, but the probability of more than one match decreases exponentially as the length of the crib increases).
Of course, if BLAKE3 is indistinguishable from a true random number generator, the stream cipher is indistinguishable from a true one-time pad. But no PRG has yet been proven indistinguishable from true randomness (as such would be a proof that P ≠ NP); and our premise is that such a PRG cannot exist and all PRGs are trivially breakable, which is why the distinction between OTP and a stream cipher is significant.
Replies (1)
> Of course, if BLAKE3 is indistinguishable from a true random number generator, the stream cipher is indistinguishable from a true one-time pad. But no PRG has yet been proven indistinguishable from true randomness (as such would be a proof that P ≠ NP); and our premise is that such a PRG cannot exist and all PRGs are trivially breakable, which is why the distinction between OTP and a stream cipher is significant.
Fully agree, but then how does one make a one time pad outside of using some "random" physical process to drive an algorithm to emit random bits? In other words, is it not true that most one time pads are themselves products of some PRNG?
Replies (1)
Under the premise posed, it's possible. Define f(x) to be some number of first bytes of the blake3 output after iteratively applying it like you describe with initial state x, and f(x) is a function we can invert like almost any other NP problem in Pessiland.
Yes, this is absurd. It's very unlikely that this is actually possible, especially so easily. But nobody's been able to prove that, and that's why P vs NP is such a significant open question.
> how does one make a one time pad outside of using some "random" physical process to drive an algorithm to emit random bits? In other words, is it not true that most one time pads are themselves products of some PRNG?
True randomness involves sampling some noisy physical process. It's not that hard; every x86 CPU includes a TRNG. So we certainly have the capability of creating a truly random one-time pad.
But of course, these are rarely used in practice because we have block ciphers and stream ciphers, which are way more useful as long as the underlying cipher isn't broken (i.e. as long as it cannot be distinguished from randomness). Your idea of using a PRG to seed something that looks like a one-time pad is very sensible, because that's exactly what a stream cipher is and these are very commonly used!
OTPs are mostly an object of academic study, and interesting because of their property that they are provably secure (unlike all cryptography based on NP problems). But this security proof relies on the true randomness (this is why I keep insisting that an "OTP" based on a PRG cannot be called OTP: because it does not have the one interesting property that OTP has).
The only time you'd use a one-time pad in practice is if you were very paranoid about encryption being broken; and in that case, you'd definitely want to use a truly random source, as you'd also need to worry about your PRG being broken.
So in some sense, the question "is it not true that most one time pads are themselves products of some PRNG" is a category error, because we would call that a stream cipher instead of a one time pad. (It doesn't make a difference whether you generate the keystream on the fly or generate it ahead of time and write it down for later). But in another sense, it is true, because stream ciphers are commonly used and one-time pads are not.