| Crates.io | ssh-to-age |
| lib.rs | ssh-to-age |
| version | 0.2.0 |
| created_at | 2025-05-30 10:31:38.089772+00 |
| updated_at | 2025-06-04 14:48:27.087084+00 |
| description | Convert OpenSSH Ed25519 keys to age encryption keys. |
| homepage | https://github.com/wallago/ssh-to-age-rs |
| repository | https://github.com/wallago/ssh-to-age-rs |
| max_upload_size | |
| id | 1694889 |
| size | 41,254 |
Convert SSH Ed25519 keys to age keys. This is useful for usage in sops-nix and sops.
This crate fills a gap in the Rust ecosystem: there is currently no Rust-native library to convert Ed25519 SSH keys into age compatible X25519 keys.
Crate like rage, doesn't convert my ssh key as exepected.
With this, you can reuse your existing SSH keypair for encryption โ no need to manage a separate key just for age.
Age supports encrypting to X25519 public keys. Since SSH Ed25519 keys are widely supported and already in use, this library converts them into age-compatible X25519 keys:
Age can derive an encryption key from that public key, avoiding the need to manage yet another keypair.
Ed25519 is a signature scheme based on the Edwards form of Curve25519. It is used for signing and is known for its speed and security.
age is a modern, simple, and secure file encryption tool โ a user-friendly alternative to GPG.
For use in sops-nix, where age recipients are typically stored in your Nix config:
sops.age.keyFile = "/path/to/your/AGE-SECRET-KEY-...";
Instead of generating a new age key, just convert your existing SSH key.
This rust lib is inspired by the excellent work done by Mic92 and his repositorie ssh-to-age.
Let me know if you have any suggestion.