Official reference regarding algorithm used for IPNS and for content hashing?

I have seen mentioned in one of the threads here that IPFS uses Elliptic P256 algorithm for PeerId.
Is there any official reference for this?

Also what is the current hashing algorithm being used for content addressing? I can’t seem to find this mentioned anywhere in the documentation.

This seem related:

1 Like

Indeed. What about the hashing algorithm used for peer identity?

PeerIDs are usually equivalent to v0 cids (but they will be v1 cids soon), the hashed payload being the public key.

the hashed payload being the public key

…and I am guessing that is ECDSA instead of say RSA? I remember checking the keys in the key-store once and I remember I could not introspect them using common openssl commands…which makes me wonder the more what algorithm and format they are

It can be several key types.

1 Like

Thanks to your link I landed on the page on Github where the specification can be found. And I see the following:

Four key types are supported:

  • RSA
  • Ed25519
  • Secp256k1

Dropping the link here for others who might have the same question