EricksonLopez.Security Overview
EricksonLopez.Security (1.0.0 on NuGet, L3, 4,310 downloads) delivers AES-GCM authenticated encryption, multi-version key lifecycle management, Argon2/PBKDF2 password hashing, HMAC tokens, SSRF-hardened HTTP sockets, MFA/FIDO2 WebAuthn, Zero-Trust ABAC policies, and Roslyn security analyzers (ELS0001–ELS0005).
- Secure defaults &
Resultcontracts: Cryptographic operations bindAuthenticatedContextassociated data, enforceKeyPurposeseparation, scrub memory (SecretBuffer), and returnResult<T>rather than throwing on verification failures. - SSRF & constant-time defenses:
EricksonLopez.Security.Network(SafeSocketsHttpHandler,SafeDnsResolver) blocks private, loopback, and cloud-metadata IP ranges before socket connect, whileConstantTimeComparerprevents timing side channels (ELS0001). - AOT accuracy:
17runtime packages—includingWebAuthn.Fido2andWebAuthn.Fido2.Mds3—areFullAOT; only4packages (Cryptography.XmlDSig,GoogleCloud,OpenTelemetry,Saml2) setIsAotCompatible=false(withDirectory.Build.targetscascading analyzer suppression).
Rendering diagram…
flowchart LR DI["AddEricksonLopezSecurity()"] --> KM["IKeyLifecycleManager + IKeyRing"] KM --> Prot["ISecretProtector (AES-GCM + AuthenticatedContext)"] DI --> Net["SafeSocketsHttpHandler + SafeDnsResolver (SSRF)"] DI --> ZT["AbacPolicyEngine / TotpService / WebAuthn"]
View accessible text summary and structure
AddEricksonLopezSecurity wires IKeyLifecycleManager and IKeyRing into ISecretProtector for tenant-bound AEAD envelopes, while SafeSocketsHttpHandler guards outbound HTTP requests.
flowchart LR
DI["AddEricksonLopezSecurity()"] --> KM["IKeyLifecycleManager + IKeyRing"]
KM --> Prot["ISecretProtector (AES-GCM + AuthenticatedContext)"]
DI --> Net["SafeSocketsHttpHandler + SafeDnsResolver (SSRF)"]
DI --> ZT["AbacPolicyEngine / TotpService / WebAuthn"]Package Roster & Native AOT Status (21 / 22 Published)
Section titled “Package Roster & Native AOT Status (21 / 22 Published)”21 of 22 packages are published at 1.0.0 on NuGet (net8.0;net9.0;net10.0; netstandard2.0 for Analyzers; localVersion: 2.2.0 on disk), while EricksonLopez.Security.Mediator remains unpublished (2.2.0 local only). Overall AOT status is Partial (17 Full, 4 Incompatible, 1 NotApplicable):
- Published (
1.0.0,FullAOT, 16 packages):Security(282dl),Abstractions(384),Network(673),Cryptography(238),Pki(212),Cryptography.Pkcs11(211),WebAuthn.Fido2(177),Aws(176),Azure(158),HashiCorpVault(154),Privacy.Hibp(145),AspNetCore(144),Testing(135),Mfa(130),WebAuthn.Fido2.Mds3(130),ZeroTrust(130). - Published (
1.0.0,IncompatibleAOT, 4 packages):Cryptography.XmlDSig(216),GoogleCloud(179),Saml2(148),OpenTelemetry(144). - Published (
1.0.0,NotApplicable, 1 package):EricksonLopez.Security.Analyzers(144,netstandard2.0,ELS0001–ELS0005). - Unpublished (Local
2.2.0,FullAOT, 1 package):EricksonLopez.Security.Mediator(0downloads — local workspace only).
Measured directly from BenchmarkDotNet.Artifacts (7 total rows: 6 measured in SecurityBenchmarks on .NET 10.0.12 X64 RyuJIT x86-64-v4, AMD Ryzen 7 9800X3D; 1 na_error in CryptoBenchmarks.AesGcm_Encrypt on .NET 10.0.11; no NativeAOT reports):
SecurityEnvelope Serialize (Span, Zero-Alloc): 17.50 ns / 0 BSecurityEnvelope Deserialize (Span): 35.71 ns / 472 BSecretBuffer Allocate & Dispose (ZeroMemory): 37.33 ns / 32 BConstantTime FixedTimeEquals (32 bytes): 89.38 ns / 0 BToken Generation (URL-Safe 32 bytes): 122.31 ns / 388 BToken Hash (SHA-256): 144.28 ns / 184 Bna_errordisclosure (1row):CryptoBenchmarks.AesGcm_EncryptrecordedMean = NAand is disclosed rather than estimated.