from Crypto.PublicKey import RSA



def importe(private,public):

    with open(private,'r') as f:

	    priv = f.read()

	    f.close()



    with open(public,'r') as f:

	    pub = f.read()

	    f.close()



    return (RSA.importKey(priv) , RSA.importKey(pub))

    #return (priv,pub) pour retourner clés en clair



r = importe('private.txt','public.txt')

print(r[0].exportKey('PEM'),'\n',r[1].exportKey('PEM'))