Skip to content

Commit

Permalink
1.0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed May 30, 2019
1 parent 575babb commit 940ef42
Show file tree
Hide file tree
Showing 90 changed files with 2,442 additions and 1,270 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ libsodium-nativeclient
libsodium-nativeclient-*
libsodium-osx
libsodium-uninstalled.pc
libsodium-wasm32-wasi
libsodium-win32
libsodium-win64
libsodium.pc
Expand Down Expand Up @@ -108,6 +109,7 @@ test/default/core4
test/default/core5
test/default/core6
test/default/core_ed25519
test/default/core_ristretto255
test/default/ed25519_convert
test/default/generichash
test/default/generichash2
Expand All @@ -134,6 +136,7 @@ test/default/scalarmult6
test/default/scalarmult7
test/default/scalarmult8
test/default/scalarmult_ed25519
test/default/scalarmult_ristretto255
test/default/secretbox
test/default/secretbox2
test/default/secretbox7
Expand Down
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ compiler:

install:
- ./autogen.sh
- env CC=tcc CFLAGS='-w' ./configure --prefix=/tmp --disable-dependency-tracking --disable-shared || cat config.log
- env CC=tcc CFLAGS='-w' CPPFLAGS="-DDEV_MODE=1" ./configure --prefix=/tmp --disable-dependency-tracking --disable-shared || cat config.log
- make -j $(nproc) && make check && make install
- env CC=tcc CPPFLAGS='-I/tmp/include' LDFLAGS='-L/tmp/lib' LD_LIBRARY_PATH='/tmp/lib' ./test/constcheck.sh
- make uninstall
- make distclean

script:
- ./configure --disable-dependency-tracking
- env CPPFLAGS="-DDEV_MODE=1" ./configure --disable-dependency-tracking
- if [ "$TRAVIS_OS_NAME" = 'linux' -a "$CC" = 'gcc' ]; then make -j $(nproc) CFLAGS='-g0' > /dev/null && cp src/libsodium/.libs/libsodium.so lib.so && make clean > /dev/null && make CFLAGS='-g0' CPPFLAGS='-DSODIUM_C99\(X\)=' > /dev/null && cp src/libsodium/.libs/libsodium.so lib-oldc.so && cmp lib.so lib-oldc.so && echo No binary changes && make clean > /dev/null ; fi
- make distcheck
- make distclean > /dev/null
- ./configure --disable-dependency-tracking --enable-minimal
- CPPFLAGS="-DDEV_MODE=1" ./configure --disable-dependency-tracking --enable-minimal
- make -j $(nproc)
- make check
- ( echo '#include <sodium.h>' ; echo 'int main(void) { return sodium_init(); }' ) > /tmp/main.c && gcc -Isrc/libsodium/include -Isrc/libsodium/include/sodium $(find src -name '*.c' -o -name '*.S') /tmp/main.c
- make distclean > /dev/null

after_success:
- ./configure --disable-dependency-tracking --host=powerpc-linux-gnu
- CPPFLAGS="-DDEV_MODE=1" ./configure --disable-dependency-tracking --host=powerpc-linux-gnu
- make -j $(nproc)
- env QEMU_LD_PREFIX=/usr/powerpc-linux-gnu make check
- make clean > /dev/null
Expand Down
10 changes: 10 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ ed25519 Daniel J. Bernstein

poly1305 Daniel J. Bernstein

ristretto Mike Hamburg
Henry de Valence
Jack Grigg
George Tankersley
Filippo Valsorda
Isis Lovecruft

salsa20 Daniel J. Bernstein

scrypt Colin Percival
Expand Down Expand Up @@ -56,6 +63,7 @@ crypto_box/curve25519xchacha20poly1305 Frank Denis

crypto_core/ed25519 Daniel J. Bernstein
Adam Langley
Frank Denis

crypto_core/hchacha20 Frank Denis

Expand Down Expand Up @@ -93,6 +101,8 @@ crypto_scalarmult/curve25519/sandy2x Tung Chou

crypto_scalarmult/ed25519 Frank Denis

crypto_scalarmult/ristretto255 Frank Denis

crypto_secretbox/xsalsa20poly1305 Daniel J. Bernstein

crypto_secretbox/xchacha20poly1305 Frank Denis
Expand Down
29 changes: 29 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@

* Version 1.0.18
- The Enterprise versions of Visual Studio are now supported.
- Visual Studio 2019 is now supported.
- 32-bit binaries for Visual Studio 2010 are now provided.
- A test that didn't work properly on Linux systems with overcommit
memory turned on has been removed. This fixes Ansible builds.
- Emscripten: `print` and `printErr` functions are overridden to send
errors to the console, if there is one.
- Emscripten: `UTF8ToString()` is now exported since `Pointer_stringify()`
has been deprecated.
- Libsodium version detection has been fixed in the CMake recipe.
- Generic hashing got a 10% speedup on AVX2.
- New target: WebAssembly/WASI (compile with `dist-builds/wasm32-wasi.sh`).
- New functions to map a hash to an edwards25519 point or get a random point:
`core_ed25519_from_hash()` and `core_ed25519_random()`.
- `crypto_core_ed25519_scalar_mul()` has been implemented for `scalar*scalar`
`(mod L)` multiplication.
- Support for the Ristretto group has been implemented, for compatibility
with wasm-crypto.
- Improvements have been made to the test suite.
- Portability improvements has been made.
- `getentropy()` is now used on systems providing this system call.
- `randombytes_salsa20 has been renamed to `randombytes_internal`.
- Support for (p)nacl has been removed.
- Most `((nonnull))` attributes have been relaxed to allow 0-length inputs
to be `NULL`.
- The `-ftree-vectorize` and `-ftree-slp-vectorize` compiler switches are
now used, if available, for optimized builds.

* Version 1.0.17
- Bug fix: `sodium_pad()` didn't properly support block sizes >= 256 bytes.
- JS/WebAssembly: some old iOS versions can't instantiate the WebAssembly
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.0.17.{build}
version: 1.0.18.{build}

os: Visual Studio 2017

Expand Down
27 changes: 27 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,33 @@ trigger:
pr: none

jobs:
- job: "wasi"
pool:
vmImage: "ubuntu-16.04"
steps:
- script: |
sudo apt-get install build-essential curl cmake
displayName: Install system packages
- script: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
git clone --recursive https://github.com/wasmerio/wasmer.git
(cd wasmer && cargo install --path .)
displayName: Install wasmer
- script: |
curl -sL -o wasi-sdk.deb https://github.com/CraneStation/wasi-sdk/releases/download/wasi-sdk-5/wasi-sdk_5.0_amd64.deb
sudo dpkg -i wasi-sdk.deb && rm -f wasi-sdk.deb
sudo ln -s /opt/wasi-sdk/share/*sysroot* /opt/wasi-sysroot
displayName: Install the WASI SDK
- script: |
env PATH=/opt/wasi-sdk/bin:${HOME}/.cargo/bin:$PATH dist-build/wasm32-wasi.sh
displayName: Compile libsodium
- task: PublishBuildArtifacts@1
condition: not(canceled())
inputs:
pathToPublish: libsodium-wasm32-wasi
artifactName: libsodium-wasm32-wasi

- job: "windows"
pool:
vmImage: "windows-2019"
Expand Down
4 changes: 2 additions & 2 deletions builds/msvc/resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include "windows.h"

//specify the version numbers for the dll's
#define LIBSODIUM_VERSION_STRING "1.0.17.0"
#define LIBSODIUM_VERSION_BIN 1,0,17,0
#define LIBSODIUM_VERSION_STRING "1.0.18.0"
#define LIBSODIUM_VERSION_BIN 1,0,18,0

//specify the product name for the dlls based on the platform we are compiling for
#if defined(x64)
Expand Down
4 changes: 2 additions & 2 deletions builds/msvc/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

#include "export.h"

#define SODIUM_VERSION_STRING "1.0.17"
#define SODIUM_VERSION_STRING "1.0.18"

#define SODIUM_LIBRARY_VERSION_MAJOR 10
#define SODIUM_LIBRARY_VERSION_MINOR 2
#define SODIUM_LIBRARY_VERSION_MINOR 3

#ifdef __cplusplus
extern "C" {
Expand Down
10 changes: 6 additions & 4 deletions builds/msvc/vs2010/libsodium/libsodium.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
<ClCompile Include="..\..\..\..\src\libsodium\crypto_shorthash\siphash24\ref\shorthash_siphashx24_ref.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_shorthash\siphash24\ref\shorthash_siphash24_ref.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_scalarmult\crypto_scalarmult.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_scalarmult\ristretto255\ref10\scalarmult_ristretto255_ref10.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_scalarmult\ed25519\ref10\scalarmult_ed25519_ref10.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_scalarmult\curve25519\scalarmult_curve25519.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_scalarmult\curve25519\sandy2x\curve25519_sandy2x.c" />
Expand All @@ -138,8 +139,7 @@
<ClCompile Include="..\..\..\..\src\libsodium\crypto_onetimeauth\poly1305\sse2\poly1305_sse2.c" />
<ClCompile Include="..\..\..\..\src\libsodium\randombytes\randombytes.c" />
<ClCompile Include="..\..\..\..\src\libsodium\randombytes\sysrandom\randombytes_sysrandom.c" />
<ClCompile Include="..\..\..\..\src\libsodium\randombytes\salsa20\randombytes_salsa20_random.c" />
<ClCompile Include="..\..\..\..\src\libsodium\randombytes\nativeclient\randombytes_nativeclient.c" />
<ClCompile Include="..\..\..\..\src\libsodium\randombytes\internal\randombytes_internal_random.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_box\crypto_box_easy.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_box\crypto_box_seal.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_box\crypto_box.c" />
Expand Down Expand Up @@ -181,6 +181,7 @@
<ClCompile Include="..\..\..\..\src\libsodium\crypto_core\hsalsa20\core_hsalsa20.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_core\hsalsa20\ref2\core_hsalsa20_ref2.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_core\ed25519\core_ed25519.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_core\ed25519\core_ristretto255.c" />
<ClCompile Include="..\..\..\..\src\libsodium\crypto_core\ed25519\ref10\ed25519_ref10.c" />
</ItemGroup>
<ItemGroup>
Expand All @@ -200,7 +201,6 @@
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_hash_sha512.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\core.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\export.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\randombytes_salsa20_random.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa20.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_shorthash_siphash24.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\randombytes.h" />
Expand All @@ -210,13 +210,15 @@
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_xchacha20poly1305.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_stream_salsa20.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_onetimeauth_poly1305.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_scalarmult_ristretto255.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kx.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_hash.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_sign.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kdf.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_auth_hmacsha256.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_box.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_verify_32.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_ristretto255.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_stream_xchacha20.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa208.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_auth_hmacsha512256.h" />
Expand All @@ -227,7 +229,6 @@
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_aead_aes256gcm.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa2012.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\randombytes_nativeclient.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_scalarmult.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_pwhash.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_verify_16.h" />
Expand All @@ -246,6 +247,7 @@
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_box_curve25519xchacha20poly1305.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_ed25519.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_pwhash_argon2i.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\randombytes_internal_random.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_generichash.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xsalsa20poly1305.h" />
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox.h" />
Expand Down
41 changes: 25 additions & 16 deletions builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@
<ClCompile Include="..\..\..\..\src\libsodium\crypto_scalarmult\crypto_scalarmult.c">
<Filter>crypto_scalarmult</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\libsodium\crypto_scalarmult\ristretto255\ref10\scalarmult_ristretto255_ref10.c">
<Filter>crypto_scalarmult\ristretto255\ref10</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\libsodium\crypto_scalarmult\ed25519\ref10\scalarmult_ed25519_ref10.c">
<Filter>crypto_scalarmult\ed25519\ref10</Filter>
</ClCompile>
Expand Down Expand Up @@ -207,11 +210,8 @@
<ClCompile Include="..\..\..\..\src\libsodium\randombytes\sysrandom\randombytes_sysrandom.c">
<Filter>randombytes\sysrandom</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\libsodium\randombytes\salsa20\randombytes_salsa20_random.c">
<Filter>randombytes\salsa20</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\libsodium\randombytes\nativeclient\randombytes_nativeclient.c">
<Filter>randombytes\nativeclient</Filter>
<ClCompile Include="..\..\..\..\src\libsodium\randombytes\internal\randombytes_internal_random.c">
<Filter>randombytes\internal</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\libsodium\crypto_box\crypto_box_easy.c">
<Filter>crypto_box</Filter>
Expand Down Expand Up @@ -336,6 +336,9 @@
<ClCompile Include="..\..\..\..\src\libsodium\crypto_core\ed25519\core_ed25519.c">
<Filter>crypto_core\ed25519</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\libsodium\crypto_core\ed25519\core_ristretto255.c">
<Filter>crypto_core\ed25519</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\libsodium\crypto_core\ed25519\ref10\ed25519_ref10.c">
<Filter>crypto_core\ed25519\ref10</Filter>
</ClCompile>
Expand Down Expand Up @@ -389,9 +392,6 @@
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\export.h">
<Filter>include\sodium</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\randombytes_salsa20_random.h">
<Filter>include\sodium</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_salsa20.h">
<Filter>include\sodium</Filter>
</ClInclude>
Expand Down Expand Up @@ -419,6 +419,9 @@
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_onetimeauth_poly1305.h">
<Filter>include\sodium</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_scalarmult_ristretto255.h">
<Filter>include\sodium</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_kx.h">
<Filter>include\sodium</Filter>
</ClInclude>
Expand All @@ -440,6 +443,9 @@
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_verify_32.h">
<Filter>include\sodium</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_core_ristretto255.h">
<Filter>include\sodium</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_stream_xchacha20.h">
<Filter>include\sodium</Filter>
</ClInclude>
Expand Down Expand Up @@ -470,9 +476,6 @@
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_secretbox_xchacha20poly1305.h">
<Filter>include\sodium</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\randombytes_nativeclient.h">
<Filter>include\sodium</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_scalarmult.h">
<Filter>include\sodium</Filter>
</ClInclude>
Expand Down Expand Up @@ -527,6 +530,9 @@
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_pwhash_argon2i.h">
<Filter>include\sodium</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\randombytes_internal_random.h">
<Filter>include\sodium</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\src\libsodium\include\sodium\crypto_generichash.h">
<Filter>include\sodium</Filter>
</ClInclude>
Expand Down Expand Up @@ -880,6 +886,12 @@
<Filter Include="crypto_scalarmult\ed25519\ref10">
<UniqueIdentifier>{834d4827-81e4-3de3-baa1-a216763f11d6}</UniqueIdentifier>
</Filter>
<Filter Include="crypto_scalarmult\ristretto255">
<UniqueIdentifier>{52bf28eb-7ffd-399a-be35-0df3e8e99c15}</UniqueIdentifier>
</Filter>
<Filter Include="crypto_scalarmult\ristretto255\ref10">
<UniqueIdentifier>{39cc576f-4b54-3d71-b14c-27445bc4b138}</UniqueIdentifier>
</Filter>
<Filter Include="crypto_secretbox">
<UniqueIdentifier>{b9b02bee-5c1f-36d2-b97d-983f865a4cc6}</UniqueIdentifier>
</Filter>
Expand Down Expand Up @@ -973,11 +985,8 @@
<Filter Include="randombytes">
<UniqueIdentifier>{ef090484-4db4-3dc2-aca7-c59bab1db23b}</UniqueIdentifier>
</Filter>
<Filter Include="randombytes\nativeclient">
<UniqueIdentifier>{fd98b90f-ba7b-3aa0-a505-935c82ca8023}</UniqueIdentifier>
</Filter>
<Filter Include="randombytes\salsa20">
<UniqueIdentifier>{7450ec6e-c197-3798-9434-1b46c8c4d9af}</UniqueIdentifier>
<Filter Include="randombytes\internal">
<UniqueIdentifier>{14c126fd-bb91-37ea-b807-b60c386be601}</UniqueIdentifier>
</Filter>
<Filter Include="randombytes\sysrandom">
<UniqueIdentifier>{ac56c38f-7e17-3b79-bf47-58e9476b3b89}</UniqueIdentifier>
Expand Down
Loading

0 comments on commit 940ef42

Please sign in to comment.