ZkpSharp 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ZkpSharp --version 1.0.0
                    
NuGet\Install-Package ZkpSharp -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ZkpSharp" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZkpSharp" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ZkpSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ZkpSharp --version 1.0.0
                    
#r "nuget: ZkpSharp, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ZkpSharp@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ZkpSharp&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ZkpSharp&version=1.0.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last Updated
1.3.2 667 12/3/2025
1.3.1 658 12/3/2025
1.3.0 1,243 12/3/2025 1.3.0 is deprecated because it has critical bugs.
1.1.1 192 1/2/2025
1.1.0 155 1/2/2025
1.0.0 161 1/2/2025