{"id":24076641,"url":"https://github.com/lubux/afgh-pre-relic","last_synced_at":"2025-04-30T07:20:59.494Z","repository":{"id":86831076,"uuid":"171930015","full_name":"lubux/afgh-pre-relic","owner":"lubux","description":"AFGH Proxy Re-Encryption with RELIC (C library)","archived":false,"fork":false,"pushed_at":"2020-03-05T14:18:33.000Z","size":73,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T13:51:11.458Z","etag":null,"topics":["c","cryptography","proxy-re-encryption"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lubux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-02-21T19:14:51.000Z","updated_at":"2024-03-04T08:36:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"18047c48-a668-46a1-8c1f-68e337475a17","html_url":"https://github.com/lubux/afgh-pre-relic","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/lubux%2Fafgh-pre-relic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lubux%2Fafgh-pre-relic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lubux%2Fafgh-pre-relic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lubux%2Fafgh-pre-relic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lubux","download_url":"https://codeload.github.com/lubux/afgh-pre-relic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251658609,"owners_count":21622897,"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":["c","cryptography","proxy-re-encryption"],"created_at":"2025-01-09T19:59:57.276Z","updated_at":"2025-04-30T07:20:59.479Z","avatar_url":"https://github.com/lubux.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AFGH Proxy Re-Encryption with RELIC\n\n[![Build status](https://travis-ci.org/lubux/afgh-pre-relic.svg?branch=master)](https://travis-ci.org/lubux/afgh-pre-relic)\n\n\n\nImplements the AFGH proxy re-encryption scheme as presented in:\n\n- [link](https://eprint.iacr.org/2005/028.pdf) Ateniese et al. Improved Proxy Reencryption Schemes with Applications to Secure Distributed Storage. In NDSS, 2006.\n\nThis code is ported from the additive homomorphic PRE in [Pilatus](http://www.vs.inf.ethz.ch/publ/papers/mshafagh_SenSys17_Pilatus.pdf) [Code](https://github.com/Talos-crypto/Pilatus).\nThe implementation uses the [relic toolkit](https://github.com/relic-toolkit/relic) as a backend for the underlying pairing-based crypto.\n\n### Install Relic\nThe default settings to install relic.\n```\n./preset/gmp-pbc-bls381.sh\nmake \nsudo make install\n```\n\nor\n\n```\n./scripts/install-relic-ubuntu.sh\n```\n\n\n### Compile \nCmake is required to compile the code.\n```\nmake\n```\nThe `main.cpp` file contains the basic test code and shows how to use the library. \n```\n./bin/relic-pre\n```\n\nThe `benchmark_pre.cpp` file contains the simple benchmark code. \n```\n./bin/relic_pre_re_enc_benchmark\n```\n\n### Performance Indicator\nBenchmark results on on a MacBook Pro 2017 2.8 GHz Intel Core i7\n\n```\n-- Curve B12-P381:\nPerforming 100 runs\n\nPublic Parameter Generation\n\tavg: 2120us\n\tmin: 2104us\n\tmax: 2203us\n\nPublic Parameter Encoding\n\tavg: 3us\n\tmin: 3us\n\tmax: 6us\n\nPublic Parameter Decoding\n\tavg: 7us\n\tmin: 7us\n\tmax: 17us\n\nSecret Key Generation\n\tavg: 53us\n\tmin: 45us\n\tmax: 70us\n\nSecret Key Encoding\n\tavg: 0us\n\tmin: 0us\n\tmax: 0us\n\nSecret Key Decoding\n\tavg: 0us\n\tmin: 0us\n\tmax: 0us\n\nPublic Key Generation\n\tavg: 537us\n\tmin: 513us\n\tmax: 578us\n\nPublic Key Encoding\n\tavg: 1us\n\tmin: 1us\n\tmax: 1us\n\nPublic Key Decoding\n\tavg: 2us\n\tmin: 2us\n\tmax: 4us\n\nKeypair Derivation\n\tavg: 594us\n\tmin: 564us\n\tmax: 628us\n\nEncryption\n\tavg: 1368us\n\tmin: 1265us\n\tmax: 1524us\n\nDecryption\n\tavg: 2785us\n\tmin: 2699us\n\tmax: 2887us\n\nToken Generation\n\tavg: 648us\n\tmin: 570us\n\tmax: 717us\n\nToken Encoding\n\tavg: 1us\n\tmin: 1us\n\tmax: 1us\n\nToken Decoding\n\tavg: 2us\n\tmin: 2us\n\tmax: 3us\n\nRe-Encryption\n\tavg: 2120us\n\tmin: 2104us\n\tmax: 2210us\n\nDecryption (re-encrypted)\n\tavg: 1096us\n\tmin: 978us\n\tmax: 1209us\n\n```\n\n\n### Experimental Code\nThis is experimental code and provides NO security guarantees.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flubux%2Fafgh-pre-relic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flubux%2Fafgh-pre-relic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flubux%2Fafgh-pre-relic/lists"}