I have a public key, however, I'm not sure on how to turn that into a key on Pycryptodome. I've been using this code that I found here
keyDER = b64decode(key64)
seq = asn1.DerSequence()
seq.decode(keyDER)
keyPub = RSA.construct((seq[0], seq[1]))
print(keyPub.encrypt('test',"Unguessable"))
With key64 as the PublicKey, however, I get ValueError: Unexpected DER tag
. Is there a better way of doing this in python 3.6 with Pycryptodome?