SoftwarePrivateKey

A private key held in memory, used by software backends. encoded hands the raw bytes to the backend that performs the operation; nothing else should call it.

Once destroyed, the key fails closed: encoded throws instead of handing out the overwritten bytes, which would be a valid, publicly known key (an all-zero Ed25519 seed, or an X25519 scalar that clamps to a fixed value).

Constructors

Link copied to clipboard
constructor(type: KeyType, encoded: ByteArray)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun destroy()

Overwrites the key material; encoded throws afterwards. Calling it again does nothing.

Link copied to clipboard

A copy of the raw private key: scalar for EC, seed for Ed25519, FIPS 203/204 encoding for ML-*.

Link copied to clipboard
open override fun toString(): String