mirror of
https://github.com/logos-messaging/noise.git
synced 2026-01-03 22:53:08 +00:00
Improve Config docs
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
This commit is contained in:
parent
7f7abf1289
commit
ca5f81ebf0
18
state.go
18
state.go
@ -177,9 +177,7 @@ type HandshakeState struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// A Config provides the details necessary to process a Noise handshake. It is
|
// A Config provides the details necessary to process a Noise handshake. It is
|
||||||
// never modified by this package, and can be reused, but care must be taken to
|
// never modified by this package, and can be reused.
|
||||||
// generate a new ephemeral key for each handshake if they are used in the
|
|
||||||
// pattern.
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
// CipherSuite is the set of cryptographic primitives that will be used.
|
// CipherSuite is the set of cryptographic primitives that will be used.
|
||||||
CipherSuite CipherSuite
|
CipherSuite CipherSuite
|
||||||
@ -199,19 +197,23 @@ type Config struct {
|
|||||||
// be identical on both sides for the handshake to succeed.
|
// be identical on both sides for the handshake to succeed.
|
||||||
Prologue []byte
|
Prologue []byte
|
||||||
|
|
||||||
// PresharedKey is the optional preshared key for the handshake.
|
// PresharedKey is the optional pre-shared key for the handshake.
|
||||||
PresharedKey []byte
|
PresharedKey []byte
|
||||||
|
|
||||||
// StaticKeypair is this peer's static keypair.
|
// StaticKeypair is this peer's static keypair, required if part of the
|
||||||
|
// handshake.
|
||||||
StaticKeypair DHKey
|
StaticKeypair DHKey
|
||||||
|
|
||||||
// EphemeralKeypair is this peer's static keypair.
|
// EphemeralKeypair is this peer's ephemeral keypair that was provided as
|
||||||
|
// a pre-message in the handshake.
|
||||||
EphemeralKeypair DHKey
|
EphemeralKeypair DHKey
|
||||||
|
|
||||||
// PeerStatic is the static public key of the remote peer.
|
// PeerStatic is the static public key of the remote peer that was provided
|
||||||
|
// as a pre-message in the handshake.
|
||||||
PeerStatic []byte
|
PeerStatic []byte
|
||||||
|
|
||||||
// PeerEphemeral is the ephemeral public key of the remote peer.
|
// PeerEphemeral is the ephemeral public key of the remote peer that was
|
||||||
|
// provided as a pre-message in the handshake.
|
||||||
PeerEphemeral []byte
|
PeerEphemeral []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user