1

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?

Vi.
  • 219
  • 2
  • 10

1 Answers1

2

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.

Jakuje
  • 5,389
  • 17
  • 31