My question is about the key length of a asymetric algorithm. How is it possible to memorize or remember a key that is about 4000 bits long?


A 4000-bit RSA key is reasonable (more precisely, that would be the bit size of the public modulus; and 4096-bit would be more common). But it is not reasonable to memorize it (or, more precisely, that the owner try to memorize the corresponding private key); and that's practically never done.

One does not ask normal users to memorize or remember a key, or other information, with more than perhaps 50 bits worth of entropy (say as 8 characters among 77, or 2 phones numbers); even that is hard, and XKCD's method is probably more reasonable.

Long asymmetric private keys are usually

  • Stored encrypted by way of a symmetric algorithm using a stretched password/phrase as key, and stored on disk as a file; that's what PGP, GPG, and many other programs do.
  • Not stored, but rather re-generated at each use, from a passphrase combined with stretching seeding a CSPRNG used by the key generator; advantage is that the passphrase entirely replaces the private key in normal usage; but that makes safe passphrase change impossible; and requires a lot of stretching and a long passphrase to be secure.
  • Stored (and while we are at it used) inside a Smart Card protected by PIN with error counter (locking the card after 3 consecutive errors).

How is it possible to memorize or remember a key that is about 4000 bits long?

One could reasonably ask the same question about AES: how is it possible to remember a key that is 128 bits long?

The answer is: "it doesn't really matter, because no one actually tries to remember a sequence of 128 random bits, much less 4000 bits anyways".

Instead, we have computers do the memorizing; after all, they're going to do the operations on the RSA key anyways (certainly no one is going to attempt an RSA operation on a 4kbit by hand), so we might as well get them to do the memorization piece as well.

  • $\begingroup$ that's what I thought, doing RSA by hand would be really difficult! Thank you! $\endgroup$
    – Scarl
    Feb 28 '14 at 4:57
  • $\begingroup$ 4kbit RSA public key operation using small public exponent is feasible, even by hand. I strongly recommend using computer (or table/phone) for computationally heavier private key operation. $\endgroup$
    – user4982
    Feb 28 '14 at 18:17

Depends on your encryption method, but it is not unreasonable to have a key that is 4k bits. That being said, no one is expected to memorize that. Or even write it down. That should all be stored in memory.

  • $\begingroup$ that was my exact answer to the question because it made no logical sense for a human being to memorize it. $\endgroup$
    – Scarl
    Feb 28 '14 at 4:55

By key I assume you mean a passphrase. 4000 bits is 500 letters, with an average letter count of 4.5 in an English word, that's 125 words. With 15-20 words per sentence that's anywhere from 5 to 8 paragraphs. A small poem.

Yes, it's practical.

An actual key (like the PGP key one would post on their website) is ideally random so you can't be expected to remember more than a few characters.

  • 2
    $\begingroup$ Can't agree with " Yes, it's practical ". Do we live in a world with the same human capabilities? $\endgroup$
    – fgrieu
    Feb 28 '14 at 6:46
  • 1
    $\begingroup$ @fgrieu Well I didn't say it would be effortless. I surprised myself the other day by remembering entire song lyrics from years ago, and there are those who can quote entire bible passages. But as with all things human, your mileage may vary. $\endgroup$
    – rath
    Feb 28 '14 at 7:26
  • 5
    $\begingroup$ @rath I would rather say it is possible but not that it is practically done. Garry Kasparov might store his RSA keys that way ;) $\endgroup$
    – DrLecter
    Feb 28 '14 at 7:59

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.