fukai6 / milp_speck

17 stars 18 forks source link

Bad magic number error #1

Open mebinjp opened 7 years ago

mebinjp commented 7 years ago

While running the program speck_diff_find.py, I am getting the following error: "ImportError: bad magic number in 'MILPSbox': b'l\x0c\r\n'".

The version of Python used to compile MILPSbox.pyc file may be different from mine. Please provide the source code from which you have compiled it so that I can compile it freshly.

fukai6 commented 7 years ago

I think you maybe used the python2.7 in linux. I used the python3.2 in windows.

mebinjp commented 7 years ago

I tried with Python3.2. Now it is working. Thank you.

On Sat, Jan 21, 2017 at 2:44 PM, fukai6 notifications@github.com wrote:

I think you maybe used the python2.7 in linux. I used the python3.2 in windows.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fukai6/milp_speck/issues/1#issuecomment-274250075, or mute the thread https://github.com/notifications/unsubscribe-auth/ADP0OhdClv_E8qam_P-LTmQmiwqMFnn1ks5rUcyNgaJpZM4LqA6i .

-- with regards, Mebin.... Hope is a good thing....may be the best of things. And no good thing ever dies.

pfasante commented 6 years ago

With python3.5 this does not work either. Can you provide the python code for MILPSbox.pyc?

fukai6 commented 6 years ago

can you give me the error ?
you can read the paper(https://eprint.iacr.org/2013/676.pdf). I used the code in the paper to generate MILPSbox.pyc.

pfasante commented 6 years ago

This is the error I'm getting:

% ipython
Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import speck_diff_find
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-0d2ff10e6919> in <module>()
----> 1 import speck_diff_find

~/werkstatt/werkbank/milp_speck/speck_diff_find.py in <module>()
      2 import math
      3 import random
----> 4 from MILPSbox import *
      5 from random import *
      6 

ImportError: bad magic number in 'MILPSbox': b'l\x0c\r\n'
juaninf commented 3 years ago

Could you share MILPSbox code, please?