2
$\begingroup$

My knowledge of cryptography nothing beyond basic so I am by no means an expert, but I do know a bit of undergraduate mathematics including number theory.

I know that stream ciphers like ChaCha20 is inspired by the one-time pad, but is there a way to use ChaCha20 or modify it to guarantee the same information-theoretic properties like that one-time pad assuming the keys used by ChaCha20 are truly random, one-time use, and is greater than or equal to the length of the plaintext? I was originally planning to combine the one-time pad XOR with Poly1305 for an information-theoretic AEAD, but I guess it's safer to use Bernstein's ChaCha20-Poly1305 instead.

$\endgroup$
1

2 Answers 2

1
$\begingroup$

Are you entirely clear as to what a one time pad is exactly? If you can input one time, truly random keys into the ChaCha state, you don't need the ChaCha bit. You could just use the key generator directly to XOR with the plain text. Consider that great speed (bits/s) is not required for home enthusiasts.

It might be worth perusing the OTP tag.

$\endgroup$
1
  • $\begingroup$ I thought of using ChaCha20-Poly1305 instead since it is a proven construct. I was, however, originally planning to use XOR-Poly1305, but I don't have a source whether this is a valid construct with information-theoretic properties. I do know for a fact that Poly1305 is a type of Wegman-Carter MAC though $\endgroup$
    – cryptobro
    Commented Mar 26 at 21:07
1
$\begingroup$

No, probably not. For it to be theoretically secure each resulting key stream should be as likely any other after going over the entire key space, given a nonce. This is unlikely as the output is basically randomized using the keys, so just by chance some outputs will be more likely than others. Thus if one plaintext is more likely than another you'd "leak" an almost infinitely small amount of information after performing a gargantuan (i.e. computationally infeasible) amount of work.

This, of course, is not practical, but if we would want "practical" we would not bother with the question about theoretic security in the first place. For all intents and purposes ChaCha20 is fine.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.