EricksonLopez.Security
dotnet-security · Multi-Tenancy & Security
On this page (20 sections)
1. Identity, Tier & Maturity Profile#
2. Value Proposition & Problem Solved#
High-performance, Native AOT-first cryptographic foundation, multi-version key lifecycle manager, password security engine, and Zero Trust authorization ecosystem for modern .NET.
Legacy crypto setups risk padding-oracle modes, fragile single-key rotation, and timing side-channel vulnerabilities when comparing secrets or signatures.
3. Quick Install#
Primary package: EricksonLopez.Security
dotnet add package EricksonLopez.Security --version 1.0.0<PackageReference Include="EricksonLopez.Security" Version="1.0.0" /><PackageVersion Include="EricksonLopez.Security" Version="1.0.0" />4. Verified Ecosystem Metrics#
Snapshot retrieved UTC: 2026-12-01
5. When to Use & When Not to Use#
When to use
- You need AEAD encryption (AES-256-GCM, ChaCha20-Poly1305), multi-version key rotation, Argon2/PBKDF2 passwords, Shamir Secret Sharing, MFA/FIDO2, or Zero Trust ABAC.
When NOT to use
- You only need ASP.NET Core standard cookie/JWT middleware without envelope encryption, KMS rotation, or ABAC policy evaluation.
6. Core Capabilities & Design Invariants#
AEAD, Key Lifecycle & KMS Backends
Versioned SecurityEnvelope, constant-time comparisons, plus AWS KMS, Azure Key Vault, Google Cloud KMS, and tmpfs secret providers.
Zero Trust ABAC, MFA & FIDO2
NIST SP 800-162 ABAC policy evaluation, TOTP replay defense, WebAuthn/FIDO2, and Mediator authorization behaviors.
7. Included NuGet Packages & Adapters#
| Package ID | Status | NuGet / Local | TFMs | AOT Status | Downloads | Description |
|---|---|---|---|---|---|---|
| EricksonLopez.SecurityPrimary | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 282 | Enterprise-grade security engine, AEAD authenticated encryption (AES-GCM), multi-version key management, PBKDF2/Argon2 password security, token hashing, and secrets protection for the EricksonLopez.Security framework. |
| EricksonLopez.Security.Network | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 673 | Enterprise-grade Server-Side Request Forgery (SSRF) prevention and safe HTTP client handlers for .NET. Protects against RFC 1918 private IPs, loopbacks, link-local, cloud metadata endpoints, and DNS rebinding attacks. |
| EricksonLopez.Security.Abstractions | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 384 | Core security abstractions, cryptographic ports, key lifecycle contracts, password hashing interfaces, token primitives, and secure error models for the EricksonLopez.Security ecosystem. |
| EricksonLopez.Security.Cryptography | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 238 | Core cryptography primitives for EricksonLopez.Security ecosystem, providing Native AOT-compatible and zero-allocation implementations using built-in System.Security.Cryptography APIs. |
| EricksonLopez.Security.Cryptography.XmlDSig | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Incompatible | 216 | Canonical W3C XML Digital Signature (XMLDSig) and X.509 certificate verification engine for .NET. Supports enveloped signatures, RSA-SHA256, C14N canonicalization, and fiscal compliance standards (e-CF / DGII). |
| EricksonLopez.Security.Pki | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 212 | Public Key Infrastructure (PKI) certificate validation engine for .NET. Supports CRL caching, OCSP validation, custom trust anchors, and certificate chain verification with Native AOT compatibility. |
| EricksonLopez.Security.Cryptography.Pkcs11 | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 211 | Native AOT compatible PKCS#11 integration for EricksonLopez.Security ecosystem, providing hardware security module (HSM) bridging via direct unmanaged P/Invoke bindings. |
| EricksonLopez.Security.GoogleCloud | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Incompatible | 179 | Google Cloud KMS (including Cloud HSM) and Secret Manager key store and secret store adapters for EricksonLopez.Security. |
| EricksonLopez.Security.WebAuthn.Fido2 | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 177 | Enterprise-grade W3C WebAuthn Level 2/3 and FIDO2 passkey engine with CBOR/COSE parsing, attestation/assertion verification, replay protection, and zero-allocation cryptographic checks with Native AOT compatibility. |
| EricksonLopez.Security.Aws | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 176 | AWS KMS key store and Secrets Manager secret store adapters for EricksonLopez.Security. |
| EricksonLopez.Security.Azure | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 158 | Azure Key Vault key store and secret store adapters for EricksonLopez.Security. |
| EricksonLopez.Security.HashiCorpVault | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 154 | HashiCorp Vault Transit and KV v2 key store and secret store adapters for EricksonLopez.Security. |
| EricksonLopez.Security.Saml2 | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Incompatible | 148 | Enterprise-grade SAML 2.0 Web Browser Single Sign-On (SSO) engine with comprehensive XML Signature Wrapping (XSW 1..8) defense, XMLDSig validation, assertion decryption, and ClaimsPrincipal mapping. |
| EricksonLopez.Security.Privacy.Hibp | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 145 | Enterprise-grade Have I Been Pwned (HIBP) k-Anonymity range search client with traffic padding protection (Add-Padding: true) and breached password validator for .NET. |
| EricksonLopez.Security.AspNetCore | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 144 | ASP.NET Core integration for EricksonLopez.Security providing security headers, API key middleware, token extractors, and request security context. |
| EricksonLopez.Security.OpenTelemetry | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Incompatible | 144 | Optional OpenTelemetry instrumentation satellite for EricksonLopez.Security. Provides automatic ActivitySource registration, metrics (Meter), and semantic conventions for encrypt/decrypt, password hashing, key lifecycle, and API key validation operations. |
| EricksonLopez.Security.Testing | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 135 | Testing utilities, deterministic cryptographic doubles, fake key stores, and test assertions for EricksonLopez.Security. |
| EricksonLopez.Security.Mfa | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 130 | Enterprise-grade Multi-Factor Authentication (MFA) engine implementing RFC 6238 TOTP, RFC 4226 HOTP, Base32 encoding, authenticator URI generation, and emergency recovery codes with Native AOT compatibility. |
| EricksonLopez.Security.WebAuthn.Fido2.Mds3 | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 130 | FIDO Alliance Metadata Service v3 (MDS3) integration satellite for EricksonLopez.Security.WebAuthn.Fido2. Provides authenticator manufacturer validation, AAGUID lookup, and attestation certificate chain verification against the FIDO Alliance trust anchor. |
| EricksonLopez.Security.ZeroTrust | Published | v1.0.0 / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 130 | Enterprise-grade Zero-Trust Attribute-Based Access Control (ABAC) policy evaluation engine for .NET. High-throughput in-memory evaluation, hierarchical combining algorithms (Deny-Overrides, Permit-Overrides), and Native AOT support. |
| EricksonLopez.Security.AnalyzersAnalyzer / Generator | Published | v1.0.0 / v2.2.0 | netstandard2.0 | AOT: N/A (Analyzer/Legacy) | 144 | Roslyn diagnostic analyzers for EricksonLopez.Security. Catches common security misuse patterns at compile time: non-constant-time token comparison, undisposed SecretBuffer, insecure algorithm selection, and more. |
| EricksonLopez.Security.Mediator | Unpublished | — / v2.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 0 | Zero-Trust multi-plane CQRS authorization pipeline behaviors, NIST SP 800-63B AAL enforcement, and cross-tenant spoofing guards for EricksonLopez.Mediator. |
8. Quick Start Code Example#
Grounded in verified public APIs from EricksonLopez.Security. Compile with `<ImplicitUsings>disable</ImplicitUsings>` and explicit imports.
using EricksonLopez.Security.Abstractions.Randomness;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddEricksonLopezSecurity();
using var serviceProvider = services.BuildServiceProvider();
ICryptographicRandomNumberGenerator rng =
serviceProvider.GetRequiredService<ICryptographicRandomNumberGenerator>();9. Architecture & Dependency Flow#
Rendering diagram…
flowchart LR lib_security["EricksonLopez.Security (L3)"] lib_result["EricksonLopez.Result (L0)"] lib_security --> lib_result lib_mediator["EricksonLopez.Mediator (L2)"] lib_security -.-> lib_mediator lib_webhooks["EricksonLopez.Webhooks (L3)"] lib_webhooks --> lib_security
View accessible text summary and structure
2 upstream library dependencies and 1 downstream dependent libraries verified in dependencies.json.
| Direction | Library | Tier | Relationship Kinds |
|---|---|---|---|
| Upstream | EricksonLopez.Result | L0 | Adapter, Compile-Time, NuGet Package |
| Upstream | EricksonLopez.Mediator | L2 | Adapter |
| Downstream | EricksonLopez.Webhooks | L3 | Compile-Time, NuGet Package |
flowchart LR
lib_security["EricksonLopez.Security (L3)"]
lib_result["EricksonLopez.Result (L0)"]
lib_security --> lib_result
lib_mediator["EricksonLopez.Mediator (L2)"]
lib_security -.-> lib_mediator
lib_webhooks["EricksonLopez.Webhooks (L3)"]
lib_webhooks --> lib_security10. Target Frameworks & Native AOT / Trimming Matrix#
MSBuild `.csproj` inspection across 22 packages: 17 Full, 0 Partial, 4 Incompatible, 1 NotApplicable (analyzers/generators).
| Package ID | IsAotCompatible | EnableTrimAnalyzer | Verified AOT Status | Target Frameworks |
|---|---|---|---|---|
| EricksonLopez.Security | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Network | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Abstractions | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Cryptography | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Cryptography.XmlDSig | false | false | Incompatible | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Pki | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Cryptography.Pkcs11 | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.GoogleCloud | false | false | Incompatible | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.WebAuthn.Fido2 | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Aws | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Azure | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.HashiCorpVault | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Saml2 | false | false | Incompatible | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Privacy.Hibp | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.AspNetCore | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.OpenTelemetry | false | false | Incompatible | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Testing | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Mfa | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.WebAuthn.Fido2.Mds3 | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.ZeroTrust | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Security.Analyzers | false | false | NotApplicable | netstandard2.0 |
| EricksonLopez.Security.Mediator | true | true | Full | net8.0, net9.0, net10.0 |
11. Upstream Dependencies & Downstream Dependents#
Upstream Dependencies (2)
Downstream Dependents (1)
12. Optional Adapters & Third-Party Integrations#
Internal Adapter Edges & Integration Packages
- EricksonLopez.Security.Mediator→ EricksonLopez.Mediator (EricksonLopez.Mediator)
- EricksonLopez.Security.Mediator→ EricksonLopez.Result (EricksonLopez.Result)
Verified External NuGet Dependencies (16)
13. Configuration & DI Registration Summary#
Verified DI & Configuration Entry Points
TmpfsSecretConfigurationExtensions.AddTmpfsSecretsAdds Docker/Kubernetes tmpfs RAM-backed secret files to `builder`.
KestrelDualPortExtensions.UseHardenedDualPortKestrelApplies Kestrel perimeter hardening and optional dual-port listener separation bound from `configuration`.
IdentityPasswordHasherBridge.AddEricksonLopezIdentityPasswordHasher<TUser>Registers `IdentityPasswordHasherBridge<TUser>` as the `IPasswordHasher<TUser>` implementation.
SecurityMediatorServiceCollectionExtensions.AddZeroTrustMediatorAuthorizationRegisters the open-generic `ZeroTrustAuthorizationBehavior<TRequest, TResponse>` in the service collection.
SecurityMfaServiceCollectionExtensions.AddDistributedTotpReplayStoreOverrides the default in-memory TOTP replay store with a delegate-based distributed store handler.
SecurityMfaServiceCollectionExtensions.AddDistributedTotpReplayStore<TStore>Overrides the default in-memory TOTP replay store with a custom distributed store implementation.
SecurityMfaServiceCollectionExtensions.AddSecurityMfaRegisters the `ITotpService` implementation into the service collection.
SecurityOpenTelemetryExtensions.AddEricksonLopezSecurityInstrumentationSubscribes the EricksonLopez.Security `SecurityMeter` to the OpenTelemetry metrics pipeline.
SecurityPkiServiceCollectionExtensions.AddSecurityPkiRegisters the `ICertificateChainValidator` implementation into the service collection.
HibpServiceCollectionExtensions.AddHaveIBeenPwnedRegisters the Have I Been Pwned k-Anonymity client and password validator.
ISaml2ClaimsMapper.MapToPrincipalMaps a SAML 2.0 assertion into a strongly-typed `ClaimsPrincipal`.
Saml2ClaimsMapper.MapToPrincipalMaps a SAML 2.0 assertion into a strongly-typed `ClaimsPrincipal`.
Key Public Types & Contracts
EricksonLopez.Security.Abstractions.Authorization.IGenerationalPermissionCache (interface)Defines a two-tier (L1 in-memory + L2 distributed epoch-keyed) stampede-protected permission cache with strict fail-closed semantics (`PermissionSnapshot.Deny`) upon backing store or cache outages.
EricksonLopez.Security.Abstractions.Authorization.IPermissionSnapshotSource (interface)Defines the authoritative persistence data source used by `IGenerationalPermissionCache` on L1+L2 cache misses or live delegated session evaluations.
EricksonLopez.Security.Abstractions.Authorization.PermissionScopeKey (record)Identifies the exact multi-plane security scope for resolving and caching a `PermissionSnapshot`.
EricksonLopez.Security.Abstractions.Authorization.PermissionSnapshot (record)Represents an immutable, effective authorization snapshot for a principal within a specific security plane and scope, supporting deterministic permission hashing and fail-closed default denial.
EricksonLopez.Security.Abstractions.Cryptography.AeadAlgorithm (enum)Specifies the Authenticated Encryption with Associated Data (AEAD) algorithm.
EricksonLopez.Security.Abstractions.Cryptography.AuthenticatedContext (struct)Provides a strongly-typed cryptographic context used as Authenticated Associated Data (AAD) in Authenticated Encryption with Associated Data (AEAD) schemes.
EricksonLopez.Security.Abstractions.Cryptography.EncryptedData (record)Encapsulates the output of an AEAD encryption operation: ciphertext, authentication tag, and initialization nonce.
EricksonLopez.Security.Abstractions.Cryptography.IAuthenticatedEncryptionEngine (interface)Defines the contract for high-performance, low-allocation Authenticated Encryption with Associated Data (AEAD) engines.
EricksonLopez.Security.Abstractions.Cryptography.IBlindIndexService (interface)Defines a deterministic blind-indexing contract (HMAC-SHA256 with HKDF-derived subkey) for equality searches over encrypted Personally Identifiable Information (PII).
EricksonLopez.Security.Abstractions.Cryptography.IDigitalSignatureEngine (interface)Defines the contract for high-performance digital signature generation and verification.
EricksonLopez.Security.Abstractions.Cryptography.IEncryptionKeyProvider (interface)Defines the contract for providing cryptographic keys for encryption and decryption operations based on purpose and version.
EricksonLopez.Security.Abstractions.Cryptography.ISecurityEnvelopeSerializer (interface)Defines contracts for serializing and deserializing tamper-resistant binary `SecurityEnvelope` instances.
14. Verified Performance Benchmarks#
All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).
| Suite | Method | Runtime | Mean (ns) | Allocated (B) | Status |
|---|---|---|---|---|---|
| SecurityBenchmarks | SecurityEnvelope Serialize (Span, Zero-Alloc) | .NET 10.0.12 X64 RyuJIT x86-64-v4 | 17.5 | 0 | measured |
| SecurityBenchmarks | SecurityEnvelope Deserialize (Span) | .NET 10.0.12 X64 RyuJIT x86-64-v4 | 35.71 | 472 | measured |
| SecurityBenchmarks | SecretBuffer Allocate & Dispose (ZeroMemory) | .NET 10.0.12 X64 RyuJIT x86-64-v4 | 37.33 | 32 | measured |
| SecurityBenchmarks | ConstantTime FixedTimeEquals (32 bytes) | .NET 10.0.12 X64 RyuJIT x86-64-v4 | 89.38 | 0 | measured |
| SecurityBenchmarks | Token Generation (URL-Safe 32 bytes) | .NET 10.0.12 X64 RyuJIT x86-64-v4 | 122.31 | 388 | measured |
| SecurityBenchmarks | Token Hash (SHA-256) | .NET 10.0.12 X64 RyuJIT x86-64-v4 | 144.28 | 184 | measured |
15. Release History & NuGet vs Repo Status#
Version lag detected: NuGet.org latest published version is v1.0.0, while local repository HEAD is at v2.2.0.
| Version | Source | Published Date | Summary |
|---|---|---|---|
| v1.0.0 ↗ | github | 2026-09-24 | Ecosystem Packages in this release | Package | Version | |---------|---------| | `EricksonLopez.Security.Abstractions` | `1.0.0` | | `EricksonLopez.Security` | `1.0.0` | | `EricksonLopez.Security.Analyzers` | `1.0.0` | | `EricksonLopez.Security.AspNetCore` | `1.0.0` | | `EricksonLopez.Security.Aws` | `1.0.0` | | `EricksonLopez.Security.Azure` | `1.0.0` | | `EricksonLopez.Security.Cryptography` ... |
| v1.0.0 ↗ | nuget | 2026-09-24 | Published EricksonLopez.Security 1.0.0 to NuGet.org. |
16. Complementary & Related Libraries#
Libraries in the same tier, architectural layer, or directly paired via dependency edges.
17. Documentation, API Reference & Portal Links#
Conceptual Documentation (Starlight) →
Extracted XML API Reference →
77 namespaces · 365 types · 2030 members
Ecosystem Dependency Map →
Learning Center & Handbook →
Per-library conceptual Starlight pages expand in M4; API Reference pages expand in M3.2.
18. Source Repository, License & Contributing#
Released under the MIT License. All assemblies follow EricksonLopez.* build invariants: explicit imports, strong-name signing (`EricksonLopez.snk`), and ASCII author metadata (`Erickson Lopez`).
19. Troubleshooting, Pitfalls & Migration Guidance#
- Core cryptography and FIDO2 packages are Full AOT; 4 sub-packages (Cryptography.XmlDSig, GoogleCloud, OpenTelemetry, Saml2) set IsAotCompatible=false.
- Version lag detected: NuGet.org latest published version is v1.0.0, while local repository HEAD is at v2.2.0.
20. Quality & Verification Evidence#
- Strong-Name Signing (`EricksonLopez.snk`)
- EricksonLopez.snk
- `ImplicitUsings=disable`
- disable
- XML Documentation Extraction
- Verified (77 namespaces, 365 types, 2030 members)
- MSBuild AOT / Trim Attributes
- 17 Full / 0 Partial / 4 Incompatible / 1 N/A
- BenchmarkDotNet Artifacts
- 7 total (6 measured, 1 na_error)
Explicit Verification Boundaries & Limitations
- All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).
- 1 unpublished