discokey

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package discokey derives a node's discovery key from its node private key.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrivateForNode

func PrivateForNode(k key.NodePrivate) key.DiscoPrivate

PrivateForNode derives a node's disco private key from its node private key: HMAC-SHA256 under a headwire-specific domain, clamped as a Curve25519 scalar. The disco public key is therefore a fixed function of the node identity and can be pasted into peers' configs next to the public key. Only that public half is exposed, but it travels in cleartext in every disco frame on direct paths and never changes, so it identifies the node to a passive observer.

func PublicForNode

func PublicForNode(k key.NodePrivate) key.DiscoPublic

PublicForNode returns the disco public key peers must configure for the node with private key k.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL