[Cryptography-dev] New OpenSSH key format
Ron Frederick
ronf at timeheart.net
Tue Mar 3 01:36:51 EST 2020
You might want to see if AsyncSSH (https://asyncssh.readthedocs.io <https://asyncssh.readthedocs.io/>) can do what you’re looking for. While its main purpose is to provide an asyncio-compatible SSH client and server, it also had a very complete set of key management functions for reading and writing private/public keys and certificates, reading and writing them in a wide variety of formats and providing functions such as signing and verification with them. You don’t even need to be using asyncio to take advantage of these functions.
On Mar 2, 2020, at 10:30 PM, Alex Gaynor <alex.gaynor at gmail.com> wrote:
> No, cryptography does not support OpenSSH format private keys. This is not currently planned.
>
> Alex
>
> On Tue, Mar 3, 2020 at 1:28 AM Lalit Kumar <lalit.hilmarsh at gmail.com <mailto:lalit.hilmarsh at gmail.com>> wrote:
> Can we retrieve the public key from private key in the new OpenSSH format like below:
>
> -----BEGIN OPENSSH PRIVATE KEY-----
> b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn
> NhAAAAAwEAAQAAAQEA2MTxUgEE1y0Mx+nA0SBDRhK2DnNQU4ACS1g8qWwanIJ81q4u1n/8
> XUdagRSctNyzsMVsGKrPez/T+11rTlc+AKfqrJacz0SxpPi/PAszLQ6ARYESbpAGXlwwjb
> a0iYXR512mIArg/xNVWZtGHVvGDQEATIWIxOoI4hmGcE9bqHW/me8PvA/cggDKxICa0CLx
> i+7drR2exNwhYVlw//RTw1raZorVtD1rNyh4YXeX9JfX1E9RXRDaP1zonVwjH3E64hyw4y
> ARRSSnvaaQPNEmkrZMv37NQNbN/XIj9pdbXq/rBJ0yOIFQrGSYIr+yMThiloD5n/LZeAFr
> 1rCZsChawQAAA8h+4JwsfuCcLAAAAAdzc2gtcnNhAAABAQDYxPFSAQTXLQzH6cDRIENGEr
> YOc1BTgAJLWDypbBqcgnzWri7Wf/xdR1qBFJy03LOwxWwYqs97P9P7XWtOVz4Ap+qslpzP
> RLGk+L88CzMtDoBFgRJukAZeXDCNtrSJhd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3ycQBC3amxFBkpcI30pKRrfV1SbVEr3EC5ns48iOPxDS+3J44wGaqZdWbOICX/EIdd9I
> J0tdLs/k0W+LynMAAAAPbGFsaXQua3VtYXJATWFjAQIDBA==
> -----END OPENSSH PRIVATE KEY-----
>
> This is an RSA key in the new format. Does cryptography 2.8 support this? If not is it planned for next release?
>
> --
> Regards,
> Lalit
--
Ron Frederick
ronf at timeheart.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cryptography-dev/attachments/20200302/b51639db/attachment-0001.html>
More information about the Cryptography-dev
mailing list