initc3 / HoneyBadgerMPC

Robust MPC-based confidentiality layer for blockchains
GNU General Public License v3.0
128 stars 64 forks source link

problem about shuhong Gao decoding #428

Open freelyyu opened 4 years ago

freelyyu commented 4 years ago

Hi, Thanks a lot for your excellent work for providing such a good library. I am new with reed-solomon codes, recently, I have read Shuhong Gao algorithm Gao, I saw that @rahulgovind have implement this algorithm and pull it. I want to run gao's algorithm. After many failures I still can't install docker on my laptop. it seems that gao's algorithm was written in c++ and invoked in python file for testing. I wonder if it is possible not to install the entire library if I just want to run gao's algorithm. I am sorry to trouble you.

Looking forward to your reply.

Best Regards!

amiller commented 4 years ago

You should be able to install all of the libraries directly. Think of the dockerfile as a documentation on how to set up your local environment - docker itself isn't necessary. This will work best if you start with Ubuntu on your laptop, otherwise some differences may be needed

rahulgovind commented 4 years ago

If you want to just use Gao's algorithm in C++, you can directly use the code from rsdecode_impl.h. You will have to setup NTL separately and read up on NTL documentation to see how to instantiate ZZ_p objects.

You can run the following to setup and install NTL

wget -qO- https://www.shoup.net/ntl/ntl-11.3.2.tar.gz | tar xzvf - \
         &&  cd ntl-11.3.2/src \
         && ./configure CXXFLAGS="-g -O2 -fPIC -march=native -pthread -std=c++11" \
         && make -j4 \
         && make install
freelyyu commented 4 years ago

Thanks for your tips. I have installed NTL successfully and I know how to use ZZ_p and so on. I usually use c++. I am not familar with python and gao's algorithm before. I will try to understand his algorithm and try to implement a c++ file to call the function in rsdecode_impl.h.