Inferring RSA algorithm from a publicKeyPem

57 views Asked by At

According to the hs2019 algorithm, the actual signing algorithm should be:

Derived from metadata associated with keyId

My initial thinking was to base it on the number of bits in the signature. I generated some keys to test and by default the size seems to be a differentiator, but the size of the seems unrelated to the signing algorithm.

How can I reliably detect the algorithm used to generate a publiKeyPem?

Edit: I'm specifically trying to determine whether its rsa256 or rsa512

0

There are 0 answers