pairing

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package pairing encodes the one-paste device pairing code (P4-SEC-04 part 2): a single copy-paste blob replacing the seven hand-pasted values of the manual ceremony. The blob is DELIBERATELY UNAUTHENTICATED - integrity comes from the out-of-band fingerprint comparison at approval time (the fingerprint is always DERIVED from the carried keys, never carried in the blob, so a tampered blob changes the fingerprint and fails the ceremony).

Index

Constants

View Source
const Prefix = "devstrap-pair1:"
View Source
const Version = 1

Variables

This section is empty.

Functions

func Encode

func Encode(c Code) (string, error)

Types

type Code

type Code struct {
	WorkspaceID      string
	DeviceID         string
	Name             string
	OS               string
	Arch             string
	AgeRecipient     string
	SigningPublicKey string
}

func Decode

func Decode(blob string) (Code, error)

Decode parses an unauthenticated-by-design pairing blob. Consumers MUST derive and confirm the device fingerprint from the returned keys before approving the carried device.

Jump to

Keyboard shortcuts

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