Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

Commit 518fa2c

Browse files
author
Face Kapow
committed
Update to the latest stable libsodium
2 parents cfcc1fe + f01d7c1 commit 518fa2c

File tree

430 files changed

+22077
-14960
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

430 files changed

+22077
-14960
lines changed

deps/SConscript

Lines changed: 74 additions & 75 deletions
Large diffs are not rendered by default.

deps/libsodium/.gitignore

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1+
*.bc
12
*.cmake
23
*.dSYM
3-
*.exp
4+
*.done
45
*.final
56
*.gcda
67
*.gcno
8+
*.i
79
*.la
810
*.lo
911
*.log
1012
*.mem
1113
*.nexe
1214
*.o
1315
*.plist
16+
*.s
1417
*.scan
1518
*.sdf
1619
*.status
@@ -21,11 +24,16 @@
2124
.dirstamp
2225
.done
2326
.libs
27+
/bin/
28+
/obj/
2429
Build
2530
INSTALL
2631
Makefile
2732
Makefile.in
33+
Vagrantfile
2834
aclocal.m4
35+
android-toolchain
36+
android-toolchain-*
2937
autom4te.cache
3038
build
3139
compile
@@ -35,11 +43,25 @@ configure
3543
configure.lineno
3644
coverage.info
3745
depcomp
38-
android-toolchain
3946
install-sh
40-
libtool
47+
libsodium-*.tar.bz2
48+
libsodium-*.tar.gz
49+
libsodium-*.vcproj
50+
libsodium-*.vcproj.filters
51+
libsodium-*.vcxproj
52+
libsodium-*.vcxproj.filters
53+
libsodium-android-*
54+
libsodium-ios
55+
libsodium-js
56+
libsodium-js-*
57+
libsodium-nativeclient
58+
libsodium-nativeclient-*
59+
libsodium-osx
60+
libsodium-uninstalled.pc
61+
libsodium-win32
62+
libsodium-win64
4163
libsodium.pc
42-
libsodium-*
64+
libtool
4365
ltmain.sh
4466
m4/argz.m4
4567
m4/libtool.m4
@@ -50,17 +72,14 @@ m4/lt~obsolete.m4
5072
man/*.html
5173
man/Makefile.in
5274
missing
53-
src/curvecp/curvecpclient
54-
src/curvecp/curvecpmakekey
55-
src/curvecp/curvecpmessage
56-
src/curvecp/curvecpprintkey
57-
src/curvecp/curvecpserver
5875
src/libsodium/*.def
5976
src/libsodium/include/sodium/version.h
6077
stamp-*
61-
test/js.done
78+
test-driver
79+
test/default/browser
6280
test/default/*.res
6381
test/default/*.trs
82+
test/default/aead_aes256gcm
6483
test/default/aead_chacha20poly1305
6584
test/default/auth
6685
test/default/auth2
@@ -93,6 +112,7 @@ test/default/onetimeauth
93112
test/default/onetimeauth2
94113
test/default/onetimeauth7
95114
test/default/pwhash
115+
test/default/pwhash_scrypt
96116
test/default/pwhash_scrypt_ll
97117
test/default/randombytes
98118
test/default/scalarmult
@@ -118,10 +138,5 @@ test/default/stream2
118138
test/default/stream3
119139
test/default/stream4
120140
test/default/verify1
121-
test-driver
141+
test/js.done
122142
testing
123-
android-toolchain-*
124-
libsodium-android-*
125-
/bin/
126-
/obj/
127-
Vagrantfile

deps/libsodium/.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
sudo: false
2+
13
language: c
24

35
os:
@@ -14,10 +16,13 @@ before_script:
1416

1517
script:
1618
- ./configure --disable-dependency-tracking
19+
- >
20+
if [ "$TRAVIS_OS_NAME" = 'linux' -a "$CC" = 'gcc' ]; then make 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
1721
- make distcheck
18-
- make distclean
22+
- make distclean > /dev/null
1923
- ./configure --disable-dependency-tracking --enable-minimal
2024
- make distcheck
25+
- ( 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
2126

2227
env:
2328
global:

deps/libsodium/AUTHORS

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22
Designers
33
=========
44

5+
argon2 Alex Biryukov
6+
Daniel Dinu
7+
Dmitry Khovratovich
8+
59
blake2 Jean-Philippe Aumasson
610
Christian Winnerlein
711
Samuel Neves
812
Zooko Wilcox-O'Hearn
913

1014
chacha20 Daniel J. Bernstein
11-
salsa20
15+
16+
salsa20 Daniel J. Bernstein
1217

1318
chacha20poly1305 Adam Langley
1419

@@ -32,10 +37,17 @@ scrypt Colin Percival
3237
Implementors
3338
============
3439

40+
crypto_aead/aes256gcm/aesni Romain Dolbeau
41+
Frank Denis
42+
3543
crypto_aead/chacha20poly1305 Frank Denis
3644

45+
crypto_core/curve25519 Daniel J. Bernstein
46+
3747
crypto_box/curve25519xsalsa20poly1305 Daniel J. Bernstein
3848

49+
crypto_core/hchacha20 Frank Denis
50+
3951
crypto_core/hsalsa20 Daniel J. Bernstein
4052
crypto_core/salsa20
4153
crypto_core/salsa2012
@@ -53,6 +65,8 @@ crypto_scalarmult/curve25519/ref10 Daniel J. Bernstein
5365

5466
crypto_scalarmult/curve25519/donna_c64 Adam Langley
5567

68+
crypto_scalarmult/curve25519/sandy2x Tung Chou
69+
5670
crypto_secretbox/xsalsa20poly1305 Daniel J. Bernstein
5771

5872
crypto_sign/ed25519 Peter Schwabe
@@ -63,7 +77,9 @@ crypto_sign/ed25519 Peter Schwabe
6377

6478
crypto_stream/aes128ctr Peter Schwabe
6579

66-
crypto_stream/chacha20 Daniel J. Bernstein
80+
crypto_stream/chacha20/ref Daniel J. Bernstein
81+
82+
crypto_stream/chacha20/vec Ted Krovetz
6783

6884
crypto_stream/salsa20 Daniel J. Bernstein
6985
crypto_stream/salsa2012
@@ -78,7 +94,15 @@ crypto_generichash/blake2b Jean-Philippe Aumasson
7894
Samuel Neves
7995
Zooko Wilcox-O'Hearn
8096

81-
crypto_onetimeauth/poly1305/donna Andrew "floodyberry" Moon.
97+
crypto_onetimeauth/poly1305/donna Andrew "floodyberry" Moon
98+
99+
crypto_onetimeauth/poly1305/sse2 Andrew "floodyberry" Moon
100+
101+
crypto_pwhash/argon2 Samuel Neves
102+
Dmitry Khovratovich
103+
Jean-Philippe Aumasson
104+
Daniel Dinu
105+
Thomas Pornin
82106

83107
crypto_pwhash/scryptsalsa208sha256 Colin Percival
84108
Alexander Peslyak

deps/libsodium/ChangeLog

Lines changed: 97 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,109 @@
11

2-
* Version 1.0.4 (not released yet)
2+
* Version 1.0.10
3+
- This release only fixes a compilation issue reported with some older
4+
gcc versions. There are no functional changes over the previous release.
5+
6+
* Version 1.0.9
7+
- The Javascript target now includes a `--sumo` option to include all
8+
the symbols of the original C library.
9+
- A detached API was added to the ChaCha20-Poly1305 and AES256-GCM
10+
implementations.
11+
- The Argon2i password hashing function was added, and is accessible
12+
directly and through a new, high-level `crypto_pwhash` API. The scrypt
13+
function remains available as well.
14+
- A speed-record AVX2 implementation of BLAKE2b was added (thanks to
15+
Samuel Neves).
16+
- The library can now be compiled using C++Builder (thanks to @jcolli44)
17+
- Countermeasures for Ed25519 signatures malleability have been added
18+
to match the irtf-cfrg-eddsa draft (note that malleability is irrelevant to
19+
the standard definition of signature security). Signatures with a small-order
20+
`R` point are now also rejected.
21+
- Some implementations are now slightly faster when using the Clang
22+
compiler.
23+
- The HChaCha20 core function was implemented (`crypto_core_hchacha20()`).
24+
- No-op stubs were added for all AES256-GCM public functions even when
25+
compiled on non-Intel platforms.
26+
- `crypt_generichash_blake2b_statebytes()` was added.
27+
- New macros were added for the IETF variant of the ChaCha20-Poly1305
28+
construction.
29+
- The library can now be compiled on Minix.
30+
- HEASLR is now enabled on MinGW builds.
31+
32+
* Version 1.0.8
33+
- Handle the case where the CPU supports AVX, but we are running
34+
on an hypervisor with AVX disabled/not supported.
35+
- Faster (2x) scalarmult_base() when using the ref10 implementation.
36+
37+
* Version 1.0.7
38+
- More functions whose return value should be checked have been
39+
tagged with `__attribute__ ((warn_unused_result))`: `crypto_box_easy()`,
40+
`crypto_box_detached()`, `crypto_box_beforenm()`, `crypto_box()`, and
41+
`crypto_scalarmult()`.
42+
- Sandy2x, the fastest Curve25519 implementation ever, has been
43+
merged in, and is automatically used on CPUs supporting the AVX
44+
instructions set.
45+
- An SSE2 optimized implementation of Poly1305 was added, and is
46+
twice as fast as the portable one.
47+
- An SSSE3 optimized implementation of ChaCha20 was added, and is
48+
twice as fast as the portable one.
49+
- Faster `sodium_increment()` for common nonce sizes.
50+
- New helper functions have been added: `sodium_is_zero()` and
51+
`sodium_add()`.
52+
- `sodium_runtime_has_aesni()` now properly detects the CPU flag when
53+
compiled using Visual Studio.
54+
55+
* Version 1.0.6
56+
- Optimized implementations of Blake2 have been added for modern
57+
Intel platforms. `crypto_generichash()` is now faster than MD5 and SHA1
58+
implementations while being far more secure.
59+
- Functions for which the return value should be checked have been
60+
tagged with `__attribute__ ((warn_unused_result))`. This will
61+
intentionally break code compiled with `-Werror` that didn't bother
62+
checking critical return values.
63+
- The `crypto_sign_edwards25519sha512batch_*()` functions have been
64+
tagged as deprecated.
65+
- Undocumented symbols that were exported, but were only useful for
66+
internal purposes have been removed or made private:
67+
`sodium_runtime_get_cpu_features()`, the implementation-specific
68+
`crypto_onetimeauth_poly1305_donna()` symbols,
69+
`crypto_onetimeauth_poly1305_set_implementation()`,
70+
`crypto_onetimeauth_poly1305_implementation_name()` and
71+
`crypto_onetimeauth_pick_best_implementation()`.
72+
- `sodium_compare()` now works as documented, and compares numbers
73+
in little-endian format instead of behaving like `memcmp()`.
74+
- The previous changes should not break actual applications, but to be
75+
safe, the library version major was incremented.
76+
- `sodium_runtime_has_ssse3()` and `sodium_runtime_has_sse41()` have
77+
been added.
78+
- The library can now be compiled with the CompCert compiler.
79+
80+
* Version 1.0.5
81+
- Compilation issues on some platforms were fixed: missing alignment
82+
directives were added (required at least on RHEL-6/i386), a workaround
83+
for a VRP bug on gcc/armv7 was added, and the library can now be compiled
84+
with the SunPro compiler.
85+
- Javascript target: io.js is not supported any more. Use nodejs.
86+
87+
* Version 1.0.4
88+
- Support for AES256-GCM has been added. This requires
89+
a CPU with the aesni and pclmul extensions, and is accessible via the
90+
crypto_aead_aes256gcm_*() functions.
91+
- The Javascript target doesn't use eval() any more, so that the
92+
library can be used in Chrome packaged applications.
93+
- QNX and CloudABI are now supported.
94+
- Support for NaCl has finally been added.
395
- ChaCha20 with an extended (96 bit) nonce and a 32-bit counter has
496
been implemented as crypto_stream_chacha20_ietf(),
597
crypto_stream_chacha20_ietf_xor() and crypto_stream_chacha20_ietf_xor_ic().
698
An IETF-compatible version of ChaCha20Poly1305 is available as
799
crypto_aead_chacha20poly1305_ietf_npubbytes(),
8100
crypto_aead_chacha20poly1305_ietf_encrypt() and
9101
crypto_aead_chacha20poly1305_ietf_decrypt().
10-
- Sodium can now be used in Windows Store apps.
11102
- The sodium_increment() helper function has been added, to increment
12-
an arbitrary long number (such as a nonce).
103+
an arbitrary large number (such as a nonce).
104+
- The sodium_compare() helper function has been added, to compare
105+
arbitrary large numbers (such as nonces, in order to prevent replay
106+
attacks).
13107

14108
* Version 1.0.3
15109
- In addition to sodium_bin2hex(), sodium_hex2bin() is now a

deps/libsodium/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013-2015
2+
* Copyright (c) 2013-2016
33
* Frank Denis <j at pureftpd dot org>
44
*
55
* Permission to use, copy, modify, and/or distribute this software for any

deps/libsodium/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ SUBDIRS = \
1717

1818
pkgconfigdir = $(libdir)/pkgconfig
1919
pkgconfig_DATA = @[email protected]
20+
2021
DISTCLEANFILES = $(pkgconfig_DATA)
2122

deps/libsodium/README

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/libsodium/README.markdown

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[![Build Status](https://travis-ci.org/jedisct1/libsodium.png?branch=master)](https://travis-ci.org/jedisct1/libsodium?branch=master)
1+
[![Build Status](https://travis-ci.org/jedisct1/libsodium.svg?branch=master)](https://travis-ci.org/jedisct1/libsodium?branch=master)
2+
[![Windows build status](https://ci.appveyor.com/api/projects/status/fu8s2elx25il98hj?svg=true)](https://ci.appveyor.com/project/jedisct1/libsodium)
23
[![Coverity Scan Build Status](https://scan.coverity.com/projects/2397/badge.svg)](https://scan.coverity.com/projects/2397)
34

45
![libsodium](https://raw.github.com/jedisct1/libsodium/master/logo.png)
@@ -22,7 +23,16 @@ including Windows (with MingW or Visual Studio, x86 and x64), iOS and Android.
2223
The documentation is a work-in-progress, and is being written using
2324
Gitbook:
2425

25-
[libsodium documentation](https://download.libsodium.org/doc/)
26+
* [libsodium documentation](https://download.libsodium.org/doc/) -
27+
online, requires Javascript.
28+
* [offline documentation](https://www.gitbook.com/book/jedisct1/libsodium/details)
29+
in PDF, MOBI and ePUB formats.
30+
31+
## Integrity Checking
32+
33+
The integrity checking instructions (including the signing key for libsodium)
34+
are available in the [installation](https://download.libsodium.org/doc/installation/index.html#integrity-checking)
35+
section of the documentation.
2636

2737
## Community
2838

deps/libsodium/THANKS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Chris Rebert (@cvrebert)
1212
Colm MacCárthaigh (@colmmacc)
1313
Donald Stufft (@dstufft)
1414
Douglas Campos (@qmx)
15+
Drew Crawford (@drewcrawford)
1516
Eric Dong (@quantum1423)
1617
Eric Voskuil (@evoskuil)
1718
Frank Siebenlist (@franks42)
@@ -28,9 +29,11 @@ Michael Gorlick (@mgorlick)
2829
Michael Gregorowicz (@mgregoro)
2930
Omar Ayub (@electricFeel)
3031
Pedro Paixao (@paixaop)
32+
Project ArteMisc (@artemisc)
3133
Ruben De Visscher (@rubendv)
3234
Rudolf Von Krugstein (@rudolfvonkrugstein)
3335
Samuel Neves (@sneves)
36+
Scott Arciszewski (@paragonie-scott)
3437
Stefan Marsiske
3538
Stephan Touset (@stouset)
3639
Steve Gibson (@sggrc)

0 commit comments

Comments
 (0)