2023-01-16 14:52:46 +00:00
|
|
|
version 1 .
|
|
|
|
|
2023-01-16 15:21:12 +00:00
|
|
|
; Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s, just like Wireguard
|
|
|
|
; Noise_NKpsk2_25519_ChaChaPoly_BLAKE2s
|
|
|
|
|
|
|
|
; - ephemeral public keys are 32 bytes
|
|
|
|
; - pre-shared-keys (PSKs) are 32 bytes
|
|
|
|
; - authentication tags (on each AEAD encrypted payload) are 16 bytes each
|
2023-01-16 14:52:46 +00:00
|
|
|
|
2023-01-16 15:21:12 +00:00
|
|
|
; IKpsk2:
|
2023-01-16 14:52:46 +00:00
|
|
|
; <- s (for us, the object's static key is in the cap ref)
|
|
|
|
; ...
|
|
|
|
; -> e, es, s, ss
|
2023-01-16 15:21:12 +00:00
|
|
|
; <- e, ee, se, psk
|
2023-01-16 14:52:46 +00:00
|
|
|
;
|
2023-01-16 15:21:12 +00:00
|
|
|
; NKpsk2:
|
2023-01-16 14:52:46 +00:00
|
|
|
; <- s (for us, the object's static key is in the cap ref)
|
|
|
|
; ...
|
|
|
|
; -> e, es
|
2023-01-16 15:21:12 +00:00
|
|
|
; <- e, ee, psk
|
2023-01-16 14:52:46 +00:00
|
|
|
|
|
|
|
; Assertion. Handshake is an ephemeral public key followed by either an encrypted public-key
|
|
|
|
; (IK) or an encrypted empty payload (NK).
|
|
|
|
Connect = <connect @handshake bytes @initiatorSession #!any> .
|
|
|
|
|
2023-01-16 15:21:12 +00:00
|
|
|
; Assertion (to initiatorSession). Handshake is an encrypted ephemeral public key followed by a
|
|
|
|
; (differently-)encrypted PSK (which may be all zeros when no PSK is relevant).
|
2023-01-16 14:52:46 +00:00
|
|
|
Accept = <accept @handshake bytes @responderSession #!any> .
|