ZkpSharp 1.0.0
See the version list below for details.
dotnet add package ZkpSharp --version 1.0.0
NuGet\Install-Package ZkpSharp -Version 1.0.0
<PackageReference Include="ZkpSharp" Version="1.0.0" />
<PackageVersion Include="ZkpSharp" Version="1.0.0" />
<PackageReference Include="ZkpSharp" />
paket add ZkpSharp --version 1.0.0
#r "nuget: ZkpSharp, 1.0.0"
#:package ZkpSharp@1.0.0
#addin nuget:?package=ZkpSharp&version=1.0.0
#tool nuget:?package=ZkpSharp&version=1.0.0
ZkpSharp
ZkpSharp is a .NET library for implementing Zero-Knowledge Proofs (ZKP). This library allows you to securely prove certain information (such as age or balance) without revealing the actual data. It uses cryptographic hashes and salts to ensure privacy and security.
Features
- Proof of Age: Prove that your age is above a certain threshold without revealing your actual birthdate.
- Proof of Balance: Prove that you have sufficient balance to make a transaction without revealing your full balance.
- Secure Hashing: Uses SHA-256 hashing combined with a random salt to ensure secure and non-reversible proofs.
Installation
You can install ZkpSharp via NuGet. Run the following command in your project directory:
dotnet add package ZkpSharp
Usage
Proof of Age
You can prove that you are over a certain age (e.g., 18 years old) without revealing your birthdate.
Example:
using ZkpSharp;
using System;
class Program
{
static void Main()
{
var zkp = new ZKP();
var dateOfBirth = new DateTime(2000, 1, 1); // The user's date of birth
// Generate proof of age
var (proof, salt) = zkp.ProveAge(dateOfBirth);
// Verify the proof of age
bool isValid = zkp.VerifyAge(proof, dateOfBirth, salt);
Console.WriteLine($"Age proof valid: {isValid}");
}
}
Proof of Balance
You can prove that you have enough balance to make a transaction without revealing your actual balance.
Example:
using ZkpSharp;
class Program
{
static void Main()
{
var zkp = new ZKP();
double balance = 1000.0; // The user's balance
double requestedAmount = 500.0; // The amount the user wants to prove they can pay
// Generate proof of balance
var (proof, salt) = zkp.ProveBalance(balance, requestedAmount);
// Verify the proof of balance
bool isValidBalance = zkp.VerifyBalance(proof, requestedAmount, salt, balance);
Console.WriteLine($"Balance proof valid: {isValidBalance}");
}
}
Contributing
We welcome contributions! To contribute: 1. Fork the repository. 2. Create a new branch for your changes (git checkout -b feature/your-feature). 3. Commit your changes (git commit -m 'Add new feature'). 4. Push to your branch (git push origin feature/your-feature). 5. Create a pull request.
Please ensure that your code passes all tests and adheres to the code style of the project.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Roadmap
• Add more proof types (e.g., Proof of Identity, Proof of Transaction History).
• Improve performance and scalability for large datasets.
• Enhance security features (e.g., multi-factor authentication for proofs).
Contact
For questions, issues, or suggestions, feel free to open an issue or contact Azimbek Sagynbaev at [sagynbaev6@gmail.com].
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.