[openssl-users] Hashing public keys

Dr. Pala madwolf at openca.org
Wed Mar 21 16:26:13 UTC 2018

Hi Jan,

not sure if this might help you, I solved the problem by using
X509_PUBKEY + i2d_X509_PUBKEY. Here's an example:


I hope that helps,


On 3/21/18 1:42 PM, Jan Danielsson wrote:
> Hello,
>    Given an EVP_PKEY (can contain either RSA or EC key), is there a
> function to generate a hash of the public key?  (I have some vague
> memory of having read a few years ago that there wasn't any standardized
> way to hashing EC keys (+parameters) yet.  If so; has this been remedied?).
>    (Storing public keys in a DHT, users need to be able to - given a
> public key - generate a hash to check if the hash exists in the DHT).

More information about the openssl-users mailing list