crypto / org.apache.tuweni.crypto.sodium / KeyDerivation

KeyDerivation

class KeyDerivation (source)

Key derivation.

Multiple secret subkeys can be derived from a single master key.

Given the master key and a key identifier, a subkey can be deterministically computed. However, given a subkey, an attacker cannot compute the master key nor any other subkeys.

Types

MasterKey

class MasterKey : Destroyable

A KeyDerivation master key.

Constructors

<init>

KeyDerivation()

Key derivation.

Multiple secret subkeys can be derived from a single master key.

Given the master key and a key identifier, a subkey can be deterministically computed. However, given a subkey, an attacker cannot compute the master key nor any other subkeys.

Functions

contextLength

static fun contextLength(): Int

isAvailable

static fun isAvailable(): Boolean

Check if Sodium and key derivation support is available.

Key derivation is supported in sodium native library version >= 10.0.12.

maxSubKeyLength

static fun maxSubKeyLength(): Int

minSubKeyLength

static fun minSubKeyLength(): Int