libsodium 1.0.8
[tomato.git] / release / src / router / libsodium / ChangeLog
blob2e1d40e512d0c8944febc556311abcbee071467f
2 * Version 1.0.8
3  - Handle the case where the CPU supports AVX, but we are running
4 on an hypervisor with AVX disabled/not supported.
5  - Faster (2x) scalarmult_base() when using the ref10 implementation.
7 * Version 1.0.7
8  - More functions whose return value should be checked have been
9 tagged with `__attribute__ ((warn_unused_result))`: `crypto_box_easy()`,
10 `crypto_box_detached()`, `crypto_box_beforenm()`, `crypto_box()`, and
11 `crypto_scalarmult()`.
12  - Sandy2x, the fastest Curve25519 implementation ever, has been
13 merged in, and is automatically used on CPUs supporting the AVX
14 instructions set.
15  - An SSE2 optimized implementation of Poly1305 was added, and is
16 twice as fast as the portable one.
17  - An SSSE3 optimized implementation of ChaCha20 was added, and is
18 twice as fast as the portable one.
19  - Faster `sodium_increment()` for common nonce sizes.
20  - New helper functions have been added: `sodium_is_zero()` and
21  `sodium_add()`.
22  - `sodium_runtime_has_aesni()` now properly detects the CPU flag when
23  compiled using Visual Studio.
25 * Version 1.0.6
26  - Optimized implementations of Blake2 have been added for modern
27 Intel platforms. `crypto_generichash()` is now faster than MD5 and SHA1
28 implementations while being far more secure.
29  - Functions for which the return value should be checked have been
30 tagged with `__attribute__ ((warn_unused_result))`. This will
31 intentionally break code compiled with `-Werror` that didn't bother
32 checking critical return values.
33  - The `crypto_sign_edwards25519sha512batch_*()` functions have been
34 tagged as deprecated.
35  - Undocumented symbols that were exported, but were only useful for
36 internal purposes have been removed or made private:
37 `sodium_runtime_get_cpu_features()`, the implementation-specific
38 `crypto_onetimeauth_poly1305_donna()` symbols,
39 `crypto_onetimeauth_poly1305_set_implementation()`,
40 `crypto_onetimeauth_poly1305_implementation_name()` and
41 `crypto_onetimeauth_pick_best_implementation()`.
42  - `sodium_compare()` now works as documented, and compares numbers
43 in little-endian format instead of behaving like `memcmp()`.
44  - The previous changes should not break actual applications, but to be
45 safe, the library version major was incremented.
46  - `sodium_runtime_has_ssse3()` and `sodium_runtime_has_sse41()` have
47 been added.
48  - The library can now be compiled with the CompCert compiler.
50 * Version 1.0.5
51  - Compilation issues on some platforms were fixed: missing alignment
52 directives were added (required at least on RHEL-6/i386), a workaround
53 for a VRP bug on gcc/armv7 was added, and the library can now be compiled
54 with the SunPro compiler.
55  - Javascript target: io.js is not supported any more. Use nodejs.
57 * Version 1.0.4
58  - Support for AES256-GCM has been added. This requires
59 a CPU with the aesni and pclmul extensions, and is accessible via the
60 crypto_aead_aes256gcm_*() functions.
61  - The Javascript target doesn't use eval() any more, so that the
62 library can be used in Chrome packaged applications.
63  - QNX and CloudABI are now supported.
64  - Support for NaCl has finally been added.
65  - ChaCha20 with an extended (96 bit) nonce and a 32-bit counter has
66 been implemented as crypto_stream_chacha20_ietf(),
67 crypto_stream_chacha20_ietf_xor() and crypto_stream_chacha20_ietf_xor_ic().
68 An IETF-compatible version of ChaCha20Poly1305 is available as
69 crypto_aead_chacha20poly1305_ietf_npubbytes(),
70 crypto_aead_chacha20poly1305_ietf_encrypt() and
71 crypto_aead_chacha20poly1305_ietf_decrypt().
72  - The sodium_increment() helper function has been added, to increment
73 an arbitrary large number (such as a nonce).
74  - The sodium_compare() helper function has been added, to compare
75 arbitrary large numbers (such as nonces, in order to prevent replay
76 attacks).
78 * Version 1.0.3
79  - In addition to sodium_bin2hex(), sodium_hex2bin() is now a
80 constant-time function.
81  - crypto_stream_xsalsa20_ic() has been added.
82  - crypto_generichash_statebytes(), crypto_auth_*_statebytes() and
83 crypto_hash_*_statebytes() have been added in order to retrieve the
84 size of structures keeping states from foreign languages.
85  - The JavaScript target doesn't require /dev/urandom or an external
86 randombytes() implementation any more. Other minor Emscripten-related
87 improvements have been made in order to support libsodium.js
88  - Custom randombytes implementations do not need to provide their own
89 implementation of randombytes_uniform() any more. randombytes_stir()
90 and randombytes_close() can also be NULL pointers if they are not
91 required.
92  - On Linux, getrandom(2) is being used instead of directly accessing
93 /dev/urandom, if the kernel supports this system call.
94  - crypto_box_seal() and crypto_box_seal_open() have been added.
95  - A solutions for Visual Studio 2015 was added.
97 * Version 1.0.2
98  - The _easy and _detached APIs now support precalculated keys;
99 crypto_box_easy_afternm(), crypto_box_open_easy_afternm(),
100 crypto_box_detached_afternm() and crypto_box_open_detached_afternm()
101 have been added as an alternative to the NaCl interface.
102  - Memory allocation functions can now be used on operating systems with
103 no memory protection.
104  - crypto_sign_open() and crypto_sign_edwards25519sha512batch_open()
105 now accept a NULL pointer instead of a pointer to the message size, if
106 storing this information is not required.
107  - The close-on-exec flag is now set on the descriptor returned when
108 opening /dev/urandom.
109  - A libsodium-uninstalled.pc file to use pkg-config even when
110 libsodium is not installed, has been added.
111  - The iOS target now includes armv7s and arm64 optimized code, as well
112 as i386 and x86_64 code for the iOS simulator.
113  - sodium_free() can now be called on regions with PROT_NONE protection.
114  - The Javascript tests can run on Ubuntu, where the node binary was
115 renamed nodejs. io.js can also be used instead of node.
117 * Version 1.0.1
118  - DLL_EXPORT was renamed SODIUM_DLL_EXPORT in order to avoid
119 collisions with similar macros defined by other libraries.
120  - sodium_bin2hex() is now constant-time.
121  - crypto_secretbox_detached() now supports overlapping input and output
122 regions.
123  - NaCl's donna_c64 implementation of curve25519 was reading an extra byte
124 past the end of the buffer containing the base point. This has been
125 fixed.
127 * Version 1.0.0
128  - The API and ABI are now stable. New features will be added, but
129 backward-compatibility is guaranteed through all the 1.x.y releases.
130  - crypto_sign() properly works with overlapping regions again. Thanks
131 to @pysiak for reporting this regression introduced in version 0.6.1.
132  - The test suite has been extended.
134 * Version 0.7.1 (1.0 RC2)
135  - This is the second release candidate of Sodium 1.0. Minor
136 compilation, readability and portability changes have been made and the
137 test suite was improved, but the API is the same as the previous release
138 candidate.
140 * Version 0.7.0 (1.0 RC1)
141  - Allocating memory to store sensitive data can now be done using
142 sodium_malloc() and sodium_allocarray(). These functions add guard
143 pages around the protected data to make it less likely to be
144 accessible in a heartbleed-like scenario. In addition, the protection
145 for memory regions allocated that way can be changed using
146 sodium_mprotect_noaccess(), sodium_mprotect_readonly() and
147 sodium_mprotect_readwrite().
148  - ed25519 keys can be converted to curve25519 keys with
149 crypto_sign_ed25519_pk_to_curve25519() and
150 crypto_sign_ed25519_sk_to_curve25519(). This allows using the same
151 keys for signature and encryption.
152  - The seed and the public key can be extracted from an ed25519 key
153 using crypto_sign_ed25519_sk_to_seed() and crypto_sign_ed25519_sk_to_pk().
154  - aes256 was removed. A timing-attack resistant implementation might
155 be added later, but not before version 1.0 is tagged.
156  - The crypto_pwhash_scryptxsalsa208sha256_* compatibility layer was
157 removed. Use crypto_pwhash_scryptsalsa208sha256_*.
158  - The compatibility layer for implementation-specific functions was
159 removed.
160  - Compilation issues with Mingw64 on MSYS (not MSYS2) were fixed.
161  - crypto_pwhash_scryptsalsa208sha256_STRPREFIX was added: it contains
162 the prefix produced by crypto_pwhash_scryptsalsa208sha256_str()
164 * Version 0.6.1
165  - Important bug fix: when crypto_sign_open() was given a signed
166 message too short to even contain a signature, it was putting an
167 unlimited amount of zeros into the target buffer instead of
168 immediately returning -1. The bug was introduced in version 0.5.0.
169  - New API: crypto_sign_detached() and crypto_sign_verify_detached()
170 to produce and verify ed25519 signatures without having to duplicate
171 the message.
172  - New ./configure switch: --enable-minimal, to create a smaller
173 library, with only the functions required for the high-level API.
174 Mainly useful for the JavaScript target and embedded systems.
175  - All the symbols are now exported by the Emscripten build script.
176  - The pkg-config .pc file is now always installed even if the
177 pkg-config tool is not available during the installation.
179 * Version 0.6.0
180  - The ChaCha20 stream cipher has been added, as crypto_stream_chacha20_*
181  - The ChaCha20Poly1305 AEAD construction has been implemented, as
182 crypto_aead_chacha20poly1305_*
183  - The _easy API does not require any heap allocations any more and
184 does not have any overhead over the NaCl API. With the password
185 hashing function being an obvious exception, the library doesn't
186 allocate and will not allocate heap memory ever.
187  - crypto_box and crypto_secretbox have a new _detached API to store
188 the authentication tag and the encrypted message separately.
189  - crypto_pwhash_scryptxsalsa208sha256*() functions have been renamed
190 crypto_pwhash_scryptsalsa208sha256*().
191  - The low-level crypto_pwhash_scryptsalsa208sha256_ll() function
192 allows setting individual parameters of the scrypt function.
193  - New macros and functions for recommended crypto_pwhash_* parameters
194 have been added.
195  - Similarly to crypto_sign_seed_keypair(), crypto_box_seed_keypair()
196 has been introduced to deterministically generate a key pair from a seed.
197  - crypto_onetimeauth() now provides a streaming interface.
198  - crypto_stream_chacha20_xor_ic() and crypto_stream_salsa20_xor_ic()
199 have been added to use a non-zero initial block counter.
200  - On Windows, CryptGenRandom() was replaced by RtlGenRandom(), which
201 doesn't require the Crypt API.
202  - The high bit in curve25519 is masked instead of processing the key as
203 a 256-bit value.
204  - The curve25519 ref implementation was replaced by the latest ref10
205 implementation from Supercop.
206  - sodium_mlock() now prevents memory from being included in coredumps
207 on Linux 3.4+
209 * Version 0.5.0
210  - sodium_mlock()/sodium_munlock() have been introduced to lock pages
211 in memory before storing sensitive data, and to zero them before
212 unlocking them.
213  - High-level wrappers for crypto_box and crypto_secretbox
214 (crypto_box_easy and crypto_secretbox_easy) can be used to avoid
215 dealing with the specific memory layout regular functions depend on.
216  - crypto_pwhash_scryptsalsa208sha256* functions have been added
217 to derive a key from a password, and for password storage.
218  - Salsa20 and ed25519 implementations now support overlapping
219 inputs/keys/outputs (changes imported from supercop-20140505).
220  - New build scripts for Visual Studio, Emscripten, different Android
221 architectures and msys2 are available.
222  - The poly1305-53 implementation has been replaced with Floodyberry's
223 poly1305-donna32 and poly1305-donna64 implementations.
224  - sodium_hex2bin() has been added to complement sodium_bin2hex().
225  - On OpenBSD and Bitrig, arc4random() is used instead of reading
226 /dev/urandom.
227  - crypto_auth_hmac_sha512() has been implemented.
228  - sha256 and sha512 now have a streaming interface.
229  - hmacsha256, hmacsha512 and hmacsha512256 now support keys of
230 arbitrary length, and have a streaming interface.
231  - crypto_verify_64() has been implemented.
232  - first-class Visual Studio build system, thanks to @evoskuil
233  - CPU features are now detected at runtime.
235 * Version 0.4.5
236  - Restore compatibility with OSX <= 10.6
238 * Version 0.4.4
239  - Visual Studio is officially supported (VC 2010 & VC 2013)
240  - mingw64 is now supported
241  - big-endian architectures are now supported as well
242  - The donna_c64 implementation of curve25519_donna_c64 now handles
243 non-canonical points like the ref implementation
244  - Missing scalarmult_curve25519 and stream_salsa20 constants are now exported
245  - A crypto_onetimeauth_poly1305_ref() wrapper has been added
247 * Version 0.4.3
248  - crypto_sign_seedbytes() and crypto_sign_SEEDBYTES were added.
249  - crypto_onetimeauth_poly1305_implementation_name() was added.
250  - poly1305-ref has been replaced by a faster implementation,
251 Floodyberry's poly1305-donna-unrolled.
252  - Stackmarkings have been added to assembly code, for Hardened Gentoo.
253  - pkg-config can now be used in order to retrieve compilations flags for
254 using libsodium.
255  - crypto_stream_aes256estream_*() can now deal with unaligned input
256 on platforms that require word alignment.
257  - portability improvements.
259 * Version 0.4.2
260  - All NaCl constants are now also exposed as functions.
261  - The Android and iOS cross-compilation script have been improved.
262  - libsodium can now be cross-compiled to Windows from Linux.
263  - libsodium can now be compiled with emscripten.
264  - New convenience function (prototyped in utils.h): sodium_bin2hex().
266 * Version 0.4.1
267  - sodium_version_*() functions were not exported in version 0.4. They
268 are now visible as intended.
269  - sodium_init() now calls randombytes_stir().
270  - optimized assembly version of salsa20 is now used on amd64.
271  - further cleanups and enhanced compatibility with non-C99 compilers.
273 * Version 0.4
274  - Most constants and operations are now available as actual functions
275 instead of macros, making it easier to use from other languages.
276  - New operation: crypto_generichash, featuring a variable key size, a
277 variable output size, and a streaming API. Currently implemented using
278 Blake2b.
279  - The package can be compiled in a separate directory.
280  - aes128ctr functions are exported.
281  - Optimized versions of curve25519 (curve25519_donna_c64), poly1305
282 (poly1305_53) and ed25519 (ed25519_ref10) are available. Optionally calling
283 sodium_init() once before using the library makes it pick the fastest
284 implementation.
285  - New convenience function: sodium_memzero() in order to securely
286 wipe a memory area.
287  - A whole bunch of cleanups and portability enhancements.
288  - On Windows, a .REF file is generated along with the shared library,
289 for use with Visual Studio. The installation path for these has become
290 $prefix/bin as expected by MingW.
292 * Version 0.3
293  - The crypto_shorthash operation has been added, implemented using
294 SipHash-2-4.
296 * Version 0.2
297  - crypto_sign_seed_keypair() has been added
299 * Version 0.1
300  - Initial release.