You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
392 B

from Crypto.PublicKey import DSA
# Creación de clave DSA
key = DSA.generate(2048)
f = open("public_key.pem", "wb")
#grabación clave pública
f.write(key.publickey().export_key())
f.close()
print ("Clave pública:\n", key.public_key().export_key())
f = open("private_key.pem", "wb")
#grabación clave privada
f.write(key.export_key())
f.close()
print ("Clave privada:\n", key.export_key())

Powered by Informatica FP.