1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-24 12:36:01 -07:00
Commit Graph

4286 Commits

Author SHA1 Message Date
Frank Denis
adcde0ca4e Update for zig-master 2023-04-12 12:58:37 +02:00
Frank Denis
66a68f0947 AEGIS/ARM: help the compiler emit eor3 instructions on recent ARM CPUs 2023-03-12 23:41:23 +01:00
Frank Denis
da1be5bf55 build.zig: build only static libraries 2023-03-01 17:04:21 +01:00
Frank Denis
5a72fb30eb CI: -Drelease-fast -> -Doptimize=ReleaseFast 2023-02-16 22:15:09 +01:00
Frank Denis
50f7b2882f CI: use zig-master 2023-02-16 22:07:17 +01:00
Frank Denis
bb2ee2359f Update for Zig 0.11 2023-02-16 21:59:29 +01:00
Frank Denis
5755a5c009 emscripten: remove pwhash_* from non-sumo builds
Also use different memory settings for js and wasm builds
2023-02-16 20:12:54 +01:00
Frank Denis
6bb5197c2c emscripten: enable EVAL_CTORS for WASM builds 2023-02-16 19:25:56 +01:00
Frank Denis
82696ef8c4 emscripten: setting Module.TOTAL_MEMORY doesn't do anything 2023-02-15 20:16:14 +01:00
Frank Denis
07b4176eca pwhash: fill output buffer with junk prior to running the actual KDF
These functions are a little bit special, because unlike everything
else, they do dynamic memory allocations, and are more likely to fail.

Applications are expected to check the return code, and these functions
are tagged with ((warn_unused_result)) but applications may still
ignore these.

This is also an issue with JavaScript, when total memory hasn't been
properly configured.

To be safe, fill the buffer with non-deterministic bytes, that are
unlikely to ever verify later.
2023-02-15 20:16:10 +01:00
Frank Denis
05b8da1a49 Use CLOCK_MONOTONIC for benchmarking, if possible 2023-02-15 19:42:08 +01:00
Frank Denis
ee009287af The --stack-first link option doesn't exist any more 2023-02-07 18:38:23 +01:00
Frank Denis
8bcb4ddad8 Azure Pipelines: use the recommended way to add wasmer to env 2023-02-07 18:37:28 +01:00
Frank Denis
d95e71db2e Check for iwasm existence before trying to use it 2023-02-07 18:37:21 +01:00
Frank Denis
f71fed879c Azure: update to zig 0.10.1 2023-02-07 18:36:57 +01:00
Frank Denis
ff4b2807f9 Use Zig 0.10.1 2023-02-07 18:36:48 +01:00
Frank Denis
176923f6ec Testing android-aar.sh is enough to test all the Android build scripts 2023-01-25 11:50:12 -08:00
Frank Denis
40ada6e45e Add android-aar.sh to CI 2023-01-25 11:46:59 -08:00
Frank Denis
0020b01a66 Try to build all Android targets (besides AAR for now) 2023-01-25 11:40:25 -08:00
Frank Denis
9cd9a0d120 On Windows, a ".LIB" file can be either shared or static
We were overwriting the static library with the shared one.
2023-01-18 22:13:29 +01:00
Frank Denis
ee0fe028ec .NET: build Apple targets with the xcframework build script
Including support for iOS, tvOS and Catalyst in the .NET package
by the way.
2023-01-16 13:50:27 +01:00
Frank Denis
9cad824a9c apple-xcframework.sh: add the ability to skip simulators 2023-01-16 13:34:10 +01:00
Frank Denis
48af322b7a AES-256-GCM (AES-NI): prefetch the next blocks
...while computing the GHASH of the previous blocks.

For AMD CPUs with disabled hardware prefetchers, the gain may
be significant.
2023-01-14 00:03:27 +01:00
Frank Denis
67f1b568c5 GitHub action: Try to use the pre-installed .NET SDK 2023-01-09 12:41:38 +01:00
Frank Denis
7082a787d9 Add a pwhash test with guarded memory; it doesn't hurt 2023-01-09 10:47:15 +01:00
Frank Denis
1bd73c1a68 Add crypto_kdf_hkdf_sha{256,512}_extract_{init,update,final} 2023-01-08 22:16:34 +01:00
Frank Denis
24211d370a MSVC: apply patches from Conan to for debugging information 2023-01-05 19:01:01 +01:00
Frank Denis
337fba6c23 2023 2023-01-05 14:06:26 +01:00
Frank Denis
f842b157e0 Skip the misuse handler test when running benchmarks or wasm 2022-12-20 13:17:11 +01:00
Frank Denis
ab7c855fc4 wasm32-wasi.sh: match the number of iterations from build.zig 2022-12-20 08:30:59 +01:00
Frank Denis
0c60ecb3df iwasm requires precompilation to get decent speed 2022-12-19 12:34:32 +01:00
Frank Denis
415331e73b Mention that mlock() failing is not a hard error for sodium_malloc() 2022-12-19 12:12:05 +01:00
Frank Denis
3eb9e5a9a3 Bun: explicitly print the output of the wasm module to the console 2022-12-19 10:27:08 +01:00
Frank Denis
738eac1404 Bun requires an absolute path 2022-12-19 10:21:48 +01:00
Frank Denis
b584e537d3 Add support for Bun as a WebAssembly runtime 2022-12-19 10:14:56 +01:00
Frank Denis
58ae64d319 Node requires an async function to start wasm code 2022-12-18 21:36:35 +01:00
Frank Denis
a1f73b8cab Running tests with Node requires --experimental-wasm-bigint 2022-12-18 21:21:03 +01:00
Frank Denis
643bba3d27 Hide wasmedgec output 2022-12-18 21:06:44 +01:00
Frank Denis
95b72ea3c5 Remove unused MAX_MEMORY_TESTS constant 2022-12-17 21:47:35 +01:00
Frank Denis
ff001cadcb Add wazero to the list of tested wasm runtimes 2022-12-17 21:47:28 +01:00
Frank Denis
e0f6d836a3 Add the ability to convert tests into benchmarks 2022-12-17 21:36:51 +01:00
Frank Denis
fb01eda660 Don't built shared library for WASI 2022-12-17 20:17:50 +01:00
Frank Denis
1fe0149850 Update msys2 2022-12-16 17:28:59 +01:00
Frank Denis
c4a9f1b2af Add missing <stdint.h> includes 2022-12-13 20:33:09 +01:00
Frank Denis
01c237f1f0 packaging/nuget doesn't seem to be used any more 2022-12-12 00:56:38 +01:00
Frank Denis
2d3a21c6c7 Avoid memcmp() with len=0 2022-12-12 00:17:20 +01:00
Frank Denis
da6da4c3a1 Update the Android NDK 2022-12-12 00:07:47 +01:00
Frank Denis
1994ad93bd Sync the AESNI aes_gcm_decrypt_generic() impl with the ARM one 2022-12-11 23:47:46 +01:00
Frank Denis
4482067df9 Add a test for aes256gcm_decrypt with long inputs, make it pass 2022-12-11 23:44:50 +01:00
Frank Denis
ff480f17f0 Nits 2022-12-11 23:15:06 +01:00