Documentation
¶
Overview ¶
Package identity handles ed25519 keypairs: loading private keys, parsing public keys, and signing/verifying request preimages. Keypairs are generated outside AgentStore with ssh-keygen; only the public key is ever sent to a server.
Index ¶
- func LoadPrivateKey(path string) (ed25519.PrivateKey, error)
- func ParsePublicKey(authorizedKey string) (ed25519.PublicKey, error)
- func PrivateKeyPathFromPublic(pubPath string) string
- func ReadPublicKeyFile(path string) (string, error)
- func Sign(priv ed25519.PrivateKey, preimage []byte) []byte
- func Verify(pub ed25519.PublicKey, preimage, sig []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadPrivateKey ¶
func LoadPrivateKey(path string) (ed25519.PrivateKey, error)
LoadPrivateKey reads an OpenSSH-format ed25519 private key file.
func ParsePublicKey ¶
ParsePublicKey parses an OpenSSH authorized-key line into an ed25519 public key.
func PrivateKeyPathFromPublic ¶
PrivateKeyPathFromPublic derives the conventional private key path from a public key path by stripping a trailing ".pub" (ssh-keygen's convention).
func ReadPublicKeyFile ¶
ReadPublicKeyFile reads an OpenSSH .pub file and returns the canonical authorized-key line (without trailing newline).
Types ¶
This section is empty.