registry

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 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 holds the TLS cipher-suite and supported-group registries the prober works from. The tables are generated from IANA's official CSVs by ./gen; nothing in them is typed by hand.

Regenerate (the CSVs are not committed; fetch them from https://www.iana.org/assignments/tls-parameters/ first):

go run ./internal/tlsprobe/registry/gen \
    -suites tls-parameters-4.csv -groups tls-parameters-8.csv \
    -retrieved 2026-09-21 -out internal/tlsprobe/registry

The IANA-derived fields (ID, Name, Recommended, DTLSOK, Reference) are verbatim. The decomposition of a suite name into Kx/Auth/Cipher/Mode/MAC is derived by a strict grammar in the generator, which refuses to generate anything it does not understand; key and block sizes come from a small curated table in the generator (they are properties of the ciphers, not of IANA).

Index

Constants

View Source
const GroupsRetrieved = "2026-09-21"

GroupsRetrieved is the date the IANA supported-groups registry was fetched.

View Source
const SuitesRetrieved = "2026-09-21"

SuitesRetrieved is the date the IANA cipher-suite registry was fetched.

Variables

This section is empty.

Functions

func GroupName

func GroupName(id uint16) string

GroupName returns the IANA name, or a hex placeholder for an unregistered value.

func SuiteName

func SuiteName(id uint16) string

SuiteName returns the IANA name, or a hex placeholder for an unregistered value.

Types

type Group

type Group struct {
	ID          uint16
	Name        string
	Recommended Recommended
	DTLSOK      bool
	Reference   string
	Comment     string

	// Derived from the name.
	PQ       bool // the group involves ML-KEM or (pre-standard) Kyber
	Hybrid   bool // PQ and combined with a classical key exchange
	Obsolete bool // IANA marks the name OBSOLETE
}

Group is one IANA supported-groups registry entry.

func GroupByID

func GroupByID(id uint16) (Group, bool)

GroupByID returns the registry entry for a supported-group code point.

func Groups

func Groups() []Group

Groups returns every named entry in the supported-groups registry, sorted by ID. The slice must not be modified.

type Recommended byte

Recommended is IANA's "Recommended" column.

const (
	RecommendedNo          Recommended = 'N'
	RecommendedYes         Recommended = 'Y'
	RecommendedDiscouraged Recommended = 'D'
)

The IANA values. D is "discouraged": IANA marks the entry as one that should not be used.

type Suite

type Suite struct {
	ID          uint16
	Name        string
	Recommended Recommended
	DTLSOK      bool
	Reference   string

	Class SuiteClass

	// Key exchange and authentication as named ("" for TLS 1.3 suites, whose key
	// exchange is negotiated separately via supported_groups). Kx is one of RSA, DH,
	// DHE, ECDH, ECDHE, PSK, DHE_PSK, ECDHE_PSK, RSA_PSK, SRP, KRB5, ECCPWD, GOST, NULL;
	// Auth is RSA, DSS, ECDSA, PSK, SRP, KRB5, anon, ECCPWD, GOST or NULL.
	Kx   string
	Auth string

	Cipher    string // AES, CHACHA20, 3DES, RC4, NULL, ...
	KeyBits   int    // nominal key size from the cipher's name (3DES is 168)
	Mode      string // GCM, CBC, CCM, CCM8, POLY1305, STREAM, CTR, MGM, NONE, ...
	BlockBits int    // 0 for stream ciphers and for AEADs that do not expose a block
	MAC       string // SHA1, SHA256, SHA384, MD5, OMAC, IMIT, NONE, or AEAD
	Hash      string // hash named alongside an AEAD (the PRF/handshake hash), else ""

	// Properties read directly off the name. Ephemeral means the name says the key
	// exchange uses ephemeral keys (DHE/ECDHE and their PSK forms); false means
	// "the name does not say so", not "known static".
	AEAD      bool
	Export    bool
	Anon      bool
	Ephemeral bool
}

Suite is one IANA cipher-suite registry entry with its decomposition.

func SuiteByID

func SuiteByID(id uint16) (Suite, bool)

SuiteByID returns the registry entry for a cipher-suite code point.

func Suites

func Suites() []Suite

Suites returns every named entry in the cipher-suite registry, sorted by ID. The slice must not be modified.

type SuiteClass

type SuiteClass uint8

SuiteClass distinguishes real cipher suites from signalling values.

const (
	ClassLegacy     SuiteClass = iota // TLS 1.2 and earlier: kex and auth are in the name
	ClassTLS13                        // TLS 1.3 style: only AEAD/PRF-hash in the name
	ClassSignalling                   // SCSV pseudo-suites; never negotiated
)

The suite classes.

Directories

Path Synopsis
Command gen turns IANA's TLS registry CSVs into the Go tables in the parent package.
Command gen turns IANA's TLS registry CSVs into the Go tables in the parent package.

Jump to

Keyboard shortcuts

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