{"id":18966609,"url":"https://github.com/eellak/gsoc17module-zeus","last_synced_at":"2025-04-19T14:21:42.058Z","repository":{"id":142037076,"uuid":"90966255","full_name":"eellak/gsoc17module-zeus","owner":"eellak","description":"Repository of GSOC 2017 GFOSS Project for improving Zeus.","archived":false,"fork":false,"pushed_at":"2017-10-12T09:27:00.000Z","size":349,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-29T08:32:57.631Z","etag":null,"topics":["algorithm","mix-net","open-source"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eellak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-11T10:15:34.000Z","updated_at":"2021-03-25T19:24:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"b62df972-9f58-4f21-8bd0-bf9a0c0c4778","html_url":"https://github.com/eellak/gsoc17module-zeus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eellak%2Fgsoc17module-zeus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eellak%2Fgsoc17module-zeus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eellak%2Fgsoc17module-zeus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eellak%2Fgsoc17module-zeus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eellak","download_url":"https://codeload.github.com/eellak/gsoc17module-zeus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249213735,"owners_count":21231096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","mix-net","open-source"],"created_at":"2024-11-08T14:37:51.941Z","updated_at":"2025-04-19T14:21:42.051Z","avatar_url":"https://github.com/eellak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Implementation of a Re-Encryption Mix-Net\n======================================================\n\nThis module implements the re-encryption mix-net\npresented by Fauzi et al. in their paper:\n[\"A Shuffle Argument Secure in the Generic\nModel\"](https://eprint.iacr.org/2016/866.pdf).\n\nThe motivation behind this implementation is\nto replace the mix-net used by\nthe e-voting application, [Zeus](https://github.com/grnet/zeus)\nin favor of a faster one.\nHowever it can be used by anyone that needs a\nmix-net implementation.\nThat is,\napart from e-voting,\nthe mix-net can be used for other tasks such as surveys\nand the collection of data from various IoT\n(Internet of Things) devices.\n\nThe implementation was based on an existing\n[prototype](https://github.com/grnet/ac16)\nof the same re-encryption mix-net.\n\n\nPython\n======\n\nThe module requires **Python 2.7**.\n\n\nInstalling Dependencies\n=======================\n\n1. Install [libsnark](https://github.com/scipr-lab/libsnark) following\nthe instructions on its GitHub page.\n2. Install [libff](https://github.com/scipr-lab/libff) following\nthe instructions on its GitHub page.\n3. Install package dependencies\n```\n    sudo apt-get install python python-pip\n```\n4. Install Cython\n```\n    pip install cython\n```\n\nDependencies Notes\n==================\n\nWe faced some issues while installing libff and libsnark on Ubuntu 16.04 LTS.\nIf the installation process doesn't work try the following:\n\n- Install libsnark on `/usr/` with\n```\nmake install PREFIX=/usr\n```\nafter compiling it.\n\n- After installing libff, inside the cloned repo copy\nthe third party libraries to the local includes.\n```\ncp -R depends /usr/local/include/\n```\n\n- Add to the libff library (before compiling it) the `-fPIC`\n  flag on CMakeLists. Specifically on the\n  `CMakeLists.txt` file add `-fPIC` to the existing flags on `CMAKE_CXX_FLAGS`\n  and `CMAKE_EXE_LINKER_FLAGS`.\n\n- In order to avoid libff outputting profiling info change the variables\n  `inhibit_profiling_info` and `inhibit_profiling_counters` to `true` on\n  `libff/common/profiling.cpp` before compiling the library.\n\nInstalling libffpy\n==================\n\nInside the libffpy folder run:\n\n```\npython setup.py install\n```\n\nInstalling Package\n==================\n\nOn the root directory run:\n\n```\npython setup.py install\n```\n\nImplementation\n==============\n\nlibffpy\n-------\n\nThe mix-net proposed by Fauzi et al requires elliptic curve computations.\nA suitable library that provides support for elliptic curve computations\nis [libff](https://github.com/scipr-lab/libff).\n\nSince libff is implemented in C++ we used Cython to create a wrapper\nfor some of the features of libff. The Cython wrapper can be found in\nthe folder `libffpy`. While not a complete wrapper, it can be\nused independently by anyone that needs the features provided by\nlibff.\n\nThe curve we used is bn128 and libff implements\nthe [ate pairing](https://github.com/herumi/ate-pairing)\nfor its bilinear pairing computations.\n\nMix-Net Module\n--------------\n\nThe mix-net is implemented using Python. It requires a working\ninstallation of libffpy.\n\n\nChallenges\n==========\n\n- **Elliptic Curve Multiplications**: The real bottleneck of the prototype\nis its performance. The prototype's\nperformance was much slower than other implementations in C++. After some\nspecific metrics we identified that the issue was that the multiplications\non the elliptic curve elements were slow. The library implementing those\nmultiplications was [bplib](https://github.com/gdanezis/bplib/).\n\n- **bplip vs libff**: Since the bottleneck were the multiplications on the elliptic\ncurve, we looked at replacements for bplib. One such replacement is libff. bplib\nuses libraries provided by OpenSSL for its elliptic curve computations.\nWe defined specific metrics and compared the underlying C code of bplib\nwith libff. The results showed that libff was indeed faster than OpenSSL,\nso we moved forward with the implementation of libffpy.\n\nTODOs\n=====\n\n- **CRS (Common Reference String)**: In order for the mix-net to be truly decentralized and anonymous\nthere needs to be a mechanism to create the CRS anonymously.\n\n- **Integration with Zeus**\n\nUsage\n=====\n\nThere exists a demo in the file `demo.py` of the root directory\nthat shows the basic workflow of the mix-net module.\n\nOrganization\n============\n\nThis [project](https://summerofcode.withgoogle.com/projects/#6269134514946048)\nwas developed as part of the [Google Summer of Code](\nhttps://summerofcode.withgoogle.com) program.\n\nStudent: Vitalis Salis\n\nMentors:\n\n- [Dimitris Mitropoulos](http://dimitro.gr/)\n- Georgios Tsoukalas\n- [Panos Louridas](https://istlab.dmst.aueb.gr/content/members/m_louridas.html)\n\nOrganization: [Open Technologies Alliance - GFOSS](https://gfoss.eu/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feellak%2Fgsoc17module-zeus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feellak%2Fgsoc17module-zeus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feellak%2Fgsoc17module-zeus/lists"}