RawKeyAsymmetricAlgorithm Class
Definition
- Namespace
- Bodu.Security.Cryptography
- Assembly
- Bodu.Security.Cryptography.dll
- Package
- Bodu.Security.Cryptography 1.2.0
Serves as the base class for the library's raw-key asymmetric algorithms (X25519, Ed25519, ML-KEM, ML-DSA), centralizing the shared key-material lifecycle: ownership of the current Bodu.Security.Cryptography.AsymmetricKeyMaterial, zeroizing replacement, dispose-time clearing, and the disposed-state guard.
public abstract class RawKeyAsymmetricAlgorithm : AsymmetricAlgorithm, IDisposable
- Inheritance
-
RawKeyAsymmetricAlgorithm
- Implements
- Derived
- Inherited Members
- Extension Methods
Remarks
Derived algorithms store their current key pair (or public-only key) through Bodu.Security.Cryptography.RawKeyAsymmetricAlgorithm.ReplaceKeyMaterial(Bodu.Security.Cryptography.AsymmetricKeyMaterial), which zeroizes any previously held private key before taking ownership of the new material, and read it back through Bodu.Security.Cryptography.RawKeyAsymmetricAlgorithm.KeyMaterial. Disposal clears the held private key exactly once and latches the instance; subsequent operations guard with Bodu.Security.Cryptography.RawKeyAsymmetricAlgorithm.ThrowIfDisposed().
The lifecycle members are private protected: they form the internal contract between this base and the
library's own algorithm implementations, not a public extension surface.
Methods
Dispose(bool)
Releases the resources used by this instance, zeroing all private key material.
protected override void Dispose(bool disposing)
Parameters
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |