1

I'm new to cryptography, and I was making an experiment a few minutes ago, but I want to have some deeper knowledge about RSA public and private keys.

I have a set of keys

One begins with

-----BEGIN RSA PRIVATE KEY-----
MIIBOgIBAAJBAOlnH1jZ2YLfWuYMop1a4N9jsUPK......
-----END RSA PRIVATE KEY-----

and another with

-----BEGIN PUBLIC KEY-----
MFowDQYJKoZIhvcNAQEBBQADSQA....
-----END PUBLIC KEY-----

I've parsed them using Java and I can make use of them, as RSA private and public keys respectively.

But the question I have is....

Are there some checksum mechanisms built into RSA keys ?

I ask this because, I'd like to know what happens if, by error or intentional, one or more characters from the encoded PEM are modified. Does this breaks the key ? Or changes the key internally, without breaking it ?

1 Answers1

1

No, there is no checksum built-in to the RSA keys per se. There is no need for that.

Does this breaks the key ? Or changes the key internally, without breaking it ?

[EDIT] It was rightfully pointed out to me that at least one of the statements I typed (in haste) was plain wrong. Now that the answer has served its initial purpose, I've removed my badly worded and therefore wrong statements and just duplicating here the link to a much better explanation of things (which I really liked): Why does my SSH private key still work after changing some bytes in the file?

tum_
  • 306
  • 1
  • 3
  • 9