Member-only story
So What Does an RSA Signing Key Look Like?
The Web Cryptography integration gives us a range of cryptographic methods we can use, including for RSA-PSS signing. With this, we can create an RSA key which can sign for data. The private key is used to sign a hash of data, and the public key then verifies this signature. The two main formats for RSA private keys are JWK (JSON Web Key) and PCKS8, and the two main formats for RSA public keys are JWK and SPKI (Simple Public Key Infrastructure). We can then convert the PKCS8 and SPKI into PEM formats, and which have headers and trailers in the form of “ — — -BEGIN PUBLIC KEY — — -” and “ — — -END PUBLIC KEY — — -”. In this article, we will produce these formats [here]:
What’s in a key?
Many think that an RSA public key just contains e and N (the modulus), and the private key contains d and N. But, there are many other parameters that are stored, and which aid the encryption process.
When we generate RSA keys, we get [here]:
== Key details ==
Private key p: 97788552682700715869209516738447253059821264202285988392725653463112813905637 (0xd8325c02c662c0f7886e772e47d69a84030a3263674cbff9b71e1ae1404c06e5)
Private key q…