Versions in this module Expand all Collapse all v0 v0.1.1 Oct 26, 2026 v0.1.0 Oct 25, 2026 Changes in this version + const AnyAddress + const AnySender + const CertificateKeyID + const CertificateLifetime + const CertificateSerialParam + const CiphertextContentType + const EnvelopeVersion + const IdentityDocumentSize + const IdentityEd25519 + const IdentityP256 + const IdentityTag + const LinkPath + const MaxCertificateLifetime + const MaxCiphertext + const MaxDepth + const MaxInteger + const MaxPassAuthorization + const MaxPassLifetime + const MaxPrekeyLifetime + const MaxSerial + const MaxSignature + const MaxSkew + const PadMinBlock + const PassLifetime + const PassScheme + const PassTag + const PostTime + const PrekeyLifetime + const PrekeySerialParam + const PrekeyTag + const ProblemContentType + const RecordType + const RefusedAttribution + const RefusedEnvelope + const RefusedFuture + const RefusedIdentity + const RefusedKeyType + const RefusedMessage + const RefusedSignature + const RefusedStale + const Retention + const RevokedCertsTag + const SeenFor + const TTL + const TimeLayout + const TypePrefix + var ErrACL = errors.New("not an ACL: an allow list, and entries that are each an address or *") + var ErrACLTooLarge = errors.New("the ACL has more entries than this server takes") + var ErrCertificate = errors.New("bad certificate") + var ErrCertificateEnded = fmt.Errorf("%w: it has ended", ErrCertificateTime) + var ErrCertificateNotBegun = fmt.Errorf("%w: it has not begun", ErrCertificateTime) + var ErrCertificateTime = errors.New("the certificate is not valid now") + var ErrIdentityFormat = errors.New("not an identity document") + var ErrIdentityKey = errors.New("bad identity key") + var ErrIdentityType = errors.New("an identity key type this client does not verify") + var ErrJSON = errors.New("not a JSON text as the protocol reads one") + var ErrMemberValue = errors.New("a member holds a value the protocol does not take there") + var ErrNotBase64 = errors.New("a byte field is not standard base64 of the exact bytes, in its one encoding") + var ErrPass = errors.New("bad pass") + var ErrPassExpired = errors.New("the pass has expired") + var ErrPrekeyType = errors.New("the prekey is an age recipient of a type this client cannot encrypt to") + var ErrQuery = errors.New("the query does not read as this call's") + var ErrRevocation = errors.New("not a revocation of that address") + var ErrRevokedCertificates = errors.New("not a revocation of that address's certificates") + var ErrUnknownMember = errors.New("the body has a member this call does not take") + func AcceptsSender(declared []string, t string) bool + func Armor(blob []byte) []byte + func CertificateBegan(signature []byte) (time.Time, error) + func CheckCursor(s string) error + func CheckServerName(s string) error + func ContentRange(from, length int64) string + func Dearmor(armored []byte) ([]byte, error) + func Examine(plaintext []byte, me Address, now time.Time) (*Signed, *Findings, error) + func IdentityTypes() []string + func IfMatch(lines []string, etag string) bool + func IfNoneMatch(lines []string, etag string) bool + func IsMsgID(s string) bool + func LowerASCII(s string) string + func Member(err error) string + func MessageNamespace(b Address) string + func NewMsgID() (string, error) + func NewPass(signer ssh.Signer, a Address, server string, now time.Time) (authorization string, notAfter time.Time, err error) + func PadBlock(size int) int + func PaddedSize(size int) int + func ParseQuery(raw string, params ...string) (map[string]string, error) + func ParseTime(s string) (time.Time, error) + func PassNamespace(a Address) string + func PassStatement(a Address, server string, notAfter time.Time) []byte + func Plaintext(line, signature []byte, t KeyType) (plaintext []byte, sealed int) + func PollInterval(v string) (uint64, error) + func PrekeyNamespace(a Address) string + func ProfileNamespace(b Address) string + func RangeAsk(from int64) string + func RangeAsked(ranges, ifRange []string) (from int64, ok bool) + func RevocationStatement(a Address) []byte + func RevokeNamespace(a Address) string + func RevokedCertsNamespace(a Address) string + func SealedSize(t KeyType, plaintext int) int + func SerialAt(now time.Time, above uint64) uint64 + func Sign(s ssh.Signer, message []byte, namespace string) ([]byte, error) + func SignEnvelope(e *Envelope, signer ssh.Signer) (line, signature []byte, err error) + func SignRevocation(identity ssh.Signer, a Address) ([]byte, error) + func SignRevokedCertificates(identity ssh.Signer, r *RevokedCertificates) ([]byte, error) + func SignatureBound(t string) int + func Unmarshal(data []byte, v any) error + func UnmarshalRequest(data []byte, v any) error + func Verify(id *Identity, message, signature []byte, namespace string) error + func VerifyPrekey(id *Identity, statement, signature []byte, now time.Time) (*Prekey, *Certificate, error) + func VerifyPrekeyRecord(id *Identity, statement, signature []byte) (*Prekey, *Certificate, error) + type ACL struct + Allow ACLList + Deny ACLList + func CheckACL(d *ACLDocument, maxEntries int) (*ACL, error) + func (a *ACL) Admits(from Address) bool + func (a *ACL) Document() ACLDocument + func (a *ACL) SameLists(b *ACL) bool + type ACLDocument struct + Allow []string + Deny []string + type ACLList struct + Addrs []Address + Any bool + func NewACLList(all bool, addrs []Address) ACLList + func (l ACLList) Entries() []string + func (l ACLList) Equal(m ACLList) bool + func (l ACLList) Has(a Address) bool + func (l ACLList) Len() int + type AccountResponse struct + Account string + type Address [32]byte + func ParseAddress(s string) (Address, error) + func (a *Address) UnmarshalText(b []byte) error + func (a Address) MarshalText() ([]byte, error) + func (a Address) String() string + type AdoptRequest struct + Key string + type BoxResponse struct + Identity Bytes + Prekey Bytes + PrekeySignature Bytes + RevokedCertificates Bytes + RevokedCertificatesSignature Bytes + SenderKeyTypes []string + func (b *BoxResponse) Record() *Revocations + type Bytes []byte + func (b *Bytes) UnmarshalJSON(data []byte) error + func (b Bytes) MarshalJSON() ([]byte, error) + type Certificate struct + func CheckCertificate(id *Identity, key ssh.PublicKey, now time.Time) (*Certificate, error) + func CheckCertificateRecord(id *Identity, key ssh.PublicKey) (*Certificate, error) + func NewCertificate(id *Identity, identity ssh.Signer, work ssh.PublicKey, serial uint64, ...) (*Certificate, error) + func VerifyCertified(id *Identity, message, signature []byte, namespace string, now time.Time) (*Certificate, error) + func (c *Certificate) Marshal() []byte + func (c *Certificate) NotAfter() time.Time + func (c *Certificate) PublicKey() ssh.PublicKey + func (c *Certificate) Serial() uint64 + func (c *Certificate) Signer(work ssh.Signer) (ssh.Signer, error) + func (c *Certificate) SignsMail(now time.Time) bool + func (c *Certificate) WorkingKey() ssh.PublicKey + type Code string + const CodeAdoptKeyRefused + const CodeBadAddress + const CodeBadEncoding + const CodeBadKey + const CodeBadRequest + const CodeBadRevocation + const CodeBoxChanged + const CodeCertificateNotCurrent + const CodeCertificateRevoked + const CodeConflict + const CodeFetchPaced + const CodeIdentityMismatch + const CodeMailboxBusy + const CodeMailboxFull + const CodeNoSuchMailbox + const CodeNoSuchMessage + const CodeNotAge + const CodeNotRevoked + const CodePairFull + const CodePassExpired + const CodePreconditionFailed + const CodePrekeyExpired + const CodePrekeyNotNew + const CodePrekeyTime + const CodeRateLimited + const CodeRefetchSpent + const CodeRequestTimeout + const CodeRevoked + const CodeSenderKeyType + const CodeSenderNotAllowed + const CodeSenderRevoked + const CodeStalePrekey + const CodeTooLarge + const CodeUnauthorized + const CodeUnavailable + const CodeUnknownSender + const CodeUnsupportedKeyType + const CodeWrongRecipientType + func Codes() []Code + func (c Code) Known() bool + func (c Code) Status() int + func (c Code) Title() string + func (c Code) TypeURI() string + type Envelope struct + Body json.RawMessage + From Address + Identity []byte + InReplyTo string + MsgID string + SentAt time.Time + Subject string + Supersedes string + To Address + func NewEnvelope(from, to Address, body string, now time.Time) (*Envelope, error) + func NewJSONEnvelope(from, to Address, body []byte, now time.Time) (*Envelope, error) + func OpenEnvelope(plaintext []byte, signer, me Address, now time.Time) (*Envelope, error) + func OpenEnvelopeRecord(plaintext []byte, signer, me Address) (*Envelope, error) + func (e *Envelope) Line() ([]byte, error) + func (e *Envelope) Marshal() ([]byte, error) + type EnvelopeError struct + Code string + Why string + func (e *EnvelopeError) Error() string + type Findings struct + At time.Time + Began time.Time + Ends time.Time + Identity *Address + MsgID string + SentAt time.Time + Serial uint64 + Signed bool + type Identity struct + func IdentityOf(key ssh.PublicKey) (*Identity, error) + func NewIdentity(pub ed25519.PublicKey) (*Identity, error) + func ParseIdentity(doc []byte) (*Identity, error) + func VerifyRevocation(a Address, document, signature []byte) (*Identity, error) + func (id *Identity) Address() Address + func (id *Identity) Document() []byte + func (id *Identity) PublicKey() ssh.PublicKey + func (id *Identity) Type() string + type KeyType string + const Classic + const PostQuantum + type MessageInfo struct + ExpiresAt string + From string + ID string + ReceivedAt string + Size int64 + type MessageList struct + Count int64 + Messages []MessageInfo + NextCursor *string + type Order struct + Cert [32]byte + CertSerial uint64 + Serial uint64 + func PrekeyOrder(statement, signature []byte) (Order, error) + type Pass struct + Address Address + NotAfter time.Time + func ParsePass(authorization string) (*Pass, error) + func (p *Pass) Authorization() string + func (p *Pass) Verify(id *Identity, server string, now time.Time) (*Certificate, error) + func (p *Pass) VerifyUnder(sum [sha256.Size]byte, server string, now time.Time) (ssh.PublicKey, error) + type Prekey struct + Address Address + Key string + NotAfter time.Time + Serial uint64 + func ParsePrekey(statement []byte) (*Prekey, error) + func (p *Prekey) CheckLifetime(now time.Time) error + func (p *Prekey) Expired(now time.Time) bool + func (p *Prekey) Recipient() (age.Recipient, error) + func (p *Prekey) Statement() []byte + func (p *Prekey) Type() KeyType + type PrekeyRequest struct + Prekey Bytes + PrekeySignature Bytes + SenderKeyTypes []string + type Problem struct + CertificateSerial *uint64 + Code Code + Count *uint64 + Detail string + Hint string + KeyType string + KeyTypes []string + Limit *uint64 + Member string + OldestExpiresAt string + PrekeySerial *uint64 + QuotaID Quota + Record *Revocations + Status int64 + Subject Subject + Through *uint64 + Title string + Type string + Unacked *int64 + func (p *Problem) CodeAt(status int) Code + type QueryError struct + Param string + func (e *QueryError) Error() string + func (e *QueryError) Unwrap() error + type Quota string + const QuotaCalls + const QuotaCertificateRevocations + const QuotaCertificates + const QuotaMisses + const QuotaPages + const QuotaPolls + const QuotaRegistrations + const QuotaRegistrationsRange + const QuotaRenewals + const QuotaRequests + const QuotaSends + const QuotaSendsBeforePass + func Quotas() []Quota + func (q Quota) Known() bool + func (q Quota) Subject() Subject + type Receipt struct + ExpiresAt string + ID string + ReceivedAt string + type RegisterRequest struct + Identity Bytes + Prekey Bytes + PrekeySignature Bytes + SenderKeyTypes []string + type Revocations struct + Identity Bytes + Revocation Bytes + RevokedCertificates Bytes + RevokedCertificatesSignature Bytes + Type *string + func (r Revocations) MarshalJSON() ([]byte, error) + type RevokedCertificates struct + Address Address + Through uint64 + func NewRevokedCertificates(a Address, through uint64) (*RevokedCertificates, error) + func ParseRevokedCertificates(statement []byte) (*RevokedCertificates, error) + func VerifyRevokedCertificates(a Address, document, statement, signature []byte) (*RevokedCertificates, error) + func (r *RevokedCertificates) Revokes(serial uint64) bool + func (r *RevokedCertificates) Statement() []byte + type SendQuery struct + CertificateSerial uint64 + PrekeySerial uint64 + func ParseSendQuery(raw string) (SendQuery, error) + func (q SendQuery) Encode() string + type Signed struct + Certificate *Certificate + Envelope *Envelope + Line []byte + Sender *Identity + Signature []byte + func OpenSigned(plaintext []byte, me Address, now time.Time) (*Signed, error) + type Stanzas struct + Native []KeyType + Other bool + func ReadStanzas(ciphertext []byte) (Stanzas, error) + type Subject string + const SubjectBox + const SubjectIP + func (s Subject) Known() bool