title: RSA signed data verification not working PyCryptodome
body: <p>Sorry for the very specific problem, but I am really going crazy here.
  I am trying to make a module to simply import when I need to sign something or verify a signature but I encountered a problem, the verificator simply returns true wether I enter signed data or anything else,
  here is the code:</p>
  <p>RSA_Handler.py</p>
  <pre><code>from Crypto.PublicKey import RSA
  from Crypto.Hash import SHA256
  from Crypto.Signature import PKCS1_v1_5
  import pickle
  
  def sign(data, exported_key):
      key = RSA.importKey(exported_key)
      signed_data = []
      signed_data.append(data)
      signed_data.append(PKCS1_v1_5.new(key).sign(SHA256.new(pickle.dumps(data))))
      return signed_data
  
  
  def verify(signed_data, exported_key):
      data = signed_data[0]
      signature = signed_data[1]
      key = RSA.importKey(exported_key)
      h = SHA256.new(pickle.dumps(data))
      try:
          PKCS1_v1_5.new(key).verify(h, signature)
          return True
  
      except(ValueError, TypeError):
          return False
  </code></pre>
  <p>test01.py</p>
  <pre><code>from RSA_Handler import *
  import pickle
  import os
  
  
  with open(&quot;keys.txt&quot;, &quot;rb&quot;) as rb:
      keys = rb.read()
  
  
  
  
  signed = sign(&quot;hello&quot;, keys)
  trueorfalse = verify([&quot;this will return&quot;,&quot; true whatever I enter&quot;], keys)
  
  print(trueorfalse)
  
  </code></pre>