Files
lneto/x/nts/stringers.go
T
Marvin Drees 5f8ca45859 feat(x/nts): add NTS support (#88)
Implement NTS (RFC 8915) with KERecord zero-copy frame, PerformKE
(TLS 1.3 + ExportKeyingMaterial), DeriveKeys, and Client state
machine implementing lneto.StackNode. Client handles cookie pool
management, auth body codec with nonce/ciphertext, and two-exchange
NTP flow with UniqueID verification and AEAD authentication.

Add NTS Server wrapping ntp.Server with AEAD verification/sealing,
and HandleKE for server-side NTS Key Exchange over TLS 1.3.

Use internal.LogAttrs for non-allocating structured logging
throughout the NTS client, matching existing conventions.

Generated with LLM assistance.

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
2026-06-15 11:42:10 -03:00

50 lines
1.6 KiB
Go

// Code generated by "stringer -type=KERecordType,AEADAlgorithmID -linecomment -output stringers.go"; DO NOT EDIT.
package nts
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[RecordEndOfMessage-0]
_ = x[RecordNextProtoNeg-1]
_ = x[RecordError-2]
_ = x[RecordWarning-3]
_ = x[RecordAEADAlgNeg-4]
_ = x[RecordNewCookie-5]
_ = x[RecordNTPv4Server-6]
_ = x[RecordNTPv4Port-7]
}
const _KERecordType_name = "end of messagenext protocol negotiationerrorwarningAEAD algorithm negotiationnew cookie for NTPv4NTPv4 server negotiationNTPv4 port negotiation"
var _KERecordType_index = [...]uint8{0, 14, 39, 44, 51, 77, 97, 121, 143}
func (i KERecordType) String() string {
idx := int(i) - 0
if i < 0 || idx >= len(_KERecordType_index)-1 {
return "KERecordType(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _KERecordType_name[_KERecordType_index[idx]:_KERecordType_index[idx+1]]
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[AlgAESSIVCMAC256-15]
}
const _AEADAlgorithmID_name = "AEAD_AES_SIV_CMAC_256"
var _AEADAlgorithmID_index = [...]uint8{0, 21}
func (i AEADAlgorithmID) String() string {
idx := int(i) - 15
if i < 15 || idx >= len(_AEADAlgorithmID_index)-1 {
return "AEADAlgorithmID(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _AEADAlgorithmID_name[_AEADAlgorithmID_index[idx]:_AEADAlgorithmID_index[idx+1]]
}