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.
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.
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.