kfogel / OneTime

An open source encryption program that uses the "one-time pad" method.
http://red-bean.com/onetime
32 stars 14 forks source link

Support converting files into base64 #14

Closed HulaHoopWhonix closed 8 years ago

HulaHoopWhonix commented 8 years ago

I'm not sure if this is easily possible from within OneTime but encrypting any file type should be possible if they are converted into base64.

N.B. I listed your software here as a potential post-quantum crypto solution: https://www.whonix.org/w/index.php?title=PQCrypto&stable=0#OneTime

kfogel commented 8 years ago

Hi, @HulaHoopWhonix. OneTime can encrypt any kind of file -- it doesn't matter if the file's contents are Base64-encoded or not, because OneTime is not interpreting the contents of the file. It just treats the file as a string of bits. (The same is true of just about all encryption software, by the way; OneTime is not unique in this regard.)

I think listing OneTime as a post-quantum crypto solution is reasonable, if one considers OneTime to be a crypto solution at all :-). One-time pads should be secure against cryptographic attacks by quantum computers for the same reason they're secure against any other kind of attack: if the encryption key is truly random, and the key is as long as the message, then all possible plaintexts are equally likely. Quantum computers are not telepathic, so there shouldn't be any way they can attack a message properly encrypted with a one-time pad. Indeed, there really is no possible cryptographic attack against such a message. (Of course, using the system in practice can be difficult, due to the logistics of key exchange, but quantum computing won't affect that.)

HulaHoopWhonix commented 8 years ago

Great explanation. I will add your reply to our wiki if that's ok.

kfogel commented 8 years ago

Always OK, yup. I try not to exercise monopoly power on either my code or my prose :-).