Pyelliptic with Pickle fails sometimes
<p>If i run the following testcase several times with:</p>

<pre><code>python3 -m unittest test_pyelliptic.py
</code></pre>

<p>roughly one out of 15 runs fails.</p>

<p>TestCase:</p>

<pre><code>import unittest, pyelliptic, pickle

class PyellipticTestCase(unittest.TestCase):
    def setUp(self):
        self.alice = pyelliptic.ECC()
        self.bob = pyelliptic.ECC()

    def test_pickleSign(self):
        tm = {"text":"contract","amount":12}
        tms1 = {"doc":tm,"c1":self.bob.get_pubkey(),"s1":self.bob.sign(pickle.dumps(tm))}
        tms2bb = {"doc":tms1,"c2":self.alice.get_pubkey(),"s2":self.alice.sign(pickle.dumps(tms1))}
        tms2 = pickle.loads(pickle.dumps(tms2bb))
        self.assertEqual(tms2['s2'],tms2bb['s2'])
        self.assertTrue(pyelliptic.ECC(pubkey=self.alice.get_pubkey()).verify(tms2bb['s2'],pickle.dumps(tms2['doc']))) #&lt;--- FAILs sometimes
</code></pre>

<p>My System:</p>

<ul>
<li>OS: 14.04.1-Ubuntu (Kernel 3.16.0-36-generic) </li>
<li>Phtyon3: Python 3.4.0 (default, Apr 11 2014, 13:05:18) </li>
<li>OpenSSL: 1.0.1f 6 Jan 2014</li>
<li>pyelliptic: 1.5.7</li>
</ul>

<p>I also tested this on a similar system with Python 3.4.3 and could reproduce the behavior.</p>

<p>Can you reproduce the fault on your System?
If yes, what causes it?</p>

<p><strong>Update</strong></p>

<p>If I run the test with verbose (python3 -m unittest -v test_pyelliptic2.py) it produces the following output (run twice):</p>

<pre><code>X@X:~/test$ python3 -m unittest -v test_pyelliptic2.py 
test_pickleSign (test_pyelliptic2.PyellipticTestCase) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.012s

OK
X@X:~/test$ python3 -m unittest -v test_pyelliptic2.py 
test_pickleSign (test_pyelliptic2.PyellipticTestCase) ... FAIL

======================================================================
FAIL: test_pickleSign (test_pyelliptic2.PyellipticTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "XX/test/test_pyelliptic2.py", line 14, in test_pickleSign
    self.assertTrue(pyelliptic.ECC(pubkey=self.alice.get_pubkey()).verify(tms2bb['s2'],pickle.dumps(tms2['doc']))) #&lt;--- FAILs sometimes
AssertionError: False is not true

----------------------------------------------------------------------
Ran 1 test in 0.013s

FAILED (failures=1)
</code></pre>