Table of Contents

Class PublicKey

Namespace
Yubico.YubiKey.Cryptography
Assembly
Yubico.YubiKey.dll

Abstract base class for public key implementations.

public abstract class PublicKey : IPublicKey, IKeyBase
Inheritance
object
PublicKey
Implements
Derived
Extension Methods

Remarks

This class provides common structure for public key types, requiring derived classes to implement key type identification and X.509 export operations.

Concrete implementations include ECPublicKey, RSAPublicKey and Curve25519PublicKey, each providing algorithm-specific public key handling and export mechanisms.

Properties

KeyType

Gets the type of the cryptographic key.

public abstract KeyType KeyType { get; }

Property Value

KeyType

A KeyType value indicating the type of the key.

Methods

ExportSubjectPublicKeyInfo()

Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format.

public abstract byte[] ExportSubjectPublicKeyInfo()

Returns

byte[]

A byte array containing the X.509 SubjectPublicKeyInfo representation of the public-key portion of this key