{"id":16034825,"url":"https://github.com/noot/dleq-rs","last_synced_at":"2025-03-03T00:15:57.855Z","repository":{"id":122592004,"uuid":"569767778","full_name":"noot/dleq-rs","owner":"noot","description":"cross-group discrete log equality proof","archived":false,"fork":false,"pushed_at":"2022-11-28T02:35:21.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T11:13:30.388Z","etag":null,"topics":["cryptography","dleq","zero-knowledge"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noot.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":"2022-11-23T15:12:30.000Z","updated_at":"2022-11-27T16:03:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"bacd6140-2cb7-4c22-84d5-42895a383008","html_url":"https://github.com/noot/dleq-rs","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"737ec870ca951370939137e6ca8b624531169e82"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noot%2Fdleq-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noot%2Fdleq-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noot%2Fdleq-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noot%2Fdleq-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noot","download_url":"https://codeload.github.com/noot/dleq-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587844,"owners_count":19986628,"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":["cryptography","dleq","zero-knowledge"],"created_at":"2024-10-08T22:01:17.855Z","updated_at":"2025-03-03T00:15:57.802Z","avatar_url":"https://github.com/noot.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cross-Group Discrete Logarithm Equality\n\nThis repo contains an implementation of Cross-Group DLEq proofs as specified [here](https://eprint.iacr.org/2022/1593.pdf). The protocol implemented is the non-interactive Fiat-Shamir'd version of the protocol described in the paper. Additionally, the extension in section 5 which allows for values larger than `BITLEN_WITNESS` to be proven is also implemented.\n\nThis is not production-ready, I wrote this for learning purposes only. It has a lot of `unwraps()` :D \n\n## Usage\n\nTo generate a proof of a witness `0 \u003c x \u003c 2 ** 64`:\n\n```rust\nuse crypto_bigint::U64;\nuse dleq_rs::{\n    DLEqProver,\n    ed25519::Ed25519Group, \n    secp256k1::Secp256k1Group,\n};\n\nlet x = U64::random(\u0026mut OsRng);\nlet prover = DLEqProver::\u003cEd25519Group, Secp256k1Group\u003e::new();\nlet proof = prover.prove(\u0026x.to_be_bytes());\nassert!(proof.verify());\n```\n\nTo generate a proof of a witness `0 \u003c x \u003c 2 ** 256`:\n\n```rust\nuse crypto_bigint::U64;\nuse dleq_rs::{\n    DLEqProver,\n    ed25519::Ed25519Group, \n    secp256k1::Secp256k1Group,\n};\nuse rand::{self, RngCore};\n\nlet mut x = [0u8; 32];\nlet r = \u0026mut rand::thread_rng();\nr.fill_bytes(\u0026mut x);\n\nlet prover = DLEqProver::\u003cEd25519Group, Secp256k1Group\u003e::new();\nlet proof = prover.prove_large_witness(\u0026x);\nassert!(proof.verify());\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoot%2Fdleq-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoot%2Fdleq-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoot%2Fdleq-rs/lists"}