status-go/vendor/github.com/libp2p/go-libp2p-noise
RichΛrd 40359f9c1b
go-waku integration (#2247)
* Adding wakunode module
* Adding wakuv2 fleet files
* Add waku fleets to update-fleet-config script
* Adding config items for waku v2
* Conditionally start waku v2 node depending on config
* Adapting common code to use go-waku
* Setting log level to info
* update dependencies
* update fleet config to use WakuNodes instead of BootNodes
* send and receive messages
* use hash returned when publishing a message
* add waku store protocol
* trigger signal after receiving store messages
* exclude linting rule SA1019 to check deprecated packages
2021-06-16 16:19:45 -04:00
..
pb go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
.travis.yml go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
README.md go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
crypto.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
go.mod go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
go.sum go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
handshake.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
rw.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
session.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
transport.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00

README.md

go-libp2p-noise

Discourse posts GoDoc Build Status

go-libp2p's noise encrypted transport

go-libp2p-noise is a component of the libp2p project, a modular networking stack for developing peer-to-peer applications. It provides a secure transport channel for go-libp2p based on the Noise Protocol Framework. Following an initial plaintext handshake, all data exchanged between peers using go-libp2p-noise is encrypted and protected from eavesdropping.

libp2p supports multiple transport protocols, many of which lack native channel security. go-libp2p-noise is designed to work with go-libp2p's "transport upgrader", which applies security modules (like go-libp2p-noise) to an insecure channel. go-libp2p-noise implements the SecureTransport interface, which allows the upgrader to secure any underlying connection.

More detail on the handshake protocol and wire format used is available in the noise-libp2p specification. Details about security protocol negotiation in libp2p can be found in the connection establishment spec.

Status

This implementation is currently considered "feature complete," but it has not yet been widely tested in a production environment.

Install

As go-libp2p-noise is still in development, it is not included as a default dependency of go-libp2p.

go-libp2p-noise is a standard Go module which can be installed with:

go get github.com/libp2p/go-libp2p-noise

This repo is gomod compatible, and users of go 1.12 and later with modules enabled will automatically pull the latest tagged release by referencing this package. Upgrades to future releases can be managed using go get, or by editing your go.mod file as described by the gomod documentation.

Usage

go-libp2p-noise is not currently enabled by default when constructing a new libp2p Host, so you will need to explicitly enable it in order to use it.

To do so, you can pass noise.New as an argument to a libp2p.Security Option when constructing a libp2p Host with libp2p.New:

import (
  libp2p "github.com/libp2p/go-libp2p"
  noise "github.com/libp2p/go-libp2p-noise"
)

// wherever you create your libp2p instance:
host := libp2p.New(
  libp2p.Security(noise.ID, noise.New)
)

Note that the above snippet will replace the default security protocols. To add Noise as an additional protocol, chain it to the default options instead:

libp2p.ChainOptions(libp2p.DefaultSecurity, libp2p.Security(noise.ID, noise.New))

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the libp2p Code of Conduct.

Want to hack on libp2p?

License

MIT