{"id":25080153,"url":"https://github.com/sitetester/schnorr-dlog-zkp","last_synced_at":"2025-09-07T20:05:57.085Z","repository":{"id":271080348,"uuid":"911761836","full_name":"sitetester/schnorr-dlog-zkp","owner":"sitetester","description":"A Rust implementation of Non-Interactive Schnorr Zero-Knowledge Discrete Logarithm Proof scheme with a Fiat-Shamir transformation.","archived":false,"fork":false,"pushed_at":"2025-01-06T19:46:21.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T03:18:10.430Z","etag":null,"topics":[],"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/sitetester.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":"2025-01-03T19:35:00.000Z","updated_at":"2025-01-06T19:46:24.000Z","dependencies_parsed_at":"2025-01-05T11:26:01.317Z","dependency_job_id":"c9d27a49-7de0-48c8-beed-f9a63ef9bf93","html_url":"https://github.com/sitetester/schnorr-dlog-zkp","commit_stats":null,"previous_names":["sitetester/schnorr-dlog-zkp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fschnorr-dlog-zkp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fschnorr-dlog-zkp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fschnorr-dlog-zkp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fschnorr-dlog-zkp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sitetester","download_url":"https://codeload.github.com/sitetester/schnorr-dlog-zkp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246586099,"owners_count":20801026,"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":"2025-02-07T03:18:22.901Z","updated_at":"2025-04-01T04:39:35.481Z","avatar_url":"https://github.com/sitetester.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nA Rust implementation of Non-Interactive Schnorr Zero-Knowledge Discrete Logarithm Proof scheme with a Fiat-Shamir transformation.\n\nExample program output:\n```\nRandom secret: 0XEF5BEF789DE17759AC2293382D4D2D2DBB5D220F98BF99DF15D9FA61BCC7D778\nProof computation time: 1 ms\nVerify computation time: 2 ms\n✅ DLOG proof is correct\nPrinting proof...\n-----Original-----\nDLogProof { \n    t: ProjectivePoint { \n       x: FieldElement(FieldElementImpl { value: FieldElement5x52([965291443106997, 689422449863536, 1200405401125018, 3426219405815811, 215476664839722]), magnitude: 1, normalized: false }), \n       y: FieldElement(FieldElementImpl { value: FieldElement5x52([3900385919903053, 3633786440154162, 1783714629815838, 142161642848261, 169337120640621]), magnitude: 1, normalized: false }), \n       z: FieldElement(FieldElementImpl { value: FieldElement5x52([614627455921089, 4435624265092572, 2614043675640399, 2970682172781358, 195508401584888]), magnitude: 1, normalized: false }) \n    }, \n    s: Scalar(Uint(0x3D237241B7FEEA9ECDFCF315B529A5424A1FE6327C0BAD821F52371F804D8E33))\n}\n-----Affine-----\nt: AffinePoint { \n    x: FieldElement(FieldElementImpl { value: FieldElement5x52([3498511524313427, 726385997402889, 1651688364219240, 4304763427786895, 56043366878661]), magnitude: 1, normalized: true }), \n    y: FieldElement(FieldElementImpl { value: FieldElement5x52([2966093787688926, 185048830672687, 3091769914310690, 4444249253916888, 172868112874250]), magnitude: 1, normalized: true }), \n    infinity: 0 \n}\n-----HEX-----\nt.x: 0x32f89cf98dc5f4b28d6f4908f5de33aa3a9b68294a4eb585309c6de0b0a63953\nt.y: 0x9d38fe75fb0afca056a12b0d8afbf2c77840220a84d09d17f2fa89a58695efde\ns: 0x3d237241b7feea9ecdfcf315b529a5424a1fe6327c0bad821f52371f804d8e33\n-----JSON-----\nCompressed JSON (standard): {\"t\":\"0232f89cf98dc5f4b28d6f4908f5de33aa3a9b68294a4eb585309c6de0b0a63953\",\"s\":\"3d237241b7feea9ecdfcf315b529a5424a1fe6327c0bad821f52371f804d8e33\"}\nUncompressed JSON (with both coordinates):\nserde_json::to_string: {\"t\":{\"x\":\"0x32f89cf98dc5f4b28d6f4908f5de33aa3a9b68294a4eb585309c6de0b0a63953\",\"y\":\"0x9d38fe75fb0afca056a12b0d8afbf2c77840220a84d09d17f2fa89a58695efde\"},\"s\":\"0x3d237241b7feea9ecdfcf315b529a5424a1fe6327c0bad821f52371f804d8e33\"}\nserde_json::to_string_pretty: {\n  \"t\": {\n    \"x\": \"0x32f89cf98dc5f4b28d6f4908f5de33aa3a9b68294a4eb585309c6de0b0a63953\",\n    \"y\": \"0x9d38fe75fb0afca056a12b0d8afbf2c77840220a84d09d17f2fa89a58695efde\"\n  },\n  \"s\": \"0x3d237241b7feea9ecdfcf315b529a5424a1fe6327c0bad821f52371f804d8e33\"\n}\nParsed proof from JSON: \nDLogProof { t: ProjectivePoint { \n        x: FieldElement(FieldElementImpl { value: FieldElement5x52([3498511524313427, 726385997402889, 1651688364219240, 4304763427786895, 56043366878661]), magnitude: 1, normalized: true }), \n        y: FieldElement(FieldElementImpl { value: FieldElement5x52([2966093787688926, 185048830672687, 3091769914310690, 4444249253916888, 172868112874250]), magnitude: 1, normalized: true }), \n        z: FieldElement(FieldElementImpl { value: FieldElement5x52([1, 0, 0, 0, 0]), magnitude: 1, normalized: true }) \n    }, \n    s: Scalar(Uint(0x3D237241B7FEEA9ECDFCF315B529A5424A1FE6327C0BAD821F52371F804D8E33)) \n}\n✅ DLog proof recovered successfully!\n```\nThe last recovered proof look differently from `-----Original-----`, but these proofs actually do match mathematically, \nThey look different because they represent the same point in different forms / internal states.\n\nIn `original`, we have  \nx: [...965291443106997, ...],  \ny: [...3900385919903053, ...],  \nz: [...614627455921089, ...],   // z != 1  \nnormalized: false               // Not normalized\n\nWhile the one recovered from JSON  \nx: [...3498511524313427, ...],  // x/z  \ny: [...2966093787688926, ...],  // y/z  \nz: [1, 0, 0, 0, 0],             // z = 1  \nnormalized: true                // Normalized\n\nAlso the `s` values are identical:\n```\ns: 0x3D237241B7FEEA9ECDFCF315B529A5424A1FE6327C0BAD821F52371F804D8E33\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitetester%2Fschnorr-dlog-zkp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsitetester%2Fschnorr-dlog-zkp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitetester%2Fschnorr-dlog-zkp/lists"}