Add hash-based commitment scheme to generic-ec-zkp#62
Closed
sridhar-panigrahi wants to merge 1 commit intoLFDT-Lockness:mfrom
Closed
Add
hash-based commitment scheme to generic-ec-zkp#62sridhar-panigrahi wants to merge 1 commit intoLFDT-Lockness:mfrom
sridhar-panigrahi wants to merge 1 commit intoLFDT-Lockness:mfrom
Conversation
Contributor
Author
Adds `hash_commitment` module implementing F_com: a statistically hiding, computationally binding commitment scheme generic over any `digest::Digest` and any `udigest::Digestable` message type. The scheme commits as `H(domain_tag || nonce || msg)` where the nonce is 32 bytes of fresh randomness. Verification is constant-time via `subtle::ConstantTimeEq`. This primitive is required by threshold protocols like DKLs23, where each party commits to its key-share contribution before revealing it, preventing a rushing adversary from biasing the combined public key. Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
9faa776 to
b457f32
Compare
Contributor
|
Hello @sridhar-panigrahi. I don't think this protocol currently has a place in generic-ec. Note that in contribution guidelines we ask all contributors to contact us before doing any work. It's usually a good reflex to talk to the maintainers before engaging into any development, at least to make sure your views are aligned. Currently we're unsure about the direction of generic-ec-zkp, what primitives should be included in it. Maybe in the future we will revisit the idea of this patch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey Denis and
Maurges,
This adds a hash_commitment module to generic-ec-zkp — a statistically
hiding, computationally binding commitment scheme generic over any
Digest and Digestable message type.
The scheme computes H(domain_tag || nonce || msg) where the 32-byte
nonce is sampled fresh each time. Verification uses
subtle::ConstantTimeEq throughout. It fits naturally alongside the
existing Schnorr PoK and dlog-equality proofs in the crate.
The immediate motivation is threshold protocols like DKLs23, where each
party needs to commit to its key-share contribution before the reveal
round — without it a rushing adversary can bias the combined key. The
primitive is generic enough to be useful anywhere a commit-reveal round
appears.
Happy to adjust the API shape or feature gating based on your
preferences.