-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[P2P] Basic transport security #544
Comments
Love the details in the testing methodology. I added some deliverables/non-goals. Check them out when you have a chance |
May be done by default. Please confirm by going through testing methodology @bryanchriswhite |
It looks like this indeed may be taken care of by default when using libp2p. I've updated the testing methodology to reflect the steps I took to produce the packet captures and screenshots below.
Before (packet capture dump)After (packet capture dump) |
Based on packet inspection, it looks like libp2p is preferring noise over TLS (which should be fine) but I haven't dug into that part of libp2p's code yet to see the details for myself. Outstanding concerns:
|
Thanks @bryanchriswhite! Wanted to share a few TILs along with som questions
TIL the word I haven't done packet inspection and according to GPT, it's still the best tool out there. Found it pretty surprising no better UI has come along. I wasn't familiar with Noise so I read about it for a bit. Fun fact: just one individual designed the whole thing. http://noiseprotocol.org/noise.html#introduction
|
I noticed that the version I installed at least uses QT, so at least with respect to aesthetics, it should match the appearance of the desktop environment theme. It looks a bit blander than it should in my screenshots because I had to run it with escalated privileges, which has the effect of applying a different (basic and/or default) theme. With respect to UX, I don't feel qualified to make any assessment as I barely even understand what all the tool is capable of.
🤨 interesting indeed
I did some quick digging and it looks like the way libp2p uses noise is as follows:
I believe that's a fairly accurate characterization. I haven't dug into the TLS libp2p security option yet but I would assume that it would be configured (by default) in a non-conventional way such that it's usable outside the context of well-known certificate authorities (permissionless, as you mentioned). I would expect that it generates a basic X509 chain consisting of a single certificate which is self-signed using the pokt keypair, and that signature is what's verified in the TLS handshake to authenticate a remote peer. My understanding of noise is limited as I haven't had to look into it previously much more than a cursory read of the spec. It does indeed identify itself a "protocol framework" whereas TLS is a protocol in its own right. However, due to the necessarily non-conventional usage of TLS, I would argue that it's more accurate to say that we're using a custom protocol in either case (noise and TLS) but it just happens to be the that that's how noise was specified, whereas TLS is being modified / repurposed to apply to this scenario. |
@bryanchriswhite Appreciate the thorough research, investigation and response. Makes sense to me and I think it's definitely more than enough for what we need from a practical standpoint. This is good context to have if we ever end up needing to debug and dive deeper. |
Objective
Ensure transport-level encryption is enabled and required by default for all network participants.
The initial implementation of transport security should be compatible with the current formulation of V1 identity, this may be as simple as using the crypto helpers introduced in #534 together with go-libp2p's
p2p/security/tls
package.Origin Document
Goals
Deliverable
Non-goals / Non-deliverables
General issue deliverables
Testing Methodology
docker exec -it node1.consensus ash
(see: SO post)ip a
, note IP addresscat /sys/class/net/eth0/iflink
, note the "interface number"exit
to exit the container shellip link|grep <INTERFACE_NUMBER>
, note the interface name, e.g. (if interface number was55
, name would bevetha165c5f@if54
):node2.consensus
containernode1.consensus
node2.consensus
PSH
flag setData
contained in the package to see if any cleartext is readable (e.g. protobuf types:...type.googleapis.com/consensus.HotstuffMessage...
)make ...
make ...
make test_all
LocalNet
is still functioning correctly by following the instructions at docs/development/README.mdCreator: @bryanchriswhite
The text was updated successfully, but these errors were encountered: