Repository  -  API  -  Source


  • Register tags for async_hooks on crypto_pwhash_*_async functions
  • Add constants and methods for crypto_aead_xchacha20poly1305_ietf_*. Please note the special circumstances around the bindings of MESSAGEBYTES_MAX and crypto_aead_xchacha20poly1305_ietf_*_detached.
  • Improved error messages; now reports the constants and argument names documented from javascript.
  • Use Buffer.alloc/Buffer.fill/Buffer.from in tests and examples
  • Add more libsodium helpers; sodium_memcmp, sodium_compare, sodium_add, sodium_increment, sodium_is_zero
  • Make it possible to pass only one of rx or tx to crypto_kx_*
  • Add crypto_scalarmult_ed25519_* and crypto_core_ed25519_* operations


  • Additional check x < 0 before cast on uint assert macro
  • Add prebuilds for Node 10


Fixes a critical bug in crypto_secretstream_xchacha20poly1305_init_push where it would call crypto_secretstream_xchacha20poly1305_init_pull instead.


Only use the constants that libsodium compiled with instead of the ones that sodium-native compiled with. This has caused bugs for some users and may have led to subtle bugs.


Rework build process so it is more versatile on UNIX operating systems by parsing the libtool archive files for correct .so name. This fixes builds on OpenBSD (#54)


Fix armv7l builds.


A mistake was made in generating prebuilds for v2.1.0, this version resolves the issue.


  • Upgrade to libsodium 1.0.16
  • Expose the new crypto_secretstream API
  • Expose crypto_kx API
  • Expose sodium_pad and sodium_unpad APIs
  • Expose crypto_pwhash_str_needs_rehash
  • Expose randombytes_SEEDBYTES randombytes_random, randombytes_uniform and randombytes_buf_deterministic
  • Check for NULL on sodium_malloc
  • All "Secure Buffers" (created with sodium_malloc) now have an immutable .secure = true property