Re: Mafia: Effulgent Edition
Posted: Sat Mar 21, 2015 2:18 am
I think there are two big reasons why OpenSSL-compatible RSA is a better tool for the job than PGP is. I think part of your twitching at using OpenSSL instead of GPG is that (because you haven’t been following the thread, and because you actually know enough about cryptography to write that) you don’t understand what “the job” is. If you knew that, I doubt you would have advised PGP, although I expect you still wouldn’t have liked the OpenSSL option.
First, “whatever [we] need it for here” is proving that we wrote something at one time without revealing what it is until later. The right tool for the job is hashing¹. PGP, OpenSSL, Truecrypt, one-time pads, etc. are all the wrong tool for the job. Anything that doesn’t contain “SHA” in it is probably the wrong tool for the job². You can tell they are the wrong tools for the job because we are explicitly forbidden for game reasons from actual private communication of the type encryption is usually meant to help with, and because the action of disclosing the message and proving it was written earlier is “sharing the private key”. All of the InfoSec nerd in me is twitching at using encryption at all for this, and there isn’t any left over for twitching at using the wrong type of encryption (although, as I explain below, I don’t think this actually is the wrong type).
So why did I tell Shoal that OpenSSL was the right tool for the job? Because almost everybody on the thread has been using OpenSSL-compatible RSA, and we were linked to a website which does RSA encryption and decryption with OpenSSL as a backend. If they use the OpenSSL command-line tool because they don’t like the website, everybody else will be able to verify Shoal’s messages if they don’t trust me. If I had advised Shoal to use gpg, or sha512sum, or practically anything else, then fewer people on the thread would have been able to follow through on his claims when later revealing the information.
Finally, I agree that GPG is almost certainly a better tool for sending encrypted and/or signed messages than the OpenSSL command line tool. After all, as the GPG man page says (third sentence of the DESCRIPTION section), “gpg features complete key management and all bells and whistles you can expect from a decent OpenPGP implementation”. However, all those bells and whistles³ make it harder to misuse in the way we want to. For example, keyrings aren’t particularly helpful in our case, and it seems to be impossible to use GPG without them. On the other hand, the OpenSSL command line tool, if most people were even using it, would be hard to get the hang of but easy to use in whatever way we wanted after that; after all, OpenSSL bills itself as not just SSL but “a full-strength general purpose cryptography library”. Since we’re doing something nonstandard, the more general library is better.
¹ There is a downside to hashing: you need to record the plaintext exactly. I’m listing this as a downside here relative to the others, where you still need the private key exactly, because it’s easier to think “Oh, I forgot a comma. I’ll just fix that” when something is in English instead of base64-encoded random data. Hashing also requires manual management of salt to avoid known-plaintext attacks, whereas that is handled automatically by OpenSSL and GPG.
² Yes, other cryptographic hashing algorithms exist. The best-known ones are MD5 and various SHAs, though, and it is possible to generate collisions in MD5 with arbitrary prefixes, making it worthless in this case.
³ Despite making good Effulgence puns
First, “whatever [we] need it for here” is proving that we wrote something at one time without revealing what it is until later. The right tool for the job is hashing¹. PGP, OpenSSL, Truecrypt, one-time pads, etc. are all the wrong tool for the job. Anything that doesn’t contain “SHA” in it is probably the wrong tool for the job². You can tell they are the wrong tools for the job because we are explicitly forbidden for game reasons from actual private communication of the type encryption is usually meant to help with, and because the action of disclosing the message and proving it was written earlier is “sharing the private key”. All of the InfoSec nerd in me is twitching at using encryption at all for this, and there isn’t any left over for twitching at using the wrong type of encryption (although, as I explain below, I don’t think this actually is the wrong type).
So why did I tell Shoal that OpenSSL was the right tool for the job? Because almost everybody on the thread has been using OpenSSL-compatible RSA, and we were linked to a website which does RSA encryption and decryption with OpenSSL as a backend. If they use the OpenSSL command-line tool because they don’t like the website, everybody else will be able to verify Shoal’s messages if they don’t trust me. If I had advised Shoal to use gpg, or sha512sum, or practically anything else, then fewer people on the thread would have been able to follow through on his claims when later revealing the information.
Finally, I agree that GPG is almost certainly a better tool for sending encrypted and/or signed messages than the OpenSSL command line tool. After all, as the GPG man page says (third sentence of the DESCRIPTION section), “gpg features complete key management and all bells and whistles you can expect from a decent OpenPGP implementation”. However, all those bells and whistles³ make it harder to misuse in the way we want to. For example, keyrings aren’t particularly helpful in our case, and it seems to be impossible to use GPG without them. On the other hand, the OpenSSL command line tool, if most people were even using it, would be hard to get the hang of but easy to use in whatever way we wanted after that; after all, OpenSSL bills itself as not just SSL but “a full-strength general purpose cryptography library”. Since we’re doing something nonstandard, the more general library is better.
¹ There is a downside to hashing: you need to record the plaintext exactly. I’m listing this as a downside here relative to the others, where you still need the private key exactly, because it’s easier to think “Oh, I forgot a comma. I’ll just fix that” when something is in English instead of base64-encoded random data. Hashing also requires manual management of salt to avoid known-plaintext attacks, whereas that is handled automatically by OpenSSL and GPG.
² Yes, other cryptographic hashing algorithms exist. The best-known ones are MD5 and various SHAs, though, and it is possible to generate collisions in MD5 with arbitrary prefixes, making it worthless in this case.
³ Despite making good Effulgence puns