Jim Patterson
1fd6a4bfc2
Replace `which` with `command` for portability ( #542 )
The `which` command is not part of the posix standard and not available
in some environments. The `command` command is part of the posix
standard and well supported.
See https://unix.stackexchange.com/q/85249 for a discussion about the
use of `command` instead of `which`.
If a system had `libtool` but not `which`, the build process would issue
an erroneous error stating:
libtool is required, but wasn't found on this system
Switching to `command` corrects this problem.
7 years ago
Frank Denis
3e85167657
Fix `crypto_pwhash_argon2i_str_verify()` and its tests after `errno` changes
7 years ago
Emil Bay
94760400a6
Add crypto_pwhash_MISMATCH errno ( #541 )
* Add crypto_pwhash_MISMATCH errno
* Use EINVAL for invalid password
* Only set errno on mismatch
7 years ago
Frank Denis
4809639ae1
box_easy2 test: increase the minimum test size
7 years ago
Frank Denis
d4dbf0cc4f
Import preliminary compilation script for webassembly
Thanks to @facekapow
This still needs quite a bit of work, so don't add to the distfiles yet
7 years ago
Frank Denis
849a35bd82
+ crypto_kx_*() API
This doesn't include a full key exchange API yet.
7 years ago
Frank Denis
88c77d6aa7
Do not use a zero nonce in randombytes_buf_deterministic()
This can mitigate implications of reusing the same key across different
functions.
7 years ago
Frank Denis
8679e717db
+ sodium_library_minimal() and SODIUM_LIBRARY_MINIMAL
7 years ago
Frank Denis
707f4c8e08
Add ed25519ph
7 years ago
Frank Denis
2ae516079b
chacha20 can only be tested with a 32-bit ic
7 years ago
Frank Denis
588c03c536
C++ compat
7 years ago
Frank Denis
e46bc4c5dd
Add tests for chacha&salsa with a counter around 2^32
7 years ago
Frank DENIS
36c038ccd1
Additional ChaCha20/Salsa20 tests with a short output length
7 years ago
Frank Denis
617862eb5a
Make aead_xchacha20_poly1305 a first-class citizen
7 years ago
Frank Denis
ff931a9ab5
Remove useless assignments
7 years ago
Frank Denis
3cd883d33e
Remove debugging leftover in tests
7 years ago
Frank Denis
c0c645da45
Test crypto_kdf constants, add _PRIMITIVE
7 years ago
Frank Denis
d203d87d2f
const static -> static const
7 years ago
Frank Denis
d860121ebc
Fix previous
7 years ago
Frank Denis
eb1c92d2ec
Reformat the scrypt tests
7 years ago
ka7
76e87fb547
spelling fixes (touches code in tests) ( #494 )
7 years ago
Frank Denis
0a5a40de5b
Trim spaces
7 years ago
Frank Denis
8fb5918fb6
Add a test for siphashx24
7 years ago
Frank Denis
7bbeba5723
Indent
7 years ago
Frank Denis
4a958f9e9e
Indent
7 years ago
Frank Denis
f4da7fe314
Indent
7 years ago
Frank Denis
3d96ea4b6a
Indent
7 years ago
Frank Denis
4037465983
Indent
7 years ago
Frank Denis
d5bf3954d6
Indentx
7 years ago
Frank Denis
cac2dde218
Indent
7 years ago
Frank Denis
cadee98e13
Indentx
7 years ago
Frank Denis
efbc49f100
Indent
7 years ago
Frank Denis
434e3691ba
Indent
7 years ago
Frank Denis
e747cec677
Indent
7 years ago
Frank Denis
3cce789304
Indent
7 years ago
Frank Denis
db7c0e1956
Indent
7 years ago
Frank Denis
c8f6121429
Indent
7 years ago
Frank Denis
20b12aa9d4
Indent
7 years ago
Frank Denis
5351efb122
Indentx
7 years ago
Frank Denis
dd9d8e283b
Indent
7 years ago
Frank Denis
0877b14c68
Correct array size check in xchacha20 test
7 years ago
Frank Denis
5957e2c735
C++ compat
7 years ago
Frank Denis
8af252bf87
use crypto_*_keygen() in tests
7 years ago
Frank Denis
7e5d64834c
untab
7 years ago
Frank Denis
7f7e7235c5
Add a keygen function to all the primitives
7 years ago
Frank Denis
93d02019da
Trigger randombytes_seedbytes()
7 years ago
Frank Denis
cafb0a695b
Add randombytes_buf_deterministic()
7 years ago
Frank Denis
70c2796ae5
+ crypto_kdf high-level API
This is a common need, and people end up reimplementing HKDF.
So, add a crypto_kdf() API similiar to libhydrogen's. The later has a
higher limit for the output length using BLAKE2X if required.
We can implement the same strategy later in libsodium if needed.
7 years ago
Frank Denis
e0150faf56
Always zero the argon2 output buffer prior to doing anything
This is consistent with what we are doing with scrypt.
On error/misuse, the buffer is zeroed; this may prevent bugs with
reused/invalid buffers.
7 years ago
Frank Denis
2c6fb87708
Set crypto_pwhash_scryptsalsa208sha256_BYTES_MIN to 128 bits
7 years ago