Update noise mapping
This commit is contained in:
parent
5983cd01f1
commit
fff84d4c2a
Binary file not shown.
|
@ -29,28 +29,38 @@ Packet = @complete bytes / @fragmented [bytes ...] .
|
||||||
; In summary, each noise.Packet, once (reassembled and) decrypted, will be a sequence of zero
|
; In summary, each noise.Packet, once (reassembled and) decrypted, will be a sequence of zero
|
||||||
; or more machine-encoded protocol.Packets, followed by zero or more 0x80 bytes.
|
; or more machine-encoded protocol.Packets, followed by zero or more 0x80 bytes.
|
||||||
|
|
||||||
Endpoint = <noise @spec EndpointSpec> .
|
; A `Route` describes a network path that can be followed to reach some target entity.
|
||||||
EndpointSpec = {
|
;
|
||||||
; Possible transports, in preference order. Could contain e.g. transportAddress.Tcp values or
|
; It starts with zero or more possible non-Syndicate `transports`, in preference order. These
|
||||||
; similar. These are just suggestions; it's quite possible the endpoint is reachable by some
|
; could be `transportAddress.Tcp` values or similar. They are just suggestions; it's quite
|
||||||
; means not listed.
|
; possible the endpoint is reachable by some means not listed. The network outside Syndicate
|
||||||
transports: [any ...]
|
; is, after all, pretty diverse! In particular, *zero* `transports` may be provided, in which
|
||||||
|
; case some out-of-band means has to be used to make that first connection.
|
||||||
|
;
|
||||||
|
; The `transports` give instructions for contacting the first entity in the `Route` path. Often
|
||||||
|
; this will be a `gatekeeper`, or a `noise` protocol endpoint, or both. Occasionally, it may
|
||||||
|
; even be the desired target entity. Subsequent `steps` describe how to proceed from the
|
||||||
|
; initial entity to the target.
|
||||||
|
Route = <route @transports [any ...] @steps RouteStep ...> .
|
||||||
|
RouteStep = NoiseStep / GatekeeperStep .
|
||||||
|
|
||||||
|
GatekeeperStep = sturdy.SturdyRef .
|
||||||
|
|
||||||
|
NoiseStep = <noise @spec NoiseSpec> .
|
||||||
|
NoiseSpec = {
|
||||||
|
; The `serviceSelector` to use in a `Connect`.
|
||||||
|
service: any,
|
||||||
; The responder's static public key. If not required (uncommon!), supply the empty ByteString.
|
; The responder's static public key. If not required (uncommon!), supply the empty ByteString.
|
||||||
key: bytes
|
key: bytes,
|
||||||
}
|
}
|
||||||
& @protocol EndpointProtocol
|
& @protocol NoiseProtocol
|
||||||
& @ref EndpointRef
|
& @preSharedKeys NoisePreSharedKeys
|
||||||
& @preSharedKeys EndpointPreSharedKeys
|
|
||||||
.
|
.
|
||||||
|
|
||||||
; If absent, a default of DefaultProtocol is used. Most endpoints will speak the default.
|
; If absent, a default of DefaultProtocol is used. Most services will speak the default.
|
||||||
EndpointProtocol = @present { protocol: string } / @invalid { protocol: any } / @absent {} .
|
NoiseProtocol = @present { protocol: string } / @invalid { protocol: any } / @absent {} .
|
||||||
DefaultProtocol = "Noise_NK_25519_ChaChaPoly_BLAKE2s" .
|
DefaultProtocol = "Noise_NK_25519_ChaChaPoly_BLAKE2s" .
|
||||||
|
|
||||||
; If present, OID 0 at the responder end is a Gatekeeper, and the named ref should be resolvable.
|
|
||||||
; If absent, OID 0 at the responder directly denotes the entity of interest.
|
|
||||||
EndpointRef = @present { ref: sturdy.SturdyRef } / @invalid { ref: any } / @absent {} .
|
|
||||||
|
|
||||||
; If present, Noise pre-shared-keys (PSKs) are drawn from the sequence as required; if the
|
; If present, Noise pre-shared-keys (PSKs) are drawn from the sequence as required; if the
|
||||||
; sequence is exhausted or not supplied, an all-zeros key is used each time a PSK is needed.
|
; sequence is exhausted or not supplied, an all-zeros key is used each time a PSK is needed.
|
||||||
EndpointPreSharedKeys = @present { preSharedKeys: [bytes ...] } / @invalid { preSharedKeys: any } / @absent {} .
|
NoisePreSharedKeys = @present { preSharedKeys: [bytes ...] } / @invalid { preSharedKeys: any } / @absent {} .
|
||||||
|
|
Loading…
Reference in New Issue