Created
October 21, 2018 16:45
-
-
Save smellslikeml/e5a75dda5326781fa7b2b9cee5886824 to your computer and use it in GitHub Desktop.
Generate RSA keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from Crypto.PublicKey import RSA | |
new_key = RSA.generate(2048, e=65537) | |
public_key = new_key.publickey().exportKey('PEM') | |
private_key = new_key.exportKey('PEM') | |
print(public_key) | |
print(private_key) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment