Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Generated keys seem to lose a bit...

843811Oct 28 2005
Using keytool, I'm generating 4096 bit RSA keys. The SSL connection gets established all right, and the encryption is happening, but I noticed something peculiar.

When I run my code with the option: -Djavax.net.debug=all I see this:

Found trusted certificate:
[
[
Version: V1
Subject: CN=first last, OU=division, O=company, L=town, ST=st, C=us
Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4

Key: Sun RSA public key, 4095 bits
...
]
]

I generated 512 bit keys and the debug message shows the key was 512 bits. I also tried this with a 5000 bit key and it showed 4999 bits.

Is there a reason these bigger keys are losing a bit?

Thanks
-matthew
(I've downloaded and configured the unlimited strength crypto. jar.)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 25 2005
Added on Oct 28 2005
0 comments
162 views