You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A remote peer can provide any public key as part of the identify protocol. This could be validated to match the remote peer's ID. Go/JS libp2p do this sort of validation:
If downstream users depend on info.public_key (e.g. public_key.to_peer_id()), they may expect it to match the remote peer like in the Go/JS libp2p implementations.
Current Implementation
I couldn't find code in protocols/identify that validated remote peer public keys, testing it out it accepts any public key.
Are you planning to do it yourself in a pull request ?
Yes
The text was updated successfully, but these errors were encountered:
Description
A remote peer can provide any public key as part of the identify protocol. This could be validated to match the remote peer's ID. Go/JS libp2p do this sort of validation:
The received
public_key
is exposed viaidentify::Event::Received
events. e.g. logged to console in theidentify-example
rust-libp2p/examples/identify/src/main.rs
Lines 69 to 72 in 00588a5
Motivation
If downstream users depend on
info.public_key
(e.g.public_key.to_peer_id()
), they may expect it to match the remote peer like in the Go/JS libp2p implementations.Current Implementation
I couldn't find code in
protocols/identify
that validated remote peer public keys, testing it out it accepts any public key.Are you planning to do it yourself in a pull request ?
Yes
The text was updated successfully, but these errors were encountered: