Skip to content

OnixLabs.Security.Cryptography.IPrivateKeyDerivable

matthew edited this page May 27, 2026 · 1 revision

IPrivateKeyDerivable<T> Interface

Defines a cryptographic private key that can export its associated public key component.

Namespace OnixLabs.Security.Cryptography
Assembly OnixLabs.Security.Cryptography.dll (NuGet)

Definition

public interface IPrivateKeyDerivable<out T> where T : PublicKey

Type Parameters

Parameter Description
T The type of PublicKey that GetPublicKey() returns. Declared covariant (out T). Must derive from PublicKey.

Remarks

IPrivateKeyDerivable<T> is the foundation of public-key extraction in the private-key interface hierarchy. It is implemented by all four algorithm interfaces — IEcdhPrivateKey, IEcdsaPrivateKey, IEddsaPrivateKey, and IRsaPrivateKey — each bound to the corresponding public-key type via the T parameter. The covariant out T declaration allows the interface to be used in contexts where a less specific type is expected.

Methods

Member Returns Description
GetPublicKey() T Gets the public key component from the current private key.

GetPublicKey()

T GetPublicKey();

Gets the cryptographic public key component from the current cryptographic private key.

Returns — The public key component of type T derived from this private key.

See Also

ONIXLabs .NET Library


Clone this wiki locally