nisse@lysator.liu.se (Niels Möller) writes:
For PKCS#1 format, the program pkcs1-conv (from nettle-1.14 and later) can also convert RSA keys in pkcs#1 formats to sexp format.
Simon Josefsson simon@josefsson.org writes:
Then I would think that pkcs1-conv would handle this.
Indeed, I've managed to convert OpenSSH RSA key pair to GNU lsh by the following steps:
1. Decrypt OpenSSH key:
$ openssl rsa -inform PEM -outform DER -in ~/.ssh/id_rsa \ -out /tmp/id_rsa.nopass
2. Convert OpenSSH key to GNU lsh:
$ cat /tmp/id_rsa.nopass | pkcs1-conv --private-rsa-key | \ sexp-conv -s advanced | sed -e "s/rsa/rsa-pkcs1/" | \ sexp-conv -s canonical | lsh-writekey
I've done it using GNU lsh version lsh-2.9-exp, secsh protocol version 2.0.
My initial goal -- to use single key pair for both OpenSSH and GNU lsh -- is achieved. That way, I can start playing with GNU lsh without taking the risk to switch completely to it.
Thanks for your help! :-)