NBip32Fast 1.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package NBip32Fast --version 1.0.4                
NuGet\Install-Package NBip32Fast -Version 1.0.4                
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="NBip32Fast" Version="1.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NBip32Fast --version 1.0.4                
#r "nuget: NBip32Fast, 1.0.4"                
#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.
// Install NBip32Fast as a Cake Addin
#addin nuget:?package=NBip32Fast&version=1.0.4

// Install NBip32Fast as a Cake Tool
#tool nuget:?package=NBip32Fast&version=1.0.4                

NuGet

NBip32Fast

High perfomance BIP-32 HD key derivation library for .NET 8

Usage

Basic

var secp256k1Key = NBip32Fast.Derivation.Secp256K1.DerivePath("m/44'/0'/0'/0/0", seed).Key;
var ed25519Key = NBip32Fast.Derivation.Ed25519.DerivePath("m/44'/0'/0'/0'/0'", seed).Key;
var nistP256Key = NBip32Fast.Derivation.NistP256.DerivePath("m/44'/0'/0'/0'/0'", seed).Key;

Optimised

var master = Derivation.Ed25519.DerivePath("m/44'/888'/0'/0", seed);
var accounts = new List<byte[]>();

for (var i = 0u; i < 5u; i++)
{
    accounts.Add(Derivation.Ed25519.GetPublic(Derivation.Ed25519.Derive(master, new KeyPathElement(i, true)).Key));
}

Benchmarks

SecP256K1

Method Mean Error StdDev
NBitcoinKey 681.74 us 5.098 us 4.519 us
NBip39FastKey 56.36 us 0.409 us 0.382 us
NetezosKey 957.96 us 5.120 us 3.998 us

Ed25519

Method Mean Error StdDev
P3HdKey 9.413 us 0.0886 us 0.0829 us
NBip32FastKey 6.944 us 0.0498 us 0.0442 us
NetezosKey 8.934 us 0.1022 us 0.0956 us

NistP256

Method Mean Error StdDev
NBip39FastKey 239.8 us 1.09 us 0.96 us
NetezosKey 2,183.8 us 29.81 us 27.88 us

Benchmark code

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

NuGet packages (4)

Showing the top 4 NuGet packages that depend on NBip32Fast:

Package Downloads
NBip32Fast.Secp256K1

Blazing fast SecP256k1 bip-32 keypath derivation subpackage

NBip32Fast.Ed25519

Blazing fast Ed25519 bip-32 keypath derivation subpackage

NBip32Fast.NistP256

Blazing fast NistP256 (SecP256r1) bip-32 keypath derivation subpackage

DotNut

A full C# native implementation of the Cashu protocol

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.3 83 11/24/2024
2.0.2 74 11/14/2024
2.0.0 76 11/13/2024
1.0.7 147 4/11/2024
1.0.5 193 2/27/2024
1.0.4 358 2/3/2024
1.0.3 89 1/19/2024
1.0.1 78 1/17/2024
1.0.0 74 1/17/2024