updatesign

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package updatesign verifies ed25519 signatures on release artifacts for the self-update flow. The release checksums file is signed offline with the separate tools/sarde-release-sign program; the sarde binary only ever verifies. This is deliberately a distinct trust domain from internal/license: compromising or rotating one key must not affect the other.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidSignature = errors.New("release signature does not match any trusted key")

ErrInvalidSignature is returned when a signature matches none of the trusted release keys.

View Source
var PublicKeys = []ed25519.PublicKey{
	{
		0x3b, 0x0a, 0x04, 0x6c, 0x05, 0xdb, 0x1c, 0x6d,
		0xfe, 0x45, 0x7e, 0x60, 0x7f, 0x40, 0xf5, 0x39,
		0xda, 0x33, 0x86, 0xed, 0xf5, 0x45, 0x82, 0xda,
		0x7e, 0xe5, 0x62, 0x21, 0x85, 0xca, 0x0e, 0xb4,
	},
}

PublicKeys is the set of trusted vendor ed25519 public keys embedded in the sarde binary and used to verify release signatures during self-update.

The matching private key is held offline by the vendor and is never present in this repository. Release checksums are signed with the separate `tools/sarde-release-sign` program. During a key rotation, ship a release that lists both the old and the new key here; binaries older than that release can only verify releases signed with a key they already trust.

Functions

func Sign

func Sign(data []byte, priv ed25519.PrivateKey) []byte

Sign returns the ed25519 signature of data. Only the offline release signing tool calls this; it is never reached from the shipped binary.

func Verify

func Verify(data, sig []byte) error

Verify checks sig over data against the trusted release public keys. Accepting a set rather than a single key means a future key rotation only needs a release that ships both keys, not a special transition scheme.

Types

This section is empty.

Jump to

Keyboard shortcuts

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