ssh-key
A pure Rust implementation of SSH key, certificate, and signature file formats.
Repository Health
Technical Analysis
ssh-key is a pure Rust library for decoding and encoding SSH key file formats as described in RFC4251/RFC4253 and OpenSSH’s key formats, along with sshsig signatures and certificates (including certificate validation and certificate-authority support). It also handles authorized_keys and known_hosts file formats.
As part of the RustCrypto/SSH workspace, it builds on ssh-encoding and ssh-cipher for the lower-level codec and cipher primitives, and supports a wide range of key algorithms — Ed25519, RSA, ECDSA (P-256/P-384/P-521), and legacy DSA — behind feature flags, with optional no_std support for constrained environments.
What You Get
- Decoders/encoders for OpenSSH private and public key formats (RFC4251/RFC4253)
- SSH certificate support, including certificate validation and certificate-authority signing
sshsigdetached signature creation and verificationauthorized_keysandknown_hostsfile format parsing- Pluggable algorithm support behind feature flags: Ed25519, RSA, ECDSA (P-256/P-384/P-521), and DSA
- Optional
no_std/alloc-only builds for embedded and constrained targets
Common Use Cases
- Building SSH server or client tooling that needs to read/write OpenSSH key files
- Implementing a certificate authority that issues and validates SSH certificates
- Verifying
sshsigsignatures (e.g. for signed Git commits or file attestation) - Parsing
authorized_keysorknown_hostsfiles in infrastructure automation - Generating new SSH keypairs programmatically without shelling out to
ssh-keygen
Under The Hood
Architecture ssh-key is one of five crates in the RustCrypto/SSH Cargo workspace (ssh-cipher, ssh-derive, ssh-encoding, ssh-key, ssh-protocol), and depends on ssh-encoding for the low-level SSH wire-format codec and ssh-cipher for symmetric encryption of private keys. Within the crate, src/ splits cleanly by concern: algorithm/ for algorithm identifiers, private/ and public/ for the two key kinds, certificate/ for CA-signed certificates, fingerprint/ for key fingerprinting, plus top-level modules for sshsig.rs, authorized_keys.rs, known_hosts.rs, and ppk.rs (PuTTY key format). Tech Stack Targets Rust edition 2024 (rust-version 1.85), with algorithm implementations pulled in as optional dependencies behind Cargo feature flags — ed25519-dalek, rsa, p256/p384/p521, dsa — so consumers only compile the crypto they use; zeroize is threaded through for secret-wiping and no_std/alloc-only builds are supported via feature gating. Code Quality Each public module has a matching integration test in tests/ (e.g. certificate.rs, certificate_builder.rs, sshsig.rs, known_hosts.rs, private_key.rs), and the workspace shares lint configuration ([lints] workspace = true) across all five crates for consistent style enforcement. API Design The crate exposes ergonomic top-level types (PrivateKey, PublicKey, Certificate) with builder-style construction and format-native to_openssh()/from_openssh() round-trip methods, so consumers rarely need to touch the underlying wire encoding directly; the feature-flag-per-algorithm design keeps the default build lean while still surfacing a consistent API regardless of which algorithms are enabled.
Used by 3 apps in this directory
Anarlog
Note Taking · AI Assistants · Productivity
Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.
Mistle
AI Agents · Developer Tools
Self-hostable platform for running autonomous coding agents in isolated, credentialless sandboxes with brokered credentials, reusable snapshots, and event-driven triggers.
Vibe Kanban
AI Agents · AI Code Assistants · Project Management
A kanban board for planning work and dispatching Claude Code, Codex, Gemini CLI, and eight other coding agents into isolated git worktrees, then reviewing and merging their diffs from one UI.