Re: Converting private key from OpenSSH to lsh (or the other way around)
Kaloian Doganov <[email protected]> Sun, 03 Jun 2007 14:03:22 +0300
| Newsgroups | gmane.network.lsh.bugs |
|---|---|
| Message-ID | <[email protected]> |
[email protected] (Niels M=C3=B6ller) writes: =20=20=20=20 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 <[email protected]> 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! :-) --=20 Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm