IZkProofSystem
Interfaces · AiDotNet.FederatedLearning.Verification
Defines the abstract interface for a zero-knowledge proof backend.
Known implementations: HashCommitmentScheme<T>, PedersenCommitment<T>
For Beginners
A ZK proof system provides the low-level cryptographic operations for generating and verifying proofs. Different backends have different tradeoffs:
Properties
| Property | Summary |
|---|---|
string Name { get; } |
Gets the name of this proof system. |
Methods
| Method | Summary |
|---|---|
ValueTuple<byte[], byte[]> Commit(byte[] value) |
Commits to a value using the proof system’s commitment scheme. |
bool VerifyOpening(byte[] commitment, byte[] value, byte[] randomness) |
Verifies a commitment opening: checks that the value was indeed committed. |
bool VerifyRangeProof(byte[] proof, byte[] upperBound, byte[] commitment) |
Verifies a range proof: checks that the committed value is in [0, upperBound]. |
byte[] GenerateRangeProof(byte[] value, byte[] upperBound, byte[] commitment, byte[] randomness) |
Generates a range proof: proves value is in [0, upperBound]. |