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

667 Commits

Author SHA1 Message Date
Frank Denis
7389bf7f29 libtool update 2022-04-03 00:03:17 +02:00
Frank Denis
89b2d420d4 Lucet has reached EOL 2022-01-22 23:36:35 +01:00
Frank Denis
aa099f5e82 Revert "wasm-opt: use --strip-debug"
This reverts commit 0c2fb123f7.
2021-11-18 14:15:26 +01:00
Frank Denis
0c2fb123f7 wasm-opt: use --strip-debug 2021-11-17 21:03:25 +01:00
Jørgen P. Tjernø
100ccb452d Portability improvements (#1105)
* Move `raise` code to be behind an autoconf check

This moves the call to `raise` behind a `HAVE_RAISE` autoconf check,
in addition to `__wasm__`. This is intended to help porting to
other platforms that don't support `raise` (e.g. modern game consoles).

* Add autoconf check for `sysconf`

Only try to invoke `sysconf` if the target platform supports it, and
don't warn about unknown page size if `PAGE_SIZE` was defined. Add an
include for `sys/param.h` to increase likelihood of finding `PAGE_SIZE`.
This is intended to help porting to other platforms that don't support
`sysconf` (e.g. modern game consoles) that have a fixed hardware page
size.

* Don't try to use raise & sysconf in a WASI environment

Co-authored-by: Frank Denis <124872+jedisct1@users.noreply.github.com>
2021-10-09 18:39:02 +02:00
Frank Denis
b5b62722b7 Autoconf update & regen 2021-05-22 12:21:15 +02:00
Frank Denis
7168944f16 Update some autoconf definitions 2021-04-08 10:57:21 +02:00
Frank Denis
0389b96972 Regen autoconf files 2021-04-08 10:12:12 +02:00
Frank Denis
b5753e3fae Add some more base64 decoding tests 2021-03-20 00:08:54 +01:00
Frank Denis
dc2d459cc5 Regen autoconf 2021-03-15 11:04:51 +01:00
Frank Denis
312bb605ee Move lucet down 2021-03-10 18:46:07 +01:00
Tobias Nießen
fcff8e9cee test: fix two error messages (#1034) 2021-02-24 23:56:35 +01:00
Frank Denis
3d807d9205 wasm bench: make lucet performance significantly better
By default, lucetc generates code with explicit bound checking,
even though the runtime has guard pages.

Elision only happens with --reserved-size=4GiB
2021-02-24 21:52:44 +01:00
Frank Denis
d73fd3903f Remove unused hash2.exp 2021-02-21 00:52:29 +01:00
Frank Denis
88a591050e Add support for Node without wasmer-js 2021-02-20 21:24:29 +01:00
Frank Denis
25316cce5a Add support for SSVM 2021-02-20 20:55:52 +01:00
Frank Denis
044c3ef3f2 WASM benchmarks: add lucet and WAMR, update wasmtime & wasmer 2021-02-19 23:11:29 +01:00
Frank Denis
afaf3aa1d8 Braces 2021-02-13 12:10:21 +01:00
Frank Denis
a1e944cbc6 Put <meta> tag outside <style>
Fixes https://github.com/jedisct1/libsodium.js/pull/267
2021-02-07 13:57:31 +01:00
Frank Denis
04b44a4df4 Automake update 2020-11-24 22:55:50 +01:00
Frank Denis
6cf5e97bf6 Remove unused variable in tests
Fixes #998
2020-09-29 11:05:45 +02:00
Frank Denis
9b024b50b1 box_seal test: don't check empty messages
Fixes #974
2020-06-22 18:31:46 +02:00
Frank Denis
2ea21b96e0 Don't even include signal.h on WASI
Since version 11, wasi-sysroot doesn't ignore it but spits out
an error instead.
2020-06-04 10:53:49 +02:00
Frank Denis
824c8cdf69 Backport wavm support 2020-06-04 10:53:49 +02:00
Frank Denis
c35437c2e5 Add extra box_seal() tests 2020-05-21 18:38:34 +02:00
Frank Denis
2952a15bfe Additional sc25519 tests 2020-05-14 12:40:59 +02:00
Frank Denis
088e78cc58 Simplify scalarmult{2,5} tests 2020-04-26 20:07:29 +02:00
Frank Denis
8cd121c989 Add a scalarmult test to show that the high bit is ignored 2020-04-26 20:07:24 +02:00
Frank Denis
5fa3afca7a One more test vector cannot hurt 2020-04-25 12:26:45 +02:00
Emil Bay
73aa0ebad2 fix crypto_stream_chacha20_ietf tests (#946) 2020-04-17 11:01:23 +02:00
Frank Denis
3b689a6ab4 New automake version 2020-03-22 22:56:19 +01:00
Frank Denis
b6e61122a4 Add wasm3 to the set of supported WebAssembly runtimes
Also add wasmer-js
2020-02-04 19:54:59 +01:00
Frank Denis
f20e6fdad2 Temporarily remove support for Lucet
Lucet doesn't work on MacOS any more, so testing it has become difficult.
2020-02-04 19:33:13 +01:00
Frank Denis
1d4017df58 Regen 2019-11-11 01:08:03 +01:00
Frank Denis
bfa866e2f0 Deprecate crypto_core_ed25519_from_hash() 2019-10-13 10:03:48 +02:00
Frank Denis
dbab49d48d Try Lucet as a last option, after wasmer, due to its unstable interface 2019-10-11 17:32:22 +02:00
Frank Denis
e06c260d0e Lucet removed the "fast" optimization level
We may drop Lucet support entirely until the interface gets more stable
2019-10-11 16:36:27 +02:00
Frank Denis
80807b30c5 WASI can't read its own writes without an explicit fflush() 2019-09-13 11:17:55 +02:00
Frank Denis
612d60f54a lucetc-wasi requires units with --max-heap-size 2019-07-09 20:42:46 +02:00
Frank Denis
940ef42797 1.0.18 2019-05-30 21:57:51 +02:00
Frank Denis
39083793f5 Remove an unreliable scrypt test
Fixes #837
2019-05-21 13:15:37 +02:00
Ilya Maykov
6bece9c8c4 Relax most __attribute__ ((nonnull)) to allow 0-length inputs to be NULL.
Justifications:
- crypto_(auth|hash|generichash|onetimeauth|shorthash)*:
  it's legal to hash or HMAC a 0-length message
- crypto_box*: it's legal to encrypt a 0-length message
- crypto_sign*: it's legal to sign a 0-length message
- utils:
  comparing two 0-length byte arrays is legal
  memzero on a 0-length byte array is a no-op
  converting an empty hex string to binary results in an empty binary string
  converting an empty binary string to hex results in an empty hex string
  converting an empty b64 string to binary results in an empty binary string
  converting an empty binary string to b64 results in an empty b64 string
  sodium_add / sodium_sub on zero-length arrays is a no-op

For the functions declared in utils.h, I moved the logic into private functions that
have the __attribute__ ((nonnull)) check, but they are only called when the
corresponding length argument is non-0. I didn't do this for the hash/box/sign
functions since it would have been a lot more work and quite a large refactor.

Only memset() may have issues with a zero length.

Fix tests, use guard page instead of NULL because of Wasm
2019-04-26 15:36:58 +02:00
Frank Denis
be8cfedea8 Make the stream and stream2 test object code 1000x smaller 2019-04-23 10:17:38 +02:00
Frank Denis
0f155d8736 Be positive 2019-04-23 10:17:33 +02:00
Frank Denis
fb29bda055 Just use some test vectors around the counter overflow 2019-04-23 10:17:25 +02:00
Frank Denis
d57cde5448 Remove useless tests, add more meaningful ones. 2019-04-23 10:17:10 +02:00
Frank Denis
cb5f937ca7 Additional salsa20 tests 2019-04-23 10:16:54 +02:00
Frank Denis
2e2de69de3 constcheck: ignore deprecated declarations 2019-04-22 19:53:26 +02:00
Luca Boccassi
ecdcf55173 Add -pthread to pkgconfig's Libs.private if enabled
Allows static builds to correctly inherit the pthread dependency when
used with pkg-config --static --libs libsodium

AC_SUBST doesn't require explicit values

Regen autoconf

Fixes #800
2019-01-15 00:29:20 +01:00
Frank Denis
10ac185647 Merge branch 'master' into stable-1.0.17
* master: (190 commits)
  fileinput is not used any more
  2019
  local-dynamic is enough
  Set tls-model only if TLS is supported
  Enable -ftls-model=global-dynamic if available
  Set nonce in randombytes_salsa20_random_stir() instead of random_init()
  Bump .NET version examples
  Add another test
  Avoid memory leak and overflow in addition test
  Avoid partial array initialization
  Bump SODIUM_LIBRARY_VERSION_MINOR
  More tests
  More tests
  Improve clarity
  ALLOW_MEMORY_GROWTH is now enabled
  AVX512 detection has been improved
  Add a conditional to enable retpoline support
  must -> should
  Add comments, avoid implicit array initialization
  Add comments
  ...
2019-01-06 15:43:38 +01:00