CanDoItAll.Ledger.Cryptography 0.1.18

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

CanDoItAll.Ledger.Cryptography

Canonical hashing, address derivation, signatures, key vaults, and platform-neutral cryptographic drivers for CanDoItAll Ledger.

Use this package when a .NET host needs to create account keys, derive Ledger addresses, sign or verify payloads, hash canonical transactions, encrypt account vaults, or compose supported signature providers.

Requirements

  • .NET 10

Install

dotnet add package CanDoItAll.Ledger.Cryptography

Create And Verify An Account Signature

using System.Security.Cryptography;
using System.Text;
using CanDoItAll.Ledger.Cryptography;

var crypto = new DotNetLedgerCryptoDriver();
EcdsaP256KeyPair keys =
    await crypto.CreateEcdsaP256KeyPairAsync();

var address = await LedgerAddressCodec.FromPublicKeyAsync(
    keys.PublicKeyMaterial,
    crypto);

byte[] payload = Encoding.UTF8.GetBytes("expense-approval");
try
{
    byte[] signature = await crypto.SignEcdsaP256Sha256Async(
        payload,
        keys.PrivateKeyMaterial);

    bool valid = await crypto.VerifyEcdsaP256Sha256Async(
        payload,
        signature,
        keys.PublicKeyMaterial);
}
finally
{
    CryptographicOperations.ZeroMemory(keys.PrivateKeyMaterial);
}

The package has no broad service-registration extension. Compose DotNetLedgerCryptoDriver, DefaultTransactionCanonicalizer, TransactionHasher, SignaturePayloadBuilder, and SignatureProviderRegistry directly, or use the registrations supplied by CanDoItAll.Ledger.Sdk.

Algorithm And Runtime Notes

  • Account vault creation currently uses ECDSA P-256 account keys.
  • SignatureProviderRegistry.CreateDefault() includes ECDSA P-256 plus VEF, ML-DSA, and SLH-DSA provider entries. Availability depends on the runtime and adapters; a registered entry is not a guarantee that the algorithm is usable.
  • VEF secp256k1 requires an IVefSecp256K1SignatureAdapter.
  • Use PqcAvailabilityProbe before selecting post-quantum algorithms.
  • Browser applications should use CanDoItAll.Ledger.Cryptography.Browser.

Security Notes

  • Never log private keys, derived secrets, backup passwords, or decrypted vault contents.
  • Clear mutable private-key buffers when the operation is complete and keep their lifetime as short as possible.
  • InMemoryAccountVaultStore is disposable and not a durable custody system.
  • Generate transaction IDs with DefaultTransactionCanonicalizer and TransactionHasher; ad hoc JSON hashing is not protocol-compatible.
  • Key generation and verification do not replace host authorization or transaction-policy validation.

See the cryptography architecture and full source.

This package is part of the CanDoItAll ecosystem and uses the repository's MIT License.

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 (5)

Showing the top 5 NuGet packages that depend on CanDoItAll.Ledger.Cryptography:

Package Downloads
CanDoItAll.Ledger.Engine

Deterministic validation and execution pipeline for CanDoItAll Ledger transactions.

CanDoItAll.Ledger.BusinessObjects

Account, business-object, rule, commerce, secure-messaging, and transaction-building services for CanDoItAll Ledger.

CanDoItAll.Ledger.Components

Reusable Blazor components and workspaces for ledger accounts, transactions, business objects, analytics, and node operations.

CanDoItAll.Ledger.Sdk

Typed node client and dependency-injection integration for CanDoItAll Ledger account and transaction workflows.

CanDoItAll.Ledger.Cryptography.Browser

Web Crypto and IndexedDB implementations for browser-based CanDoItAll Ledger accounts.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.18 0 7/31/2026
0.1.17 40 7/30/2026