Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

generating serialized rsa public / private keys from N E D Big Ints

We're generating rsa keys, and would like to store them as public and private base64 hashes, like I'm used to seeing in my ~/.ssh folder on my linux box.

However, we're dealing with the RSA primitives - the n, e, and d values.

How do I generate the base64 hashes out of those values? And vice versa (if it's not obvious).

like image 945
chrispitzer Avatar asked Oct 09 '22 02:10

chrispitzer


1 Answers

base64 is an encoding scheme for binary data represented as text, not a hashing algorithm. If you are referring to the fingerprint, it is MD5.

For both the fingerprint and the base64-encoded data, you can consult or even reuse Twisted's Conch implementation.

like image 195
mensi Avatar answered Oct 13 '22 11:10

mensi