There are already a number of questions about reusing SSH keys for something else:
- Converting keys between openssl and openssh
- How to use public key in ~/.ssh for asymmetrical encryption with OpenSSL
- https://superuser.com/questions/576506/how-to-use-ssh-rsa-public-key-to-encrypt-a-text
- https://unix.stackexchange.com/questions/12260/how-to-encrypt-messages-text-with-rsa-using-openssl
- https://gist.github.com/colinstein/de1755d2d7fbe27a0f1e
but they all seem to deal only with RSA keys.
How do I "misuse" id_{dsa,ecdsa,ed25519}
for something non-networked, such as signing some [short] text file? How do I verify such signature with id_*.pub?