wspr-ncsu / BLS-Witness-Encryption

Witness Encryption based on BLS signatures in C++, using the bls library for BLS signatures
3 stars 0 forks source link

How to import the module 'witencpy' and running benchmark.py? #2

Closed smallfrog closed 4 months ago

smallfrog commented 4 months ago

Although the test of this project (https://github.com/kofi-dalvik/bls-witness-encryption) can be executed in my laptop running Ubuntu 20.04 LTS according to the guidance, when I open /bls-witness-encryption/bindings/python/benchmark.py, the module 'witencpy' is not identified: 图片

Furthermore, the following instruction cannot be executed: yanfeng1@yanfeng1-K45VD:~/Documents/bls-signatures$ /bin/python3 /home/yanfeng1/Documents/bls-signatures/python-bindings/transferhub/bls-witness-encryption/bindings/python/benchmark.py Traceback (most recent call last): File "/home/yanfeng1/Documents/bls-signatures/python-bindings/transferhub/bls-witness-encryption/bindings/python/benchmark.py", line 12, in from witencpy import (Scheme, CipherText, OTP) ModuleNotFoundError: No module named 'witencpy'

So how to import the module 'witencpy' and running /bls-witness-encryption/bindings/python/benchmark.py? I eagerly await your response. Thank you!

lokingdav commented 4 months ago

Hey @smallfrog

I have added some useful setup and usage information to the bindings/python/README.md.

You need first to install the witencpy library. In the project's root, run python setup.py install. Once installed, you should also install blspy using pip install blspy.

smallfrog commented 4 months ago

When I run python setup.py install, the following error happen: ...The following error occurred while trying to add or remove files in the installation directory:

[Errno 13] Permission denied

...

Trying sudo python setup.py install will work. Thank you!

lokingdav commented 4 months ago

Glad it works. I'll close this issue now.