Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 618532 - dev-python/pycryptodome fails tests on ppc64
Summary: dev-python/pycryptodome fails tests on ppc64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Normal major (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks: 613760
  Show dependency tree
 
Reported: 2017-05-15 14:10 UTC by Mike Gilbert
Modified: 2017-05-17 19:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Gilbert gentoo-dev 2017-05-15 14:10:34 UTC
This package seems very broken on ppc64. Specifically, the ARC2, ChaCha20, SHA3, keccak, and SHAKE algorithms seem to not work properly.

A small sample from bug 613760 comment 3:

======================================================================
ERROR: test_ARC2_106 (Crypto.SelfTest.Cipher.test_EAX.TestOtherCiphers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pycryptodome-3.4.5/work/pycryptodome-3.4.5-python2_7/lib/Crypto/SelfTest/Cipher/test_EAX.py", line 494, in test_template
    pt2 = cipher.decrypt_and_verify(ct, mac)
  File "/var/tmp/portage/dev-python/pycryptodome-3.4.5/work/pycryptodome-3.4.5-python2_7/lib/Crypto/Cipher/_mode_eax.py", line 339, in decrypt_and_verify
    self.verify(received_mac_tag)
  File "/var/tmp/portage/dev-python/pycryptodome-3.4.5/work/pycryptodome-3.4.5-python2_7/lib/Crypto/Cipher/_mode_eax.py", line 291, in verify
    raise ValueError("MAC check failed")
ValueError: MAC check failed

======================================================================
FAIL: test_seek (Crypto.SelfTest.Cipher.test_ChaCha20.ChaCha20Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pycryptodome-3.4.5/work/pycryptodome-3.4.5-python2_7/lib/Crypto/SelfTest/Cipher/test_ChaCha20.py", line 118, in test_seek
    self.assertEquals(ct1, ct2)
AssertionError: ')\xdews\x07\xc8\x80]c7\x1du\xe7\xa3\x90g\xe8I\xfd\xe5J\x85A\xdb|g_\x95\xe9\xdf]\xc6u\x95\xe0C\xdb/\x1b\x9e\x11\x08\x08\xa6\xc7fX&\xc0\xec\xc5\x04\xb2}\xe7n\xe1\x8d?\x03\xfe\xfa\xb2\xe6' != '\xfaPq\xcc\xf5\xe9\xf4\xec\xaf\xaeb\x03Z\xde\x04[n\x983\x1f\xfe^\xf7*\xe1\x95\xc2\xa6\xb9\xb3~F|S\x9b\xaf\x12?\xd8\x86\x93WV\x9b<\x99\xa5\nm\xc5?\xc0\xd73{y-\xa6\xd3\xe6\x82\x1b\x9dK'

======================================================================
FAIL: runTest (Crypto.SelfTest.Hash.common.HashSelfTest)
SHA3_224 #1: KAT SHA-3 224 test (ShortMsgKAT_SHA3-224.txt) (#1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pycryptodome-3.4.5/work/pycryptodome-3.4.5-python2_7/lib/Crypto/SelfTest/Hash/common.py", line 78, in runTest
    self.assertEqual(self.expected, out1)   # h = .new(); h.update(data); h.digest()
AssertionError: '6b4e03423667dbb73b6e15454f0eb1abd4597f9a1b078e3f5b5a6bc7' != '585a715c000000008b0f852d000000003986f144000000006e91ceb6'

======================================================================
FAIL: test_hex_digest (Crypto.SelfTest.Hash.test_keccak.KeccakTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pycryptodome-3.4.5/work/pycryptodome-3.4.5-python2_7/lib/Crypto/SelfTest/Hash/test_keccak.py", line 115, in test_hex_digest
    self.assertEqual(hexlify(digest), tobytes(hexdigest))
AssertionError: '8dd0e97900000000e1e25dcf000000008cf78c67000000001b4f074400000000e55453ed0000000068cbb92700000000de99521800000000b856b1c800000000' != '5c65b1b300000000301ee9cf00000000a75dd04000000000290772b50000000081a3b7b900000000fc3cee98000000000b4c825800000000c62e148500000000'

======================================================================
FAIL: test_224_0 (Crypto.SelfTest.Hash.test_keccak.KeccakVectors)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pycryptodome-3.4.5/work/pycryptodome-3.4.5-python2_7/lib/Crypto/SelfTest/Hash/test_keccak.py", line 163, in new_test
    self.assertEqual(hobj.digest(), result)
AssertionError: '\xe5\x9f\xa0X\x00\x00\x00\x00IW\xcc\xc9\x00\x00\x00\x00\x1f\xab\xa9\x13\x00\x00\x00\x00\x93do!' != '\xf7\x187P+\xa8\xe1\x087\xbd\xd8\xd3e\xad\xb8U\x91\x89V\x02\xfcU+H\xb79\n\xbd'

======================================================================
FAIL: test_new_positive (Crypto.SelfTest.Hash.test_SHAKE.SHAKE128Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pycryptodome-3.4.5/work/pycryptodome-3.4.5-python2_7/lib/Crypto/SelfTest/Hash/test_SHAKE.py", line 53, in test_new_positive
    self.assertEqual(xof2.read(10), xof3.read(10))
AssertionError: '<\xa8\x00\x00\x00\x00\xc4\xcb\x0f\xed' != '\xe8/\x00\x00\x00\x00\x83\xb1k7'

======================================================================
FAIL: test_new_positive (Crypto.SelfTest.Hash.test_SHAKE.SHAKE256Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pycryptodome-3.4.5/work/pycryptodome-3.4.5-python2_7/lib/Crypto/SelfTest/Hash/test_SHAKE.py", line 53, in test_new_positive
    self.assertEqual(xof2.read(10), xof3.read(10))
AssertionError: '\x9b\xd1\x00\x00\x00\x00\x9d\xbag\xf3' != '\xa4\xb5\x00\x00\x00\x00 \x84\xb9\x97'

======================================================================
FAIL: test_128_0 (Crypto.SelfTest.Hash.test_SHAKE.SHAKEVectors)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pycryptodome-3.4.5/work/pycryptodome-3.4.5-python2_7/lib/Crypto/SelfTest/Hash/test_SHAKE.py", line 109, in new_test
    self.assertEqual(digest, result)
AssertionError: '\x19C\xd0\xea\x00\x00\x00\x00\xdadC;\x00\x00\x00\x00\xf4t\x11F\x00\x00\x00\x00\xa8.\xee\x83\x00\x00\x00\x00\xaa\xec\xad\xef\x00\x00\x00\x00\xfa?\x92\x81\x00\x00\x00\x00A\xd42\x07\x00\x00\x00\x00\xaf\x94b\xc3\x00\x00\x00\x00\x03\xcc\x1f\xc9\x00\x00\x00\x00#\x93\xe2\xe8\x00\x00\x00\x00%K=\x1a\x00\x00\x00\x00P\xd1\xb3v\x00\x00\x00\x00\x8b\xc5A\xac\x00\x00\x00\x00\x1e\xb8\x00\xe2\x00\x00\x00\x00\x9ay\x00\xd3\x00\x00\x00\x00\xb4\x13\xf5g\x00\x00\x00\x00\xf5\xfe\x95<\x00\x00\x00\x00Cq\xb2\xac\x00\x00\x00\x00\xea\xbcY\xad\x00\x00\x00\x00N\xb2\x914\x00\x00\x00\x00L;\xde8\x00\x00\x00\x807\xdb/_\x00\x00\x00\x00\t\xb4!\xb7\x00\x00\x00\x00\xb0\x95\xe1\x0e\x00\x00\x00\x00&\xb1\x88(\x00\x00\x00\x00\x1d\xe5\xaek\x00\x00\x00\x00\x8d\xa3\x01F\x00\x00\x00\x00\xcc\xf4\xee\xbd\x00\x00\x00\x00>\xef\xf1\xf6\x00\x00\x00\x00\x8eF\xd1\xf9\x00\x00\x00\x00\xfa4\x13\x8b\x00\x00\x00\x00\x0b\xbe\xfct\x00\x00\x00\x00\xb9\x08\x1e\xe6\x00\x00\x00\x00\xc6<\xbb\xb7\x00\x00\x00\x00\xb4=I\x02\x00\x00\x00\x00E!=\x93\x00\x00\x00\x00&\xb8f\xe4\x00\x00\x00\x00\x17?_\xe9\x00\x00\x00\x00+\x95\xa18\x00\x00\x00\x00\xd9\x8d\xdf\xdd\x00\x00\x00\x00vz\xd1\x15\x00\x00\x00\x00\x11\xbc\x8a\xa6\x00\x00\x00\x80g\xb3O\x10\x00\x00\x00\x00dN\x1f\x7f\x00\x00\x00\x00\xeb;\xba\x13\x00\x00\x00\x00u\x14\x8d)\x00\x00\x00\x00\x80\xd7\x99\xa0\x00\x00\x00\x00\x89\xf9\x1e,\x00\x00\x00\x00\xcb\xf9P\x12\x00\x00\x00\x00\xd0\xd1G\x03\x00\x00\x00\x00\xe2nA\x1d\x00\x00\x00\x00\x8c\x85R\xc1\x00\x00\x00\x00P\xd0\xf2W\x00\x00\x00\x00KU\x14\xf5\x00\x00\x00\x00\xaaRlV\x00\x00\x00\x00I.\x89\xb8\x00\x00\x00\x00\x13\x04\xe7\xf2\x00\x00\x00\x00.)\x10\xe7\x00\x00\x00\x00D\xe9-*\x00\x00\x00\x00St\x91\x0f\x00\x00\x00\x00\xffw\xb1L\x00\x00\x00\x00\x89\x7f\x81\xe0\x00\x00\x00\x00\x915\x84\xfa\x00\x00\x00\x80;!\xcf\x86\x00\x00\x00\x00' != '\x7f\x9c+\xa4\xe8\x8f\x82}a`EPv\x05\x85>\xd7;\x80\x93\xf6\xef\xbc\x88\xeb\x1an\xac\xfaf\xef&<\xb1\xee\xa9\x88\x00K\x93\x10<\xfb\n\xee\xfd*hn\x01\xfaJX\xe8\xa3c\x9c\xa8\xa1\xe3\xf9\xaeW\xe25\xb8\xcc\x87<#\xdcb\xb8\xd2`\x16\x9a\xfa/u\xab\x91jX\xd9t\x91\x885\xd2^jCP\x85\xb2\xba\xdf\xd6\xdf\xaa\xc3Y\xa5\xef\xbb{\xccKY\xd58\xdf\x9a\x040.\x10\xc8\xbc\x1c\xbf\x1a\x0b:Q \xea\x17\xcd\xa7\xcf\xadv_V#GM6\x8c\xcc\xa8\xaf\x00\x07\xcd\x9f^L\x84\x9f\x16zX\x0b\x14\xaa\xbd\xef\xae\xe7\xee\xf4|\xb0\xfc\xa9v{\xe1\xfd\xa6\x94\x19\xdf\xb9\'\xe9\xdf\x074\x8b\x19f\x91\xab\xae\xb5\x80\xb3-\xefXS\x8b\x8d#\xf8w2\xeac\xb0+O\xa0\xf4\x873`\xe2\x84\x19(\xcd`\xddL\xee\x8c\xc0\xd4\xc9"\xa9a\x88\xd02g\\\x8a\xc8P\x93<z\xff\x153\xb9L\x83J\xdb\xb6\x9ca\x15\xba\xd4i-\x86\x19\xf9\x0b\x0c\xdf\x8a{\x9c&@)\xac\x18[p\xb8?(\x01\xf2\xf4\xb3\xf7\x0cY>\xa3\xae\xeba:\x7f\x1b\x1d\xe3?\xd7P\x81\xf5\x920_.E&\xed\xc0\x961\xb1\tX\xf4d\xd8\x89\xf3\x1b\xa0\x10%\x0f\xda\x7f\x13h\xec)g\xfc\x84\xef*\xe9\xaf\xf2h\xe0\xb1p\n\xff\xc6\x82\x0bR:=\x91q5\xf2\xdf\xf2\xee\x06\xbf\xe7+1$r\x1dJ&\xc0NS\xa7^0\xe7:z\x9cJ\x95\xd9\x1cU\xd4\x95\xe9\xf5\x1d\xd0\xb5\xe9\xd8<m^\x8c\xe8\x03\xaab\xb8\xd6T\xdbS\xd0\x9b\x8d\xcf\xf2s\xcd\xfe\xb5s\xfa\xd8\xbc\xd4Ux\xbe\xc2\xe7p\xd0\x1e\xfd\xe8nr\x1a?|l\xce\']\xab\xe6\xe2\x14?\x1a\xf1\x8d\xa7\xef\xdd\xc4\xc7\xb7\x0b^4]\xb9<\xc96\xbe\xa3#I\x1c\xcb8\xa3\x88\xf5F\xa9\xff\x00\xddN\x13\x00\xb9\xb2\x15= A\xd2\x05\xb4C\xe4\x1bE\xa6S\xf2\xa5\xc4I,\x1a\xddTE\x12\xdd\xa2R\x983F+q\xa4\x1aE\xbe\x97)\x0bo'
Comment 1 Mike Gilbert gentoo-dev 2017-05-17 19:41:27 UTC
Upstream says this should be fixed in 3.4.6.