{"id":35012648,"url":"https://github.com/lucabonamino/crypto-vdf","last_synced_at":"2025-12-27T05:03:31.498Z","repository":{"id":220242184,"uuid":"720482431","full_name":"LucaBonamino/crypto-VDF","owner":"LucaBonamino","description":"Cryptocurrency and Cryptographic blockchain Verifiadle Delay Functions project","archived":false,"fork":false,"pushed_at":"2025-08-29T02:55:55.000Z","size":927,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-29T06:44:16.851Z","etag":null,"topics":["cli","cryptocurrency","cryptography","pietrzark-vdf","python","verifiable-delay-functions","wesolowski-vdf"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LucaBonamino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-11-18T16:14:28.000Z","updated_at":"2025-08-29T02:55:59.000Z","dependencies_parsed_at":"2024-02-04T17:48:57.973Z","dependency_job_id":"b62d48f5-42d8-415f-ada2-5040668e25bd","html_url":"https://github.com/LucaBonamino/crypto-VDF","commit_stats":null,"previous_names":["programmingathlete/crypto-vdf","lucabonamino/crypto-vdf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LucaBonamino/crypto-VDF","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaBonamino%2Fcrypto-VDF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaBonamino%2Fcrypto-VDF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaBonamino%2Fcrypto-VDF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaBonamino%2Fcrypto-VDF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LucaBonamino","download_url":"https://codeload.github.com/LucaBonamino/crypto-VDF/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaBonamino%2Fcrypto-VDF/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28072694,"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","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cli","cryptocurrency","cryptography","pietrzark-vdf","python","verifiable-delay-functions","wesolowski-vdf"],"created_at":"2025-12-27T05:01:48.181Z","updated_at":"2025-12-27T05:03:31.490Z","avatar_url":"https://github.com/LucaBonamino.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crypto-VDF\nImplementation of two time-lock based-Verifiable Delay Functions.\nThe two VDFs are\n\u003cul\u003e\n  \u003cli\u003ePietrzark's VDF: https://eprint.iacr.org/2018/627.pdf\u003c/li\u003e\n  \u003cli\u003eWesoloski's VDF: https://eprint.iacr.org/2018/623\u003c/li\u003e\n\u003c/ul\u003e\nIn the case Wesoloski's VDF, our disign and implementation of the optimization of the proof, slightly diverged from the original one. Our solution is more efficient compared to the paper's one when restricting to binary values b_is (binar repreentation of the proof - kappa = 1), but it is not more efficinet in general.\n\n## Organisation of the repo\n### Organisation of the package\n\u003cul\u003e\n\u003cli\u003ereport/VDF-Luca_Boghos_Mathias.pdf - project report\u003c/li\u003e\n\u003cli\u003eclis - directory to handle the Typer CLI\u003c/li\u003e\n\u003cli\u003ecustom_error - directory containing custom exception classes to facilitate the error handling\u003c/li\u003e\n\u003cli\u003edata_transfer_objects - directory containing 'contracts' between functions (input and output pydantic models)\u003c/li\u003e\n\u003cli\u003eutils - directory containing some utilities function such has prime number generators, quadratic residues generators and square-and-multiply function\u003c/li\u003e\n\u003cli\u003e\nverifiable_delay_functions - directory containing the actual VDFs source code\n\u003cul\u003e\n\u003cli\u003evdf.py - file containing the VDF abstract class\u003c/li\u003e\n\u003cli\u003epietrzak.py - file containing the Pietrzak VDF (VDF1)\u003c/li\u003e\n\u003cli\u003ewesolowski.py - file containing the Wesolowski VDF (VDF2)\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003eentry_point.py - entrypoint file for the Typer CLI\u003c/li\u003e\n\u003c/ul\u003e\n\n### Files outside of the source directory\nOurside of the source folder, the following files can be found\n\u003cul\u003e\n\u003cli\u003eMakefile\u003c/li\u003e\n\u003cli\u003erequirements.txt - dependencies file for the project\u003c/li\u003e\n\u003cli\u003erequirements-tests.txt - dependencies file for the tests (dependencies for the project + potential additional dependencies)\u003c/li\u003e\n\u003cli\u003esetup.py - installation file for the package\u003c/li\u003e\n\u003cli\u003esetup.cfg - file containing additional information for the setup of the project (such as the CLI entry point) and potential settings for linting and test coverage\u003c/li\u003e\n\u003c/ul\u003e\n\n## Setup\nInstall the package using\n\n\u003ccode\u003emake setup\u003c/code\u003e\n\n\n## How to run the VFDs \n### With CLI\nTo run the VDFs from the CLI run \n\n\u003ccode\u003ecryptoVDF --help\u003c/code\u003e\n\nand see the options.\n\nFor example, suppose you want to run the Pietrzak eval function, use\n\n\u003ccode\u003ecryptoVDF pietrzak eval\u003c/code\u003e\n\n### Without CLI\nWithout CLI, the source code can be run in a classic manner\n\n\u003ccode\u003epython src/crypto_VDF/verifiable_delay_functions/pietrzak.py\u003c/code\u003e\n\n\n## How to run unittests\nTo run the unit tests, run \n\n\u003ccode\u003emake tests\u003c/code\u003e\n\n## Examples\n\n### Compute and Verify\n\nDelay of 2^(10)\n\n\u003ccode\u003ecryptoVDF pietrzak generate-and-verify 359 --delay 1024 --modulus 437 --verbose\u003c/code\u003e\n\nDelay of 2^(20)\n\n\u003ccode\u003ecryptoVDF pietrzak generate-and-verify 359 --delay 1048576 --modulus 437 --verbose\u003c/code\u003e\n\n# Full VDF\nDelay of 2^(20)\n\n\u003ccode\u003ecryptoVDF pietrzak full-vdf --delay 1048576 --security-parameter 128\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF wesolowski full-vdf --delay 1048576 --security-parameter 128\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF wesolowski full-vdf --delay 1048576 --security-parameter 128 --trapdoor\u003c/code\u003e\n\n# Plots\n\u003ccode\u003ecryptoVDF wesolowski plots --max-delay-exp 10 --iterations 20  --show\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF pietrzak plots --max-delay-exp 10 --iterations 20  --show\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF pietrzak plots --max-delay-exp 8 --iterations 2 --security-parameter 4 --show --verbose\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF pietrzak plots --max-delay-exp 10 --iterations 400 --security-parameter 4 --show --verbose\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF pietrzak plots --max-delay-exp 10 --iterations 10 --security-parameter 128 --show --verbose\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF wesolowski plots --max-delay-exp 10 --iterations 10 --security-parameter 128 --show --verbose\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF pietrzak plots --max-delay-exp 10 --iterations 10 --security-parameter 128 --show --verbose\u003c/code\u003e\n\n\n# Demo\n\n## Full-VDF\n\n### Completeness\n\u003ccode\u003ecryptoVDF pietrzak full-vdf --delay 1048576 --security-parameter 128\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF wesolowski full-vdf --delay 1048576 --security-parameter 128\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF wesolowski full-vdf --delay 1048576 --security-parameter 128 --trapdoor\u003c/code\u003e\n\n### Soundness\n### VDF1\n\n\u003ccode\u003ecryptoVDF pietrzak eval --security-parameter 128 --delay 4\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF pietrzak verify --x input --y output --proof proof --modulus modulus --security-parameter security-parameter\u003c/code\u003e\n\nExample: The following should evaluate to True\n\n\u003ccode\u003ecryptoVDF pietrzak verify --x 60165111687309026253618363786070190189 --y 38920676524930194932948449234450122897 --proof 26733557083776090708288610604071675446,54679161191322144951368137116431681903 --modulus 202791651255554990394641179601075112913 --security-parameter 128\u003c/code\u003e\n\n#### VDF2\n\u003ccode\u003ecryptoVDF wesolowski eval --security-parameter 128 --delay 4\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF wesolowski verify --x input --y output --proof proof --delay delay --modulus modulus\u003c/code\u003e\n\nExample: The following will return True\n\n\u003ccode\u003ecryptoVDF wesolowski verify --x 95974600194182310684653862122690543205 --y 856966856996350542601758883331119 --proof 95974600194182310684653862122690543205 --delay 4 --modulus 100167473050021300389050029515619897043\u003ccode\u003e\n\n\n\n\n## Plots\n\u003ccode\u003ecryptoVDF pietrzak plots --max-delay-exp 10 --iterations 200 --security-parameter 4 --show\u003c/code\u003e\n\n\u003ccode\u003ecryptoVDF wesolowski plots --max-delay-exp 10 --iterations 200 --security-parameter 4 --show\u003c/code\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucabonamino%2Fcrypto-vdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucabonamino%2Fcrypto-vdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucabonamino%2Fcrypto-vdf/lists"}