View Source X963KDF (x963kdf v0.1.0)

ANSI X9.63 Key Derivation Function (KDF)

Summary

Functions

Derive a key from a shared secret using the ANSI X9.63 Key Derivation Function (KDF).

Types

Functions

Link to this function

derive(alg, shared_secret, key_length, opts \\ [])

View Source

Derive a key from a shared secret using the ANSI X9.63 Key Derivation Function (KDF).

Parameters

  • alg - the SHA-1 or SHA-2 hash function to use
  • shared_secret - the shared secret
  • key_length - the length of the derived key in bytes
  • opts - additional options
    • :shared_data - additional shared data to include in the key derivation