I have generated a RSA Public and Private key pair (publickey.pem and privatekey.pem) and i want to calculate the public key fingerprint of the public key. what is the best way to do that in python? I have already searched many articles but couldn't fine any. My public key looks like this:
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEA11K+82kb/BsAWklwjUn50e+MXN536STtMWNVVnbhUZDHW6Qd60q1
Lm2w7jpc63anS0o4ka8sTAGvffubtZBOSgnH6i/j534da+mag7M9u4UNK9AwMc/R
hmdy9vvw+pySE8eQ1i3M/FWy9V4tk5oTq1ZUBsILv+jKsj8fltEbpyYmbG2YnIHn
VBAD/Nup8nfrfdUmcERTP4l015qEtjP2P49lZGDe0V1xdXQUm/ExUuJ/dqs70hTw
HHanp5R9QPPUQOqi482GKUTfTPtBd62vg8nR7qLTgRXEim5c0i5Ap7L3oWxvEXI0
9Xfb40ACxLI2Vma4TIuEfx9ldqHxlrpJ7QIDAQAB
-----END RSA PUBLIC KEY-----
Any help would be appreciated
Edit: I will have several clients signing their http request with their private key and sending the request to the server along with the public key fingerprint so that from the fingerprint i can check which client has sent the request and i can look for the publick key of that particular client with the given fingerprint. Once i have the public key i can verify that the request is authenticated. My currentkey is in RSA format and i need the SSH fingerprint from my pubic key. Is there any way to convert the RSA key to OpenSSH format. I am able to do the same in Node.js with HTTP-Signature library. I want something similar in Python.
Once i have the key in OpenSSH format i can use this: Deriving an SSH Fingerprint from a Public Key in Python to get the fingerprint
Thanks in Advance.