Re: Converting from a openssl dsa key to a one line SSH2 key (for authorized_keys)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Quoted text here. Click to load it

It doesn't look infeasible to me. That base64-encoded blob is just
ASN.1/BER (or perhaps I mean DER) encoding four integers of about
the right sizes.

I've just hacked up a quick piece of Python which I _think_ should
generate the right data. You can find it at

I can't absolutely guarantee its correctness: I wrote it by staring
very hard at the key data you posted and reverse-engineering the
format, and there was one part of the format I didn't fully
understand the reasons for so I can't be sure it'll look the same in
other similarly generated keys. But it seems to work for that
particular key at least, as far as I can tell (though of course
without the corresponding private key I can't _actually_ test that
it's really acceptable to OpenSSH).
Simon Tatham         "loop, infinite _see_ infinite loop"

Site Timeline