python - RSA digital signature using PSS throwing a attribute ...
stackoverflow.com › questions › 65796009Jan 19, 2021 · Show activity on this post. modBits = Crypto.Util.number.size (self._key.n) AttributeError: 'bytes' object has no attribute 'n'. I am using python 3.8. from Crypto.PublicKey import RSA from Crypto.Signature import pss key = RSA.generate (2048) private_key = key.export_key () file_out = open ("pri_key.txt", "wb") file_out.write (private_key) file_out.close () public_key = key.publickey ().export_key () file_out = open ("pub_key.txt", "wb") file_out.write (public_key) file_out.close () message ...