Xio.Crypto 1.0.8

dotnet add package Xio.Crypto --version 1.0.8
                    
NuGet\Install-Package Xio.Crypto -Version 1.0.8
                    
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="Xio.Crypto" Version="1.0.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Xio.Crypto" Version="1.0.8" />
                    
Directory.Packages.props
<PackageReference Include="Xio.Crypto" />
                    
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 Xio.Crypto --version 1.0.8
                    
#r "nuget: Xio.Crypto, 1.0.8"
                    
#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 Xio.Crypto@1.0.8
                    
#: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=Xio.Crypto&version=1.0.8
                    
Install as a Cake Addin
#tool nuget:?package=Xio.Crypto&version=1.0.8
                    
Install as a Cake Tool

Xio.Crypto

Cryptographic primitives for the XIO distributed naming system: BLAKE3 and SHA-256 hashing, Ed25519 signing and verification, and Sparse Merkle Tree proof verification. The library implements none of these algorithms itself; it wraps Blake3 for BLAKE3, the .NET runtime for SHA-256, and NSec.Cryptography for Ed25519 behind a small, testable service surface.

Install

dotnet add package Xio.Crypto

Register

using Xio.Crypto;

services.AddXioCrypto();

This registers IHashService, ISignatureService, IProofVerificationService, the IXioCryptoService facade, and ICryptoUtilities.

Hashing

IHashService computes and verifies BLAKE3 (primary, internal) and SHA-256 (interop) hashes, from either a byte buffer or a stream:

public sealed class Example(IHashService hashService)
{
    public async Task<byte[]> Blake3Async(ReadOnlyMemory<byte> data)
    {
        var response = await hashService.ComputeBlake3HashAsync(new XioComputeHashRequest(data));
        return response.Hash.ToArray();
    }

    public async Task<bool> VerifyAsync(ReadOnlyMemory<byte> data, ReadOnlyMemory<byte> expected)
    {
        var request = new XioVerifyHashRequest(data, expected);
        var response = await hashService.VerifyBlake3HashAsync(request);
        return response.IsValid;
    }
}

Signatures

ISignatureService generates Ed25519 key pairs and signs or verifies data over the raw message bytes:

public sealed class SigningExample(ISignatureService signatureService)
{
    public async Task<byte[]> SignAsync(ReadOnlyMemory<byte> privateKey, ReadOnlyMemory<byte> data)
    {
        var request = new XioSignDataRequest(privateKey, data);
        var response = await signatureService.SignDataAsync(request);
        return response.Signature.ToArray();
    }

    public async Task<bool> VerifyAsync(
        ReadOnlyMemory<byte> publicKey, ReadOnlyMemory<byte> data, ReadOnlyMemory<byte> signature)
    {
        var request = new XioVerifySignatureRequest(publicKey, data, signature);
        var response = await signatureService.VerifySignatureAsync(request);
        return response.IsValid;
    }
}

IProofVerificationService verifies Sparse Merkle Tree inclusion and exclusion proofs over BLAKE3-hashed trees; see IXioCryptoService for the unified facade covering all three domains.

Dependencies

Delegates to Blake3, Microsoft.Extensions.DependencyInjection.Abstractions / Microsoft.Extensions.Logging.Abstractions, and NSec.Cryptography; SHA-256 comes from the .NET runtime itself.

License

Licensed under the XI Objects Binary License. You may use, copy and redistribute the package unmodified; modification is not permitted. Installing the package requires accepting the license. See LICENSE.txt for the full terms.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Xio.Crypto:

Package Downloads
Xio.Parallax.Common

The PX Frame wire format for XI Parallax: the frame container, its chain rules, and one encode, decode and validate library shared by the Parallax client, the harness and REST.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.8 64 9/26/2026