Keysmith.Net.Secp256k1 2.0.0

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

Keysmith.Net

Modern .NET10 library implementing common cryptographic standards used by various cryptocurrencies like BIP32/SLIP10, BIP39 and BIP44.

The intention of this library is to provide minimal no boilerplate implemenations of these cryptographic primitives while maintaining the best possible performance using the latest language features.

Installation

Base Package: Keysmith.Net

The base package is always required.

Optional curve packages:

Installing a curve package will provide a singleton instance of that specific curve to be used in SLIP10 derivations.

Keysmith.Net.Secp256k1

Uses Secp256k1.Net behind the scenes, which ships prebuilt binaries of the secp256k1 c library for Windows, Linux (glibc & musl) and macOS.

Keysmith.Net.ED25519

Uses libsodium behind the scenes for curve math which is ISC licensed.

Features

BIP39

Converts mnemonic words to the seed used for deriving private keys.

Only supports the english wordlist.

Usage
byte[] seed = BIP39.MnemonicToSeed("[mnemonics]");
//Or using spans
Span<byte> seed = stackalloc byte[64]; 
if(!BIP39.TryMnemonicToSeed(seed, "[mnemonics]"))
{
    // Destination is not 64 bytes, mnemonic is empty or passphrase is null
}
Performance

<img src="./img/bip39_bench.png" />

BIP32/SLIP10

Takes the seed calculated using BIP39 and derives the master private key and child keys using BIP44 derivation paths.

Usage
(byte[] key, byte[] chainCode) = Slip10.DerivePath(
    Secp256k1.Instance,
    seed,
    "m/44'/60'/0'/0/0"
);
//Or using spans
Span<byte> key = stackalloc byte[32];
Span<byte> chainCode = stackalloc byte[32];
if(!Slip10.TryDerivePath(
    Secp256k1.Instance,
    seed,
    key,
    chainCode,
    "m/44'/60'/0'/0/0"
))
{
    // key or chainCode is not 32 bytes, they overlap, the path is invalid, or the path is not supported by the curve
}
Performance

<img src="./img/slip10_bench.png" />

BIP44

Defines the format for derivation paths used for Bitcoin and a lot of other chains following the same spec.

This library defines helper methods to construct these paths to be used for BIP32 derivation.

Usage
string path = BIP44.Ethereum(5);
//     ^ "m/44'/60'/0'/0/5"
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 (2)

Showing the top 2 NuGet packages that depend on Keysmith.Net.Secp256k1:

Package Downloads
EtherSharp

Package Description

Cosm.Net

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 247 11/28/2026
1.3.4 5,189 2/12/2026
1.3.3 763 1/16/2026
1.3.2 173 1/10/2026
1.3.1 2,728 3/25/2025
1.3.0 5,137 12/23/2024
1.2.2 264 11/21/2024
1.2.1 244 11/21/2024
1.2.0 259 11/21/2024
1.1.2 230 11/21/2024
1.1.1 229 11/21/2024
1.1.0 255 11/21/2024
1.0.1 258 11/18/2024
1.0.0 237 11/18/2024
0.5.0 284 11/18/2024
0.4.0 239 11/18/2024
0.3.0 237 11/18/2024