Documentation
¶
Overview ¶
Package wg provides WireGuard key material helpers shared across the gateway control plane.
Index ¶
Constants ¶
View Source
const ( // BundleKey is the single data key in the gateway-bundle Secret. Its value is // "<gateway_private_key>\n<link_public_key>\n". BundleKey = "bundle" // LinkPrivateKey is the link Secret data key holding the link's WireGuard // private key. LinkPrivateKey = "private" // LinkPeerPublicKey is the link Secret data key holding the gateway's // WireGuard public key (the link's sole peer). LinkPeerPublicKey = "peerPublicKey" )
Secret data keys shared between the key generator and the consumers of the WireGuard key material. The gateway VM fetches its bundle from GCP Secret Manager, so both ends must agree on these constants.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeypair ¶
GenerateKeypair generates a Curve25519 WireGuard keypair. Both returned keys are standard base64-encoded 32-byte WireGuard keys (the same encoding `wg` emits and accepts); publicKey is deterministically derived from privateKey.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.