Enigma.Core 1.1.0

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

Enigma.Core

NuGet License: MIT

A modern, service- and factory-oriented .NET cryptography library built on BouncyCastle. Every algorithm is exposed through the same small pattern — create a factory, ask it for the service you need, call the operation — and the factory interfaces register cleanly in any dependency-injection container. BouncyCastle powers the implementations but never leaks onto the public surface.

What's new in 1.1 — now built on BouncyCastle 2.7.0; the public API and its behaviour are unchanged, and ML-KEM/ML-DSA encodings stay byte-compatible with 1.0.0. See RELEASENOTES.md for the full details.

Features

  • Block ciphers — AES, DES, 3DES, Blowfish, Twofish, Serpent, Camellia, CAST5, IDEA, SEED, ARIA, and SM4, in ECB / CBC / CTR / GCM modes (GCM with additional authenticated data).
  • Stream ciphers — ChaCha20, ChaCha20-RFC7539, and Salsa20.
  • Padding — None, PKCS#7, ISO 7816-4, ISO 10126-2, and ANSI X9.23.
  • Public-key (RSA) — key generation with PEM import/export (optionally AES-256-CBC-encrypted private keys), PKCS#1 v1.5 and OAEP encryption, and RSASSA-PKCS1-v1_5 signing/verification.
  • Post-quantum (PQC) — ML-KEM 512/768/1024 (FIPS 203) key encapsulation and ML-DSA 44/65/87 (FIPS 204) signatures.
  • X.509 certificates — self-signed generation, CSR creation & verification, CA issuance, chain validation, CRL-based revocation checks, PKCS#12 and DER import/export, and certificate inspection (including thumbprint).
  • Hashing — MD5, SHA-1, SHA-256, SHA-512, and SHA-3.
  • HMAC — HMAC-SHA1, HMAC-SHA256, and HMAC-SHA512.
  • One-time passwords — HOTP (RFC 4226), TOTP (RFC 6238), and otpauth:// provisioning URIs.
  • Key derivation — PBKDF2 (four PRFs) and Argon2 (Argon2d/i/id).
  • Encoding — Base64, Base32 (RFC 4648), and hexadecimal.

Asynchronous, cancellable, observable

The streaming operations — block and stream ciphers, hashing, and HMAC — expose async APIs that accept an IProgress<int> for progress reporting and a CancellationToken for cancellation, so large-payload work stays responsive.

Installation

dotnet add package Enigma.Core

Targets .NET Standard 2.0, .NET 8.0, and .NET 10.0; built on BouncyCastle 2.7.0.

Quick start

Every category follows the same three steps — create a factory, get a service, call the operation:

using System;
using System.IO;
using System.Text;
using Enigma.Core.Hashing.Hash;

IHashServiceFactory hashFactory = new HashServiceFactory();
IHashService sha256 = hashFactory.CreateSha256Service();

using var input = new MemoryStream(Encoding.UTF8.GetBytes("The quick brown fox"));
byte[] digest = await sha256.ComputeHashAsync(input);

string hex = BitConverter.ToString(digest).Replace("-", "").ToLowerInvariant();

Documentation

Per-category guides — each with the supported algorithms, the key services and factories, and copy-pasteable C# samples verified against the public API — live under docs/guides/ in the repository, indexed by docs/guides/README.md. They cover block ciphers, stream ciphers, padding, hashing, HMAC, key derivation, encoding, OTP, public-key (RSA), post-quantum cryptography, X.509 certificates, the extension methods, and the utility helpers.

License

Enigma.Core is released under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 Enigma.Core:

Package Downloads
Enigma.DataEncryption

Stream-based authenticated encryption for .NET, built on Enigma.Core. Encrypts data and streams into a self-describing binary container whose header is authenticated as AEAD associated data and carries a key-confirmation tag for fast, uniform wrong-credential detection. Key establishment by PBKDF2 or Argon2id password derivation, RSAES-OAEP key transport under a selectable padding hash (SHA-256/384/512), post-quantum ML-KEM (512/768/1024) key encapsulation, or a true RSA + ML-KEM hybrid that combines a secret transported under each primitive so the container survives a break of either one; payloads encrypted with AES-256, Twofish-256, Serpent-256 or Camellia-256 in GCM. Every operation is async with optional progress reporting and cancellation, headers can be inspected without decrypting, and one registration call wires the services into Microsoft.Extensions.DependencyInjection.

Enigma.Avalonia.Desktop

Enigma.Avalonia.Desktop is a control library for Avalonia 12 desktop applications. It ships a navigation shell, a docking host, a ribbon, fourteen typed editors covering text, every built-in numeric type and byte arrays as raw, Base64 or hexadecimal text, a content dialog, an overlay and an info bar each driven by its own service, settings cards, file and folder picker services, the CollectionView data subsystem for sorting, filtering and grouping, and one Fluent theme dictionary with Dark and Light variants that styles the whole set.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 54 8/1/2026
1.0.0 90 7/24/2026

Dependency release: Enigma.Core now builds on BouncyCastle.Cryptography 2.7.0 (up from 2.6.2), which raises the minimum BouncyCastle version — consumers pinned to 2.6.x must upgrade. The public API and its behaviour are unchanged, and ML-KEM/ML-DSA key, ciphertext and signature encodings are identical, so material persisted by 1.0.0 keeps working. Still targets netstandard2.0/net8.0/net10.0. See RELEASENOTES.md for the full details.