Skip to content

Conversation

@Prateek2000
Copy link

The format='OpenSSH' parameter in Crypto.PublicKey.RSA.export_key when used with a private key exports the public key instead. The code extracts only the public key parameters and writes them to bytes from what I understand.

The current doc says "Only suitable for public keys", which I think does not convey what could happen if someone were to use a private key anyhow. It does not throw an error either. So I believe it would make sense to document this behavior.

…licKey.RSA.export_key when used with a private key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant