Categorygithub.com/vulcanize/go-libp2p-secio
modulepackage
2.0.17+incompatible
Repository: https://github.com/vulcanize/go-libp2p-secio.git
Documentation: pkg.go.dev

# README

go-libp2p-secio

standard-readme compliant GoDoc Coverage Status Build Status

go-libp2p's secio encrypted transport

Package go-libp2p-secio is a libp2p stream security transport. Connections wrapped by secio use secure sessions provided by this package to encrypt all traffic. A TLS-like handshake is used to setup the communication channel.

Install

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

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

Note that go-libp2p-secio is packaged with Gx, so it is recommended to use Gx to install and use it (see the Usage section).

Usage

This module is packaged with Gx. In order to use it in your own project it is recommended that you:

go get -u github.com/whyrusleeping/gx
go get -u github.com/whyrusleeping/gx-go
cd <your-project-repository>
gx init
gx import github.com/libp2p/go-libp2p-secio
gx install --global
gx-go --rewrite

Please check Gx and Gx-go documentation for more information.

For more information about how go-libp2p-secio is used in the libp2p context, you can see the go-libp2p-conn module.

Contribute

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

This repository falls under the IPFS Code of Conduct.

Want to hack on IPFS?

License

MIT

# Packages

No description provided by the author

# Functions

No description provided by the author
NewETMReader Encrypt-Then-MAC.
NewETMWriter Encrypt-Then-MAC.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
ID is secio's protocol ID (used when negotiating with multistream).

# Variables

ErrBadSig signals that the peer sent us a handshake packet with a bad signature.
ErrClosed signals the closing of a connection.
ErrEcho is returned when we're attempting to handshake with the same keys and nonces.
ErrMACInvalid signals that a MAC verification failed.
ErrUnsupportedKeyType is returned when a private key cast/type switch fails.
ErrWrongPeer is returned when we attempt to handshake with the wrong peer.
HandshakeTimeout governs how long the handshake will be allowed to take place for.
SupportedCiphers is the list of supported Ciphers.
SupportedExchanges is the list of supported ECDH curves.
SupportedHashes is the list of supported Hashes.

# Structs

HMAC carries a hash and its size.
SessionGenerator constructs secure communication sessions for a peer.