Documentation
¶
Overview ¶
Package secure is Fort's E2E crypto contract for the relay (spec 028): a Noise IK handshake (X25519) between a client and the daemon's pinned static key, then ChaCha20-Poly1305 AEAD framing. The gateway broker relays these frames opaquely — it can neither read nor forge them. Both ends of Fort's tests use this package, proving the contract round-trips.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FingerprintOf ¶
FingerprintOf fingerprints any public key: base32 (no padding) of the first 16 bytes of sha256(pub) — 128 bits, so grinding a second-preimage keypair to match a pinned fingerprint at first contact is 2^128 work, not 2^80.
Types ¶
type Handshake ¶
type Handshake struct {
// contains filtered or unexported fields
}
Handshake is one side of a Noise IK handshake.
func NewInitiator ¶
NewInitiator starts the client side, pinning the daemon's static public key (IK: the initiator must know the responder's key — a substituted key fails).
func NewResponder ¶
NewResponder starts the daemon side with its static identity.
func (*Handshake) ReadMessage ¶
ReadMessage consumes the peer's handshake message.
type Keypair ¶
Keypair is a long-term X25519 static identity.
func GenerateKeypair ¶
GenerateKeypair mints a fresh static identity.
func (Keypair) Fingerprint ¶
Fingerprint is the human-comparable identity of a public key: base32 (no padding) of sha256(pub), grouped for reading. Shown by `fort relay join` and on the gateway machine list; clients pin the key it names.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session seals/opens transport frames after a completed handshake.