registry

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package registry describes the SSH algorithm names a server may advertise: what each one is, which standard defines it, and the facts the evaluation judges it by (hash, group size, cipher mode, post-quantum). It is hand-written from the cited RFCs and drafts, not from a download: every entry names its source, and a test keeps every entry sourced.

It states facts, not verdicts. Whether SHA-1 key exchange is acceptable is the evaluation's call (internal/eval), citing RFC 9142; this package only says the method uses SHA-1.

Index

Constants

View Source
const (
	KindKex         = "kex"
	KindHostKey     = "host-key"
	KindCipher      = "cipher"
	KindMAC         = "mac"
	KindCompression = "compression"
	KindPseudo      = "pseudo" // ext-info-*, kex-strict-*: signals carried in the kex list
)

Kinds of algorithm name.

Variables

This section is empty.

Functions

func IsPseudo

func IsPseudo(name string) bool

IsPseudo reports whether a kex-list entry is a signal rather than a key exchange.

Types

type Algorithm

type Algorithm struct {
	Name    string
	Kind    string
	Display string // for people: "ML-KEM-768 + X25519", "AES-256 in CTR mode"

	// Key exchange.
	PQ        bool   // a post-quantum (hybrid) key exchange or signature
	Hybrid    bool   // combines a post-quantum and a classical algorithm
	FIPS      bool   // its post-quantum part is a NIST standard (ML-KEM, FIPS 203; ML-DSA, FIPS 204)
	Hash      string // "SHA-1", "SHA-256" ...: the exchange hash, or the signature or MAC hash
	GroupBits int    // finite-field group size; 0 when not fixed by the name (group exchange)
	Exchange  string // "MODP", "ECDH", "X25519", "X448", "RSA", "GEX", "Hybrid", "GSS"

	// Host keys.
	Key  string // "Ed25519", "ECDSA", "RSA", "DSA", "ML-DSA-65", "ML-DSA-44+Ed25519"
	Cert bool   // an OpenSSH certificate type
	SK   bool   // a security-key (FIDO) type

	// Ciphers and MACs.
	Cipher    string // "AES", "ChaCha20-Poly1305", "3DES", "RC4", "Blowfish", "CAST-128", "DES", "none" ...
	KeyBits   int
	BlockBits int
	Mode      string // "CTR", "CBC", "GCM", "AEAD", "STREAM", "none"
	AEAD      bool   // integrity is part of the cipher: no MAC is negotiated
	ETM       bool   // MAC: encrypt-then-MAC
	TagBits   int    // MAC output length

	// Catalogue is the internal/algo catalogue ID for the CBOM, when there is one.
	Catalogue string
	Source    string
}

Algorithm is one SSH algorithm name.

func All

func All() []Algorithm

All returns every entry (for tests).

func Lookup

func Lookup(kind, name string) (Algorithm, bool)

Lookup finds a name of the given kind. "none" is both a cipher and a MAC, so lookups are by kind.

Jump to

Keyboard shortcuts

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