There are already a number of questions about reusing SSH keys for something else:

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?

1 Answer 1


For DSA, ECDSA using OpenSSL and using different functions and structures than for RSA.

It won't work for ed25519 keys, because their operations are implemented in the openSSH itself. But you can again reuse OpenSSH code and check how the sing & verify works there. You would also need to use OpenSSH parser, because the ED25519 keys are stored in the new OpenSSH format, instead of standard PEM.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .