Lumoin.Base.Libsodium
0.0.14
dotnet add package Lumoin.Base.Libsodium --version 0.0.14
NuGet\Install-Package Lumoin.Base.Libsodium -Version 0.0.14
<PackageReference Include="Lumoin.Base.Libsodium" Version="0.0.14" />
<PackageVersion Include="Lumoin.Base.Libsodium" Version="0.0.14" />
<PackageReference Include="Lumoin.Base.Libsodium" />
paket add Lumoin.Base.Libsodium --version 0.0.14
#r "nuget: Lumoin.Base.Libsodium, 0.0.14"
#:package Lumoin.Base.Libsodium@0.0.14
#addin nuget:?package=Lumoin.Base.Libsodium&version=0.0.14
#tool nuget:?package=Lumoin.Base.Libsodium&version=0.0.14
<img style="display: block; margin-inline-start: auto; margin-inline-end: auto;" src="resources/lumoin-base-github-logo.svg" width="600" alt="Lumoin.Base project logo: a circular emblem of concentric dashed arcs in blue hues evoking layered bedrock, followed by the wordmark 'base'.">
Lumoin.Base
Dependency-free primitives shared across the Lumoin family of .NET libraries.
Lumoin.Base holds the small set of primitives that every Lumoin library needs and none of them should own. It is dependency-free and AOT-, trim-, and browser-clean, so any family member — including browser/WASM builds — can consume it, and no member depends on another.
The repository ships three packages. Lumoin.Base is the dependency-free leaf: BaseMemoryPool,
an exact-size, zero-on-return MemoryPool<byte> whose caller chooses how each buffer is backed
(Managed, Pinned, or Native), and Tag, an immutable type-keyed metadata container. The
native tier is an injection seam (NativeBackingAllocator), never a compiled-in dependency.
Lumoin.Base.MemoryProtection implements that seam without libsodium: page-aligned allocations
locked into physical memory through the operating system's own mechanism (VirtualLock on
Windows, mlock plus best-effort MADV_DONTDUMP on Linux/Android, mlock on Apple platforms
and FreeBSD), zeroed on free — pure P/Invoke into libraries every supported OS already ships
(glibc and musl alike), so it carries no native assets at all.
Lumoin.Base.Libsodium is the libsodium package: a raw crypto binding — Ed25519 seed-keypair
generation, detached signing and verification, Ed25519-to-X25519 key conversion, X25519 scalar
multiplication, XChaCha20-Poly1305 authenticated encryption, and the ML-KEM-768 (FIPS 203) and
X-Wing hybrid post-quantum KEMs, with secret-key scratch composed by the caller as a
MemoryPool<byte> — plus the libsodium implementation of the memory seam: SodiumBacking.Allocate
serves AllocationKind.Native rents as per-rent isolated sodium_malloc guarded allocations
(canary, guard pages, best-effort locking, zero on free; not available in the browser, and marked
so). The libsodium 1.0.22 native library ships inside the package, built by this repository's CI
from the pinned, checksum-verified upstream source, so the package works as-is from NuGet; the
package ships the browser-wasm static archive the same way, and its buildTransitive targets link
it into dotnet.wasm at publish — the consuming app needs the wasm-tools workload.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. net11.0-ios26.5 is compatible. net11.0-maccatalyst26.5 is compatible. |
-
net11.0
- Lumoin.Base (>= 0.0.14)
-
net11.0-ios26.5
- Lumoin.Base (>= 0.0.14)
-
net11.0-maccatalyst26.5
- Lumoin.Base (>= 0.0.14)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
See full changelog at https://github.com/Lumoin/Lumoin.Base/blob/main/CHANGELOG.md.