3 - Ed25519ph was implemented, adding a multi-part signature API
4 (`crypto_sign_init()`, `crypto_sign_update()`, `crypto_sign_final_*()`).
5 - New constants and related accessors have been added for Scrypt and
7 - XChaCha20 has been implemented. Like XSalsa20, this construction
8 extends the ChaCha20 cipher to accept a 192-bit nonce. This makes it safe
9 to use ChaCha20 with random nonces.
10 - `crypto_secretbox`, `crypto_box` and `crypto_aead` now offer
11 variants leveraging XChaCha20.
12 - SHA-2 is about 20% faster, which also gives a speed boost to
13 signature and signature verification.
14 - AVX2 implementations of Salsa20 and ChaCha20 have been added. They
15 are twice as fast as the SSE2 implementations. The speed gain is
16 even more significant on Windows, that previously didn't use
17 vectorized implementations.
18 - New high-level API: `crypto_kdf`, to easily derive one or more
19 subkeys from a master key.
20 - Siphash with a 128-bit output has been implemented, and is
21 available as `crypto_shorthash_siphashx_*`.
22 - New `*_keygen()` helpers functions have been added to create secret
23 keys for all constructions. This improves code clarity and can prevent keys
24 from being partially initialized.
25 - A new `randombytes_buf_deterministic()` function was added to
26 deterministically fill a memory region with pseudorandom data. This
27 function can especially be useful to write reproducible tests.
28 - A preliminary `crypto_kx_*()` API was added to compute shared session
30 - AVX2 detection is more reliable.
31 - The pthreads library is not required any more when using MingW.
32 - `contrib/Findsodium.cmake` was added as an example to include
33 libsodium in a project using cmake.
34 - Compatibility with gcc 2.x has been restored.
35 - Minimal builds can be checked using `sodium_library_minimal()`.
36 - The `--enable-opt` compilation switch has become compatible with more
38 - Android builds are now using clang on platforms where it is
42 - `sodium_init()` is now thread-safe, and can be safely called multiple
44 - Android binaries now properly support 64-bit Android, targeting
45 platform 24, but without breaking compatibility with platforms 16 and
47 - Better support for old gcc versions.
48 - On FreeBSD, core dumps are disabled on regions allocated with
49 sodium allocation functions.
50 - AVX2 detection was fixed, resulting in faster Blake2b hashing on
51 platforms where it was not properly detected.
52 - The Sandy2x Curve25519 implementation was not as fast as expected
53 on some platforms. This has been fixed.
54 - The NativeClient target was improved. Most notably, it now supports
55 optimized implementations, and uses pepper_49 by default.
56 - The library can be compiled with recent Emscripten versions.
57 Changes have been made to produce smaller code, and the default heap
58 size was reduced in the standard version.
59 - The code can now be compiled on SLES11 service pack 4.
60 - Decryption functions can now accept a NULL pointer for the output.
61 This checks the MAC without writing the decrypted message.
62 - crypto_generichash_final() now returns -1 if called twice.
63 - Support for Visual Studio 2008 was improved.
66 - This release only fixes a compilation issue reported with some older
67 gcc versions. There are no functional changes over the previous release.
70 - The Javascript target now includes a `--sumo` option to include all
71 the symbols of the original C library.
72 - A detached API was added to the ChaCha20-Poly1305 and AES256-GCM
74 - The Argon2i password hashing function was added, and is accessible
75 directly and through a new, high-level `crypto_pwhash` API. The scrypt
76 function remains available as well.
77 - A speed-record AVX2 implementation of BLAKE2b was added (thanks to
79 - The library can now be compiled using C++Builder (thanks to @jcolli44)
80 - Countermeasures for Ed25519 signatures malleability have been added
81 to match the irtf-cfrg-eddsa draft (note that malleability is irrelevant to
82 the standard definition of signature security). Signatures with a small-order
83 `R` point are now also rejected.
84 - Some implementations are now slightly faster when using the Clang
86 - The HChaCha20 core function was implemented (`crypto_core_hchacha20()`).
87 - No-op stubs were added for all AES256-GCM public functions even when
88 compiled on non-Intel platforms.
89 - `crypt_generichash_blake2b_statebytes()` was added.
90 - New macros were added for the IETF variant of the ChaCha20-Poly1305
92 - The library can now be compiled on Minix.
93 - HEASLR is now enabled on MinGW builds.
96 - Handle the case where the CPU supports AVX, but we are running
97 on an hypervisor with AVX disabled/not supported.
98 - Faster (2x) scalarmult_base() when using the ref10 implementation.
101 - More functions whose return value should be checked have been
102 tagged with `__attribute__ ((warn_unused_result))`: `crypto_box_easy()`,
103 `crypto_box_detached()`, `crypto_box_beforenm()`, `crypto_box()`, and
104 `crypto_scalarmult()`.
105 - Sandy2x, the fastest Curve25519 implementation ever, has been
106 merged in, and is automatically used on CPUs supporting the AVX
108 - An SSE2 optimized implementation of Poly1305 was added, and is
109 twice as fast as the portable one.
110 - An SSSE3 optimized implementation of ChaCha20 was added, and is
111 twice as fast as the portable one.
112 - Faster `sodium_increment()` for common nonce sizes.
113 - New helper functions have been added: `sodium_is_zero()` and
115 - `sodium_runtime_has_aesni()` now properly detects the CPU flag when
116 compiled using Visual Studio.
119 - Optimized implementations of Blake2 have been added for modern
120 Intel platforms. `crypto_generichash()` is now faster than MD5 and SHA1
121 implementations while being far more secure.
122 - Functions for which the return value should be checked have been
123 tagged with `__attribute__ ((warn_unused_result))`. This will
124 intentionally break code compiled with `-Werror` that didn't bother
125 checking critical return values.
126 - The `crypto_sign_edwards25519sha512batch_*()` functions have been
127 tagged as deprecated.
128 - Undocumented symbols that were exported, but were only useful for
129 internal purposes have been removed or made private:
130 `sodium_runtime_get_cpu_features()`, the implementation-specific
131 `crypto_onetimeauth_poly1305_donna()` symbols,
132 `crypto_onetimeauth_poly1305_set_implementation()`,
133 `crypto_onetimeauth_poly1305_implementation_name()` and
134 `crypto_onetimeauth_pick_best_implementation()`.
135 - `sodium_compare()` now works as documented, and compares numbers
136 in little-endian format instead of behaving like `memcmp()`.
137 - The previous changes should not break actual applications, but to be
138 safe, the library version major was incremented.
139 - `sodium_runtime_has_ssse3()` and `sodium_runtime_has_sse41()` have
141 - The library can now be compiled with the CompCert compiler.
144 - Compilation issues on some platforms were fixed: missing alignment
145 directives were added (required at least on RHEL-6/i386), a workaround
146 for a VRP bug on gcc/armv7 was added, and the library can now be compiled
147 with the SunPro compiler.
148 - Javascript target: io.js is not supported any more. Use nodejs.
151 - Support for AES256-GCM has been added. This requires
152 a CPU with the aesni and pclmul extensions, and is accessible via the
153 crypto_aead_aes256gcm_*() functions.
154 - The Javascript target doesn't use eval() any more, so that the
155 library can be used in Chrome packaged applications.
156 - QNX and CloudABI are now supported.
157 - Support for NaCl has finally been added.
158 - ChaCha20 with an extended (96 bit) nonce and a 32-bit counter has
159 been implemented as crypto_stream_chacha20_ietf(),
160 crypto_stream_chacha20_ietf_xor() and crypto_stream_chacha20_ietf_xor_ic().
161 An IETF-compatible version of ChaCha20Poly1305 is available as
162 crypto_aead_chacha20poly1305_ietf_npubbytes(),
163 crypto_aead_chacha20poly1305_ietf_encrypt() and
164 crypto_aead_chacha20poly1305_ietf_decrypt().
165 - The sodium_increment() helper function has been added, to increment
166 an arbitrary large number (such as a nonce).
167 - The sodium_compare() helper function has been added, to compare
168 arbitrary large numbers (such as nonces, in order to prevent replay
172 - In addition to sodium_bin2hex(), sodium_hex2bin() is now a
173 constant-time function.
174 - crypto_stream_xsalsa20_ic() has been added.
175 - crypto_generichash_statebytes(), crypto_auth_*_statebytes() and
176 crypto_hash_*_statebytes() have been added in order to retrieve the
177 size of structures keeping states from foreign languages.
178 - The JavaScript target doesn't require /dev/urandom or an external
179 randombytes() implementation any more. Other minor Emscripten-related
180 improvements have been made in order to support libsodium.js
181 - Custom randombytes implementations do not need to provide their own
182 implementation of randombytes_uniform() any more. randombytes_stir()
183 and randombytes_close() can also be NULL pointers if they are not
185 - On Linux, getrandom(2) is being used instead of directly accessing
186 /dev/urandom, if the kernel supports this system call.
187 - crypto_box_seal() and crypto_box_seal_open() have been added.
188 - Visual Studio 2015 is now supported.
191 - The _easy and _detached APIs now support precalculated keys;
192 crypto_box_easy_afternm(), crypto_box_open_easy_afternm(),
193 crypto_box_detached_afternm() and crypto_box_open_detached_afternm()
194 have been added as an alternative to the NaCl interface.
195 - Memory allocation functions can now be used on operating systems with
196 no memory protection.
197 - crypto_sign_open() and crypto_sign_edwards25519sha512batch_open()
198 now accept a NULL pointer instead of a pointer to the message size, if
199 storing this information is not required.
200 - The close-on-exec flag is now set on the descriptor returned when
201 opening /dev/urandom.
202 - A libsodium-uninstalled.pc file to use pkg-config even when
203 libsodium is not installed, has been added.
204 - The iOS target now includes armv7s and arm64 optimized code, as well
205 as i386 and x86_64 code for the iOS simulator.
206 - sodium_free() can now be called on regions with PROT_NONE protection.
207 - The Javascript tests can run on Ubuntu, where the node binary was
208 renamed nodejs. io.js can also be used instead of node.
211 - DLL_EXPORT was renamed SODIUM_DLL_EXPORT in order to avoid
212 collisions with similar macros defined by other libraries.
213 - sodium_bin2hex() is now constant-time.
214 - crypto_secretbox_detached() now supports overlapping input and output
216 - NaCl's donna_c64 implementation of curve25519 was reading an extra byte
217 past the end of the buffer containing the base point. This has been
221 - The API and ABI are now stable. New features will be added, but
222 backward-compatibility is guaranteed through all the 1.x.y releases.
223 - crypto_sign() properly works with overlapping regions again. Thanks
224 to @pysiak for reporting this regression introduced in version 0.6.1.
225 - The test suite has been extended.
227 * Version 0.7.1 (1.0 RC2)
228 - This is the second release candidate of Sodium 1.0. Minor
229 compilation, readability and portability changes have been made and the
230 test suite was improved, but the API is the same as the previous release
233 * Version 0.7.0 (1.0 RC1)
234 - Allocating memory to store sensitive data can now be done using
235 sodium_malloc() and sodium_allocarray(). These functions add guard
236 pages around the protected data to make it less likely to be
237 accessible in a heartbleed-like scenario. In addition, the protection
238 for memory regions allocated that way can be changed using
239 sodium_mprotect_noaccess(), sodium_mprotect_readonly() and
240 sodium_mprotect_readwrite().
241 - ed25519 keys can be converted to curve25519 keys with
242 crypto_sign_ed25519_pk_to_curve25519() and
243 crypto_sign_ed25519_sk_to_curve25519(). This allows using the same
244 keys for signature and encryption.
245 - The seed and the public key can be extracted from an ed25519 key
246 using crypto_sign_ed25519_sk_to_seed() and crypto_sign_ed25519_sk_to_pk().
247 - aes256 was removed. A timing-attack resistant implementation might
248 be added later, but not before version 1.0 is tagged.
249 - The crypto_pwhash_scryptxsalsa208sha256_* compatibility layer was
250 removed. Use crypto_pwhash_scryptsalsa208sha256_*.
251 - The compatibility layer for implementation-specific functions was
253 - Compilation issues with Mingw64 on MSYS (not MSYS2) were fixed.
254 - crypto_pwhash_scryptsalsa208sha256_STRPREFIX was added: it contains
255 the prefix produced by crypto_pwhash_scryptsalsa208sha256_str()
258 - Important bug fix: when crypto_sign_open() was given a signed
259 message too short to even contain a signature, it was putting an
260 unlimited amount of zeros into the target buffer instead of
261 immediately returning -1. The bug was introduced in version 0.5.0.
262 - New API: crypto_sign_detached() and crypto_sign_verify_detached()
263 to produce and verify ed25519 signatures without having to duplicate
265 - New ./configure switch: --enable-minimal, to create a smaller
266 library, with only the functions required for the high-level API.
267 Mainly useful for the JavaScript target and embedded systems.
268 - All the symbols are now exported by the Emscripten build script.
269 - The pkg-config .pc file is now always installed even if the
270 pkg-config tool is not available during the installation.
273 - The ChaCha20 stream cipher has been added, as crypto_stream_chacha20_*
274 - The ChaCha20Poly1305 AEAD construction has been implemented, as
275 crypto_aead_chacha20poly1305_*
276 - The _easy API does not require any heap allocations any more and
277 does not have any overhead over the NaCl API. With the password
278 hashing function being an obvious exception, the library doesn't
279 allocate and will not allocate heap memory ever.
280 - crypto_box and crypto_secretbox have a new _detached API to store
281 the authentication tag and the encrypted message separately.
282 - crypto_pwhash_scryptxsalsa208sha256*() functions have been renamed
283 crypto_pwhash_scryptsalsa208sha256*().
284 - The low-level crypto_pwhash_scryptsalsa208sha256_ll() function
285 allows setting individual parameters of the scrypt function.
286 - New macros and functions for recommended crypto_pwhash_* parameters
288 - Similarly to crypto_sign_seed_keypair(), crypto_box_seed_keypair()
289 has been introduced to deterministically generate a key pair from a seed.
290 - crypto_onetimeauth() now provides a streaming interface.
291 - crypto_stream_chacha20_xor_ic() and crypto_stream_salsa20_xor_ic()
292 have been added to use a non-zero initial block counter.
293 - On Windows, CryptGenRandom() was replaced by RtlGenRandom(), which
294 doesn't require the Crypt API.
295 - The high bit in curve25519 is masked instead of processing the key as
297 - The curve25519 ref implementation was replaced by the latest ref10
298 implementation from Supercop.
299 - sodium_mlock() now prevents memory from being included in coredumps
303 - sodium_mlock()/sodium_munlock() have been introduced to lock pages
304 in memory before storing sensitive data, and to zero them before
306 - High-level wrappers for crypto_box and crypto_secretbox
307 (crypto_box_easy and crypto_secretbox_easy) can be used to avoid
308 dealing with the specific memory layout regular functions depend on.
309 - crypto_pwhash_scryptsalsa208sha256* functions have been added
310 to derive a key from a password, and for password storage.
311 - Salsa20 and ed25519 implementations now support overlapping
312 inputs/keys/outputs (changes imported from supercop-20140505).
313 - New build scripts for Visual Studio, Emscripten, different Android
314 architectures and msys2 are available.
315 - The poly1305-53 implementation has been replaced with Floodyberry's
316 poly1305-donna32 and poly1305-donna64 implementations.
317 - sodium_hex2bin() has been added to complement sodium_bin2hex().
318 - On OpenBSD and Bitrig, arc4random() is used instead of reading
320 - crypto_auth_hmac_sha512() has been implemented.
321 - sha256 and sha512 now have a streaming interface.
322 - hmacsha256, hmacsha512 and hmacsha512256 now support keys of
323 arbitrary length, and have a streaming interface.
324 - crypto_verify_64() has been implemented.
325 - first-class Visual Studio build system, thanks to @evoskuil
326 - CPU features are now detected at runtime.
329 - Restore compatibility with OSX <= 10.6
332 - Visual Studio is officially supported (VC 2010 & VC 2013)
333 - mingw64 is now supported
334 - big-endian architectures are now supported as well
335 - The donna_c64 implementation of curve25519_donna_c64 now handles
336 non-canonical points like the ref implementation
337 - Missing scalarmult_curve25519 and stream_salsa20 constants are now exported
338 - A crypto_onetimeauth_poly1305_ref() wrapper has been added
341 - crypto_sign_seedbytes() and crypto_sign_SEEDBYTES were added.
342 - crypto_onetimeauth_poly1305_implementation_name() was added.
343 - poly1305-ref has been replaced by a faster implementation,
344 Floodyberry's poly1305-donna-unrolled.
345 - Stackmarkings have been added to assembly code, for Hardened Gentoo.
346 - pkg-config can now be used in order to retrieve compilations flags for
348 - crypto_stream_aes256estream_*() can now deal with unaligned input
349 on platforms that require word alignment.
350 - portability improvements.
353 - All NaCl constants are now also exposed as functions.
354 - The Android and iOS cross-compilation script have been improved.
355 - libsodium can now be cross-compiled to Windows from Linux.
356 - libsodium can now be compiled with emscripten.
357 - New convenience function (prototyped in utils.h): sodium_bin2hex().
360 - sodium_version_*() functions were not exported in version 0.4. They
361 are now visible as intended.
362 - sodium_init() now calls randombytes_stir().
363 - optimized assembly version of salsa20 is now used on amd64.
364 - further cleanups and enhanced compatibility with non-C99 compilers.
367 - Most constants and operations are now available as actual functions
368 instead of macros, making it easier to use from other languages.
369 - New operation: crypto_generichash, featuring a variable key size, a
370 variable output size, and a streaming API. Currently implemented using
372 - The package can be compiled in a separate directory.
373 - aes128ctr functions are exported.
374 - Optimized versions of curve25519 (curve25519_donna_c64), poly1305
375 (poly1305_53) and ed25519 (ed25519_ref10) are available. Optionally calling
376 sodium_init() once before using the library makes it pick the fastest
378 - New convenience function: sodium_memzero() in order to securely
380 - A whole bunch of cleanups and portability enhancements.
381 - On Windows, a .REF file is generated along with the shared library,
382 for use with Visual Studio. The installation path for these has become
383 $prefix/bin as expected by MingW.
386 - The crypto_shorthash operation has been added, implemented using
390 - crypto_sign_seed_keypair() has been added