LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Public Keys (https://www.linuxquestions.org/questions/linux-security-4/public-keys-429159/)

wwnexc 03-27-2006 11:26 PM

Public Keys
 
Hi,

I have been playing around with GnuPG, and noticed, that the length of the public key (of one and the same private key), vary greatly in length.

Some keys were about 2 kb big, while others were 3 kb. The difference in length was very obvious, when i opened the files in the text editor. One seemed almost 2x the size of the other.

Is this normal? Which one is "better"?

Thanks!

int0x80 03-30-2006 02:56 PM

Depends how you define better. If you're looking for harder to crack, then the 3kb key is preferable to the 2kb key. Scaling this down a bit, if you have a 20 byte key and a 30 byte key, the 20 byte key has 1048576 (2 ** 20) different possibilities. The 30 byte key has 1073741824 possibilities. The difference is obviously 2 ** 10. So if you're looking for the strength of the keypair to be the meaning of better, then the larger size is the better choice.

With that said, there is no need to worry about the size of your public key alone. It is a public key so it can be availabe to everyone.


All times are GMT -5. The time now is 09:57 PM.