My PGP key takes up a huge, multi-line block of text, but my Bitcoin private key is just a small string. Yet both are considered extremely secure. Why is my PGP private key so long?


GPG keys are usually RSA keys. RSA keys are based on the difficulty of the factorization. Keys are usually 2048 or 4098 bits.

Bitcoin uses ECDSA (Elliptic Curve Digital Signature Algorithm), where keys are usually smaller. Bitcoin uses the curve secp256k1 where keys are 256bits.

Roughly, an RSA key with 2048 bits offer similar security then a 256 bit ECDSA key. Both offer more or less 128bit of "symmetric" security.

With newer versions of GPG you can also generate and use EC keys (nist-P, ed25519 or secp256k1)

  • 1
    PGP keys can also be DSA/ElGamal which are about the same size as RSA. In addition a PGP 'secret' (private) key packet actually includes both the private and public key values, with the private part encrypted which adds some overhead, plus metadata: at least one userid and usually at least one signature and sometimes other attributes. And a PGP key block (either public or secret=private) usually includes not just one keypair but a 'master' key and one or sometimes more subkey(s). OTOH PGP uses base64 while bitcoin uses base58 which is a tiny bit less space-efficient. – dave_thompson_085 Dec 20 '17 at 10:40
  • Thanks for the help, both of you...The part about a PGP key block containing a bunch of extra data makes a lot of sense. I have some follow-ups though if that's okay: 1) Why does an RSA key need to be 2048 bits to offer similar security compared to a 256-bit ECDSA key? 2) Does the fact that Bitcoin keys are only used for signing whereas a PGP key is used for both signing and encrypting have anything to do with this? – steevven1 Dec 20 '17 at 14:24
  • I propose, that this is a good question for another crypto forum? Bitcoin doesn't use RSA... – pebwindkraft Dec 20 '17 at 15:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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