NoiseXXPattern class

Implementation of the Noise XX pattern for libp2p

The XX pattern: -> e // Initial: Initiator sends ephemeral key <- e, ee, s, es // Response: Responder sends ephemeral key, performs ee+es -> s, se // Final: Initiator sends static key, performs se

Properties

debugChainKey Uint8List
no setter
debugEphemeralKeys → SimpleKeyPair
no setter
debugHandshakeHash Uint8List
no setter
debugRemoteStaticKey Uint8List?
no setter
hashCode int
The hash code for this object.
no setterinherited
isComplete bool
no setter
recvKey → SecretKey
no setter
remoteStaticKey Uint8List
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendKey → SecretKey
no setter
state XXHandshakeState
no setter

Methods

getStaticPublicKey() Future<Uint8List>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readMessage(Uint8List message) Future<void>
Process an incoming handshake message
toString() String
A string representation of this object.
inherited
writeMessage(List<int> payload) Future<Uint8List>
Generate the next handshake message

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create(bool isInitiator, SimpleKeyPair staticKeys) Future<NoiseXXPattern>
Creates a new NoiseXXPattern instance
createForTesting(bool isInitiator, SimpleKeyPair staticKeys, SimpleKeyPair ephemeralKeys) Future<NoiseXXPattern>

Constants

KEY_LEN → const int
MAC_LEN → const int
PROTOCOL_NAME → const String