I'm learning about RSA cryptography, so I must understand about ke length. Here, I found explanation about key length means.
There said:
When we say a "1024-bit RSA key", we mean that the modulus has length 1024 bits, i.e. is an integer greater than 2^1023 but lower than 2^1024. Such an integer could be encoded as a sequence of 1024 bits, i.e. 128 bytes.
What I've got from there, 1024 bit key means the key has 1024 binary number sequence int it.
We all know, 1 byte = 8 bits. So, 1024 bits = 128 bytes
. Okay, it's in binary. How about in character?
According to ASCII binary code here, each character has 8 bits binary number. So, in my mind, if key has 1024 bit length, it means the key contains of 1024/8 = 128 characters. So, I created a java program to generate prime number that has 128 numbers length. So far, the program works well.
But again, I rethought the real meaning of RSA 1024-bit. So, I googled and found this. I tested it and I get that the bit length of public key modulus is 1024. But, the public key has 309 numbers length.
Now, I really confuse.
My question: what's the real means of 1024-bit key length in RSA? As I thought or as I found here?