{"id":23532612,"url":"https://github.com/conduition/zkpreimage","last_synced_at":"2025-05-14T16:19:31.123Z","repository":{"id":223074408,"uuid":"759241370","full_name":"conduition/zkpreimage","owner":"conduition","description":"Zero-Knowledge associated-preimage proofs.","archived":false,"fork":false,"pushed_at":"2024-02-18T15:04:57.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T16:19:19.627Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conduition.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":"2024-02-18T03:08:06.000Z","updated_at":"2024-02-18T04:16:22.000Z","dependencies_parsed_at":"2024-12-25T23:12:01.896Z","dependency_job_id":"26464fe8-9920-4a8c-bd98-e8117e447887","html_url":"https://github.com/conduition/zkpreimage","commit_stats":null,"previous_names":["conduition/zkpreimage"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduition%2Fzkpreimage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduition%2Fzkpreimage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduition%2Fzkpreimage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduition%2Fzkpreimage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conduition","download_url":"https://codeload.github.com/conduition/zkpreimage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254179900,"owners_count":22027884,"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":[],"created_at":"2024-12-25T23:11:54.652Z","updated_at":"2025-05-14T16:19:31.101Z","avatar_url":"https://github.com/conduition.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zkpreimage\n\nThis repository is a demonstration using [the RISC0 zkVM](https://dev.risczero.com/api/zkvm) to generate a zero-knowledge key-statement proof, which asserts that for some hash $z$ and secp256k1 point $P$, the prover knows a 32-byte secret key $k$ such that:\n\n- $SHA256(k) = z$\n- $kG = P$.\n\nThis allows the prover to use bitcoin payment tools like Hash-Time Lock Contracts or the [Lightning Network](https://lightning.network) to pay for $k$. In so doing they discover the preimage of $z$, but also can be certain they will learn the discrete log of the point $P$.\n\nThis demonstrates in principle the way in which further claims about $k$ could be proven in advance of a preimage sale, such as:\n\n- $k$ is a signature by a valid signature by a given pubkey.\n- $k$ is a share in a given Shamir Secret Sharing group.\n- $k$ is a valid decryption key for a certain ciphertext.\n- $k$ is a solution to a given sudoku puzzle.\n- etc.\n\nThis opens up a wealth of previously unexplored possibilities to effectively market the sale of secret information in a safe and secure manner.\n\n## UNFINISHED\n\nThis repo is currently not fully functional.\n\n## Running the Proof\n\nTo run the proof:\n\n```\n$ cargo run .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconduition%2Fzkpreimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconduition%2Fzkpreimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconduition%2Fzkpreimage/lists"}