5 Commits
Author SHA1 Message Date
lotherk abdac42c83 README: name the tested OpenSSH and OpenSSL versions
ci / build (push) Successful in 34s
2026-11-21 17:13:12 +00:00
lotherk c65e756cac read the OpenSSH key container ourselves
ci / build (push) Successful in 35s
ssh-keygen -p -m PKCS8 is not a conversion path: on OpenSSH 10.2 (Ubuntu
26.04 LTS) it ignores -m for ed25519 keys, exits 0, and leaves the container,
so every ed25519 decryption failed there. RSA still converted, which hid it.

src/openssh.c now parses the unencrypted openssh-key-v1 container directly:
ed25519 seed plus public key, or RSA n/e/d/iqmp/p/q, with the public and
private halves checked against each other. ssh-keygen is left with one job,
stripping a passphrase (-p -N ''), which works on every version. Unencrypted
keys no longer need the program at all, which the suite now asserts by
running one decryption with PATH=/nonexistent.

Verified on Debian bookworm (OpenSSH 9.2) and Ubuntu 26.04 (10.2).
2026-11-21 17:11:26 +00:00
lotherk 05b8251333 add the man page, CI, and install it alongside the binary
ci / build (push) Failing after 45s
docs/sshcrypt.1 documents options, environment, exit codes and the security
limits; make lint-man lints it and CI runs that. The Gitea workflow builds,
runs make check, lints the page, then repeats the suite under ASan+UBSan.
make install now writes the man page too.
2026-11-21 16:50:28 +00:00
lotherk 8731e66501 README: say what -F does; name the unsupported key type 2026-11-21 10:58:19 +00:00
lotherk 0afb114993 sshcrypt: encrypt to an SSH public key, decrypt with the private key
C99/POSIX tool, one job: -r PUBKEY encrypts, -d -k PRIVKEY decrypts.
Ed25519 goes through X25519 + HKDF-SHA256 + ChaCha20-Poly1305, RSA through
RSA-OAEP-SHA256. Text armor by default so the message survives mail and chat.
OpenSSH private keys are converted through ssh-keygen; no other subprocess is
ever started.
2026-11-21 10:56:55 +00:00