Skip to content

PKCS8 #2144

Open
Open

Description

@Jan-Sedlacek

Add a support for modern Key serialization into Transport class. Currently only support of PKCS#1 is present, modern serialization PKCS8 could not be used.

Eg. RSA key generated with:

from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives import serialization

RSAKeyGen = rsa.generate_private_key(public_exponent=65537,key_size=4096)
RSAPem = RSAKeyGen.private_bytes(
    encoding=serialization.Encoding.PEM,
    format=serialization.PrivateFormat.PKCS8,
    encryption_algorithm=serialization.NoEncryption())
with open("./serverKey.pem", "wb") as f:
    f.write(RSAPem)

Should be usable and not raise SSHException("'not a valid RSA private key file'") while loading the RSA key by paramiko RSAKey class

Activity

  1. bskinn commented on Nov 25, 2022

    @bskinn
    Contributor

    Flagging this to include/consider in the key/auth rewrite of #387.

    Thanks for the suggestion, @Jan-Sedlacek!

  2. abhishekthukaram commented on Mar 5, 2023

    @abhishekthukaram

    Hi @Jan-Sedlacek and @bskinn : Any update on the support of PKCS8 in paramiko , I am getting the same issue when using the paramiko library

  3. bskinn commented on Mar 5, 2023

    @bskinn
    Contributor

    Flagging this to include/consider in the key/auth rewrite of #387.

    Thanks for the suggestion, @Jan-Sedlacek!

    @abhishekthukaram -- bitprophet is now in the beginning stages of the key/auth rewrite -- all things keys should be much better soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions