What’s the easiest way to go from a pkcs8-pem-formatted public key to a peer ID base58 multihash (“QmWhatever”)? It looks like js-libp2p-crypto’s crypto.keys.import only accepts private keys and that’s the only thing I found to ingest PEMs.
For context:
I’m building a social network where your public key is central to your identity, so I’d rather keep them in a well-established standard format like pkcs8-pem than the libp2p protobuf-encoded format. One reason is that if this file changes I don’t want users’ main unique identifier to change. (right?)
Something to note, the protobuf file should not change in a breaking manner. New key types might get added, but those will be backwards compatible changes. Breaking compatibility on that would be a huge issue for the network so we will avoid that at all costs. If it ever needs to happen, we’ll create a migration path.