Core Concepts — Key Lifecycle, AEAD Envelopes, Memory & SSRF
L3StableNuGet: v1.0.0Local HEAD: v2.2.0AOT: Partial
EricksonLopez.Security models cryptographic boundaries, key rotation, memory scrubbing, and network egress controls as explicit, composable contracts.
Key Lifecycle & Authenticated Envelopes (KeyPurpose, AuthenticatedContext)
Section titled “Key Lifecycle & Authenticated Envelopes (KeyPurpose, AuthenticatedContext)”IKeyLifecycleManager&IKeyRing: Manage versioned cryptographic keys (KeyIdentifier,KeyVersion,KeyPurpose) with rotation and revocation notification (InProcessKeyRevocationNotifierorAddDistributedKeyRevocationNotifier).ISecretProtector&AuthenticatedContext: Binds AEAD additional authenticated data (such asAuthenticatedContext.ForTenant("tenant-42")) so ciphertexts cannot be replayed across tenants or key purposes.
Zeroized Memory & Network Defenses (SecretBuffer, SafeSocketsHttpHandler)
Section titled “Zeroized Memory & Network Defenses (SecretBuffer, SafeSocketsHttpHandler)”SecretBuffer(EricksonLopez.Security.Memory): Rents fromArrayPool<byte>.Sharedand scrubs memory withCryptographicOperations.ZeroMemoryon disposal (ELS0002enforcesusingdisposal).EricksonLopez.Security.Network:SafeSocketsHttpHandlerandSafeDnsResolverevaluate resolved IP addresses againstSsrfProtectionOptionsandIpAddressRangebefore opening outbound TCP sockets.- Roslyn Diagnostics (
EricksonLopez.Security.Analyzers):ELS0001–ELS0005flag non-constant-time secret comparisons, undisposedSecretBufferinstances, hardcoded secrets, and raw secret logging.