0

When generating Public/Private keys to encrypt email: Is there a line of thinking or reasoning to select one online key generator over the other?

Any suggestions or edits that will sharpen the question are appreciated. Thank you.

UPDATE

The thoughtful response consensus indicates that one must be able to trust the online generator and that it will not purposely generate a weak key or record the output and forward it to malicious actor.

The purpose of the encryption is to protect financial information and patent drafts. Wondering if comodo is trustworthy? (maybe this should be a separate question)

https://www.comodo.com/home/email-security/free-email-certificate.php

  • If you aren't just using crypto for fun (e.g., to keep your kid sister out of your email), I would install PGP and generate my own keys on hardware I trust. Having a website create a key (or password) for you easily allows them to either give you weak keys (e.g., generate random numbers from a small predictable set), or save copies of their keys. Even if you aren't doing anything nefarious, a hostile government/crime syndicate could generate a GPG key for you, search for it being used, and then upload a small commit into your git repository that say gives them a trojan horse. – dr jimbob Aug 22 '18 at 16:00
  • @drjimbob I have updated the post with some context. My online activity is not interesting enough to warrant a powerful actor to scrutinize \ attack anything I encrypt, however, I prefer to maintain some degree of privacy from Google G-mail – gatorback Aug 22 '18 at 17:07
3

The correct line of reasoning is DON'T. There are simply too many issues.

It could generate it using JavaScript and not send it to the server, but the JavaScript is sent by the server, and so could change at any time (and even for specific targeted users).

It could generate it using a good CSPRNG, but again, this can be changed to use a backdoored or weak PRNG at any time for any or all users. In this case there wouldn't be any network requests for you to notice, but your key would be easily breakable.

It could be using a CSPRNG seeded by the system, but it could at any time be changed to use a CSPRNG seeded with a random value known to the malicious website, in which case the key won't be weak but it will be known to the website anyway.

Only generate keys with software that you trust. Since JavaScript is sent by the website every time you visit it, you have to trust that the website was not compromised, is not malicious, and that the developers and maintainers are competent every time you visit it. It would be preferable to generate keys with a signed release of well known and widely trusted software such as GPG.

| improve this answer | |
1

I wouldn't recommend using any online key generator. Even if the website generates the keys client-side, it's still potentially possible for it to ship the keys elsewhere or use intentionally weak key generation.

Instead, you should generate the keys offline using a PGP tool like GPG: https://help.github.com/articles/generating-a-new-gpg-key/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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