Pbkdf2Mb 0.2.1

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

Pbkdf2Mb

Fast BIP-39 seed derivation (PBKDF2-HMAC-SHA512, salt "mnemonic", 2048 iterations, 64-byte seed) with native multi-buffer SIMD (AVX-512 / AVX2 / SSE2, runtime-dispatched) and an internal pinned worker pool: one call derives a whole batch across all cores. Bit-exact with Rfc2898DeriveBytes.Pbkdf2, ~4× faster per core, and ~2.6× the throughput of managed Parallel.ForEach over the same kernel.

Native libraries for linux-x64 and win-x64 are bundled and resolved automatically — no setup call, no manual file copying.

using Pbkdf2Mb;

// Pack mnemonics once into a contiguous blob + spans (reuse the buffers).
var (blob, spans) = Pbkdf2.PackMnemonics(mnemonics);     // string[] -> blob + spans

// One native call derives every seed on all cores; threads are pinned internally.
var seeds = new byte[spans.Length * 64];
Pbkdf2.DeriveSeeds(blob, spans, seeds);                  // salt "mnemonic", 2048, 64
// seed i is seeds[i*64 .. (i+1)*64)   (written in place, zero-copy)
  • DeriveSeeds(...)Span-based, zero-copy, zero-alloc, one call for the whole batch. Pass a non-empty salt for a shared "mnemonic"+passphrase; threads: 0 (default) uses all cores.
  • PackMnemonics(...) — jagged UTF-8 mnemonics → one blob + spans (do this once).
  • Pbkdf2.Calibrate() / Pbkdf2.ForceBackend(...) — per-host tuning / pin a backend.
  • Pbkdf2.ActiveBackend, NameOf(...), IsAvailable(...) — introspection.
  • Pbkdf2.PoolShutdown() — release the pinned pool (optional; recreated on next use).

All parallelism and core-pinning live in native code, so there is no managed thread pool and no per-item marshalling. x86-64 only.

License: CC0-1.0 (public domain).

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net11.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
0.2.1 98 7/9/2026