Documentation
¶
Overview ¶
Package sign holds a box's keys: its identity, which signs certificates and revocations and nothing else, and its working keys, which sign what the box says (PROTOCOL.md §5). Nothing else in the client signs with them (TestOnlySignSigns), and every signature first asks whether the box holds its own revocation, and is refused if it does (PROTOCOL.md §12.5): no path, a new one included, can sign around that check.
Index ¶
- type Finished
- type Identity
- func (k *Identity) Certify(id *protocol.Identity, work ssh.PublicKey, n uint64, now time.Time) (*protocol.Certificate, error)
- func (k *Identity) PublicKey() ssh.PublicKey
- func (k *Identity) Revocation(a protocol.Address) ([]byte, error)
- func (k *Identity) RevokedCertificates(r *protocol.RevokedCertificates) ([]byte, error)
- type Work
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finished ¶
type Finished func() error
Finished returns why the box may sign nothing more, or nil.
type Identity ¶
type Identity struct {
// contains filtered or unexported fields
}
Identity is a box's identity key.
func NewIdentity ¶
NewIdentity holds key, the box's identity, for a box that says whether it is finished.
func (*Identity) Certify ¶
func (k *Identity) Certify(id *protocol.Identity, work ssh.PublicKey, n uint64, now time.Time) (*protocol.Certificate, error)
Certify signs a certificate of the working key work, of serial n, made at now (protocol.NewCertificate).
func (*Identity) Revocation ¶
Revocation signs the revocation of the address a (protocol.SignRevocation).
func (*Identity) RevokedCertificates ¶
func (k *Identity) RevokedCertificates(r *protocol.RevokedCertificates) ([]byte, error)
RevokedCertificates signs the revocation of certificates r (protocol.SignRevokedCertificates).
type Work ¶
type Work struct {
// contains filtered or unexported fields
}
Work is a working key, under its certificate.
func NewWork ¶
NewWork holds key, a working key under its certificate, for a box that says whether it is finished.