Pbkdf2Mb 0.2.1
dotnet add package Pbkdf2Mb --version 0.2.1
NuGet\Install-Package Pbkdf2Mb -Version 0.2.1
<PackageReference Include="Pbkdf2Mb" Version="0.2.1" />
<PackageVersion Include="Pbkdf2Mb" Version="0.2.1" />
<PackageReference Include="Pbkdf2Mb" />
paket add Pbkdf2Mb --version 0.2.1
#r "nuget: Pbkdf2Mb, 0.2.1"
#:package Pbkdf2Mb@0.2.1
#addin nuget:?package=Pbkdf2Mb&version=0.2.1
#tool nuget:?package=Pbkdf2Mb&version=0.2.1
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-emptysaltfor 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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
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 |