Skip to content

Mapping between public keys and PeerIds #2419

Closed Answered by rkuhn
laptou asked this question in Q&A
Discussion options

You must be logged in to vote

My suggestion is to not couple PeerId to users at all — a peer is a p2p network node, and as you say a single user may well use multiple nodes. These nodes need one unique identity each, even though they serve the same human. The associated PublicKey is an implementation detail of libp2p, I wouldn’t use it to represent the user either. A user should have their own SecretKey etc. which is completely separate from libp2p keys.

So you’ll need to implement a way on your application level for transferring a SecretKey between nodes of the same end user and then use that for encryption and signatures on the application data — in addition to all the transport layer encryption employed by libp2p.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mxinden
Comment options

Answer selected by laptou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants