blob: 3b6f9d56cc0b7832885a376fb76bfd95667d0bb5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<tt>
<div dir="ltr"><div><div>Thanks for your help - endianness was the issue. The tests all pass after patching setup.py.<br><br></div>Thanks again!<br></div>Jeff<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 29, 2015 at 9:50 PM, Legrandin <span dir="ltr"><<a href="mailto:helderijs@gmail.com" target="_blank">helderijs@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br><br>
<br><br>
You most probably get PyCrypto compiled in little-endian mode but your<br><br>
router is big endian. There is no clean way to solve this other than<br><br>
manually forcing 'PCT_BIG_ENDIAN' to be 1 in setup.py.<br><br>
<br><br>
L.<br><br>
<div><div class="h5"><br><br>
2015-10-28 12:03 GMT+01:00 Jeffery To <<a href="mailto:jeffery.to@gmail.com">jeffery.to@gmail.com</a>>:<br><br>
> Hi,<br><br>
><br><br>
> I'm trying to cross-compile PyCrypto 2.6.1 for OpenWrt (Chaos Calmer 15.05,<br><br>
> targeting ar71xx). The library compiled without any fatal errors and I'm<br><br>
> able to package and install on my router (TP-Link TL-MR3020).<br><br>
><br><br>
> To be sure it's working correctly, I transferred setup.py to my router and<br><br>
> ran the self-test. All the tests passed except for the 9 RIPEMD-160 hash<br><br>
> tests. The library function(s) seem to return normally, but the returned<br><br>
> hash is incorrect, e.g.:<br><br>
><br><br>
> FAIL: runTest (Crypto.SelfTest.Hash.common.HashSelfTest)<br><br>
> RIPEMD #1: '' (empty string)<br><br>
> ----------------------------------------------------------------------<br><br>
> Traceback (most recent call last):<br><br>
> File "/usr/lib/python2.7/site-packages/Crypto/SelfTest/Hash/common.py",<br><br>
> line 88, in runTest<br><br>
> self.assertEqual(self.expected, out1) # h = .new(); h.update(data);<br><br>
> h.digest()<br><br>
> AssertionError: '9c1185a5c5e9fc54612808977ee8f548b2258d31' !=<br><br>
> '7c7c0f550ddb9e5ebf157869ea147e65cb89bb0e'<br><br>
><br><br>
> I'm unsure how to proceed at this point; my searches on Google haven't<br><br>
> returned any relevant results. What area/library/etc should I<br><br>
> investigate/debug to fix this? Any help would be appreciated.<br><br>
><br><br>
> Thanks!<br><br>
> Jeff<br><br>
><br><br>
><br><br>
</div></div>> _______________________________________________<br><br>
> pycrypto mailing list<br><br>
> <a href="mailto:pycrypto@lists.dlitz.net">pycrypto@lists.dlitz.net</a><br><br>
> <a href="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto" rel="noreferrer" target="_blank">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</a><br><br>
><br><br>
_______________________________________________<br><br>
pycrypto mailing list<br><br>
<a href="mailto:pycrypto@lists.dlitz.net">pycrypto@lists.dlitz.net</a><br><br>
<a href="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto" rel="noreferrer" target="_blank">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</a><br><br>
</blockquote></div><br></div><br>
</tt>
|