0

In my attempt at making some sort of secure communications based "FTP" system, I encounter an error when my client-side program first attempts at encrypting data, it throws a single error that I see no examples anywhere else.

Traceback (most recent call last):
  File "cli.py", line 63, in <module>
    sk.send(enc(fcmd.encode()))
  File "cli.py", line 31, in enc
    print(ci.encrypt(data))
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/Cryptodome/Cipher/PKCS1_OAEP.py", line 107, in encrypt
    modBits = Cryptodome.Util.number.size(self._key.n)
AttributeError: 'NoneType' object has no attribute 'n'

I do not understand the reason for this, as the key used is not an exported representation, but rather an actual RsaKey object. If you require more code snippets, please let me know as I cannot post the whole file here for size reasons.

Endleon
  • 9
  • 2

0 Answers0