Skip to content

OnixLabs.Security.Cryptography.IEcdhPrivateKey

matthew edited this page May 27, 2026 · 1 revision

IEcdhPrivateKey Interface

Defines an EC Diffie-Hellman cryptographic private key.

Namespace OnixLabs.Security.Cryptography
Assembly OnixLabs.Security.Cryptography.dll (NuGet)
Implements IPrivateKeyDerivable<EcdhPublicKey>, IPrivateKeyImportable<EcdhPrivateKey>, IPrivateKeyExportable, IBinaryConvertible

Definition

public interface IEcdhPrivateKey :
    IPrivateKeyDerivable<EcdhPublicKey>,
    IPrivateKeyImportable<EcdhPrivateKey>,
    IPrivateKeyExportable,
    IBinaryConvertible

Remarks

IEcdhPrivateKey extends the capability interfaces with ECDH-specific key agreement. In addition to exporting all serialization formats and deriving the public key, it exposes DeriveSharedSecret, which produces a Secret from this private key and a peer's public key. The shared secret can then be used as input to a key-derivation function.

Methods

Member Returns Description
DeriveSharedSecret(IEcdhPublicKey) Secret Derives a shared secret from this private key and the specified public key.

DeriveSharedSecret(IEcdhPublicKey)

Secret DeriveSharedSecret(IEcdhPublicKey publicKey);

Derives a cryptographic shared secret from the current EC Diffie-Hellman cryptographic private key and the specified cryptographic public key.

Parameter Type Description
publicKey IEcdhPublicKey The EC Diffie-Hellman cryptographic public key from which to derive the shared secret.

Returns — A Secret derived from the combination of this private key and the supplied public key.

See Also

ONIXLabs .NET Library


Clone this wiki locally