Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samuelschlesinger/discrete-log-nizkp
A NIZKP of discrete logarithm solution.
https://github.com/samuelschlesinger/discrete-log-nizkp
Last synced: about 1 month ago
JSON representation
A NIZKP of discrete logarithm solution.
- Host: GitHub
- URL: https://github.com/samuelschlesinger/discrete-log-nizkp
- Owner: SamuelSchlesinger
- Created: 2023-11-04T21:09:42.000Z (about 1 year ago)
- Default Branch: dev
- Last Pushed: 2023-11-05T12:03:12.000Z (about 1 year ago)
- Last Synced: 2024-10-27T19:10:17.873Z (3 months ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NIZKP for Discrete Logarithms
Application of the Fiat-Shamir transform to the interactive proof of discrete logarithm.
Also includes an implementation of a signature scheme based on this approach.
## Interactive Proof
To prove that B = A^x (mod p),
1. Prover chooses a random number 0 <= r < p - 1 and sends the verifier h = A^r (mod p).
2. Verifier sends back a random bit b.
3. Prover sends s = (r + bx) (mod (p - 1)).
4. Verifier computes A^s (mod p) which should equal hB^b (mod p).## Non-Interactive Version
The non-interactive version will choose M random numbers Rs, then compute Hs
via H[i] = A^R\[i\] (mod p). Then, they will hash the Hs to produce a seed to
randomly generate the Bs bits. Then the prover computes S[i] = (R[i] + B[i] *
x) (mod (p - 1)), and the proof consists of:A, B, p, Hs, Ss.
The verifier checks that for all i, A^S\[i\] (mod p) = hB^B\[i\] (mod p).