sodium-native

sodium-native

  • Get Started
  • API
  • Github

›API

Get Started

  • Introduction
  • Projects using sodium-native

API

  • Compatibility
  • API
  • Memory Protection
  • Generating Random Data
  • Helpers
  • Padding
  • Signing
  • Generic Hashing
  • Public/Secret Key Box Encryption
  • Sealed Box Encryption
  • Secret Key Box Encryption
  • AEAD (Authenticated Encryption with Additional Data)
  • Non-Authenticated Streaming Encryption
  • Authentication
  • Stream Encryption
  • One-Time Authentication
  • Password Hashing
  • Key Exchange
  • Diffie-Hellman
  • Finite Field Arithmetic
  • Short Hashes
  • Key Derivation
  • SHA
  • License

Key Derivation

Bindings for the crypto_kdf API. See the libsodium crypto_kdf docs for more information.

Constants

Buffer lengths (integer)

  • crypto_kdf_KEYBYTES
  • crypto_kdf_BYTES_MIN
  • crypto_kdf_BYTES_MAX
  • crypto_kdf_CONTEXTBYTES

String constants (string)

  • crypto_kdf_PRIMITIVE

crypto_kdf_keygen

sodium-native sodium-javascript

sodium.crypto_kdf_keygen(key)

Generates a new master key.

  • key should be a buffer of length crypto_kdf_KEYBYTES

crypto_kdf_derive_from_key

sodium-native sodium-javascript

sodium.crypto_kdf_derive_from_key(subkey, subkeyId, ctx, key)

Derives a new key from a master key.

  • subkey should be a buffer between crypto_kdf_BYTES_MIN and crypto_kdf_BYTES_MAX
  • subkeyId should be an integer
  • ctx should be a buffer of length crypto_kdf_CONTEXTBYTES
  • key should be a buffer of length crypto_kdf_KEYBYTES
← Short HashesSHA →
  • Constants
  • crypto_kdf_keygen
  • crypto_kdf_derive_from_key
Docs
Get StartedAPI
Community
LibsodiumHyperdivisionHyperdivision on Twitter
More
GitHubStar
Copyright © 2020 Hyperdivision