This file contains hidden or 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 | |
"""Extract the public key from the private key and write to a file. | |
""" | |
from Crypto.Hash import SHA256 | |
from Crypto.Signature import PKCS1_v1_5 | |
from Crypto.PublicKey import RSA | |
with open("private_key.pem", "r") as src: | |
private_key = RSA.importKey(src.read()) |