Frank Denis
a72abb0ae1
Add missing randombytes.h inclusion in aead_aegis256.c
2019-12-04 21:07:33 +01:00
Frank Denis
066150a94d
Swapped aegis256_is_available implementations
2019-10-31 09:23:33 +01:00
Frank Denis
0f8e034f97
Reorganize aead_aegis256 a bit
2019-10-23 20:03:23 +02:00
Frank Denis
728b7ef237
Add libarmcrypto.la
2019-10-23 19:30:48 +02:00
Frank Denis
c8b6906c60
has_armcrypto_aes -> has_armcrypto
2019-10-23 19:07:33 +02:00
Frank Denis
c9d80901bf
__ARM_NEON is enough
2019-10-23 19:02:54 +02:00
Frank Denis
a8dc93192d
On Apple devices, the ARM64_V8 subtype always has the crypto extensions
2019-10-23 17:59:17 +02:00
Frank Denis
dd5fbb632b
Check for AT_HWCAP2 instead of AT_HWCAP where it's used
2019-10-22 23:24:16 +02:00
Frank Denis
1910ca83d8
Detect NEON and ARMCRYPTO on ARM32
...
Which doesn't mean that the compiler will support these opcodes, so
we need to autoconf magic as well.
2019-10-22 23:20:15 +02:00
Frank Denis
456a57f235
__arm__ => __ARM_ARCH
2019-10-22 22:59:45 +02:00
Frank Denis
acaed459ce
Add ARM NEON and AES runtime checks
2019-10-22 22:51:58 +02:00
Frank Denis
9e22cb4ad2
Nits
2019-10-21 15:14:13 +02:00
Frank Denis
111f99a2d4
Nits. No binary code change.
2019-10-21 14:52:20 +02:00
Frank Denis
8a76789de3
Add required headers for aegis256_armcrypto
2019-10-21 14:23:15 +02:00
Adrien Gallouët
fd5bc21b60
Rework NEON version of AEGIS256
...
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr >
2019-10-21 10:56:09 +00:00
Adrien Gallouët
4542a04e1d
Indent
...
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr >
2019-10-12 06:54:58 +00:00
Frank Denis
ef89aea64e
Merge pull request #884 from isislovecruft/feature/scalar-succeed-fast
...
Optimisation to succeed fast when checking signature scalar is reduced.
2019-10-12 02:19:42 +02:00
Frank Denis
6abc6c292a
Compile only the NEON version of AEGIS256 on relevant platforms
2019-10-12 02:18:36 +02:00
Isis Lovecruft
6136871607
Optimisation to succeed fast when checking signature scalar is reduced.
...
This provides a minor optimisation for ed25519 signature verification, when used
without the -DED25519_COMPAT feature, to strictly check for a fully reduced
scalar, `s`, component in variable time by first checking that the most
significant *four* bits are unset, and only if any of them are set proceed to
the `sc25519_is_canonical` check which performs the full reduction. This should
result in succeeding fast for the check on roughly half of all well-formed,
canonicalised signatures.
This is safely backwards compatible with the previous implementation
of strict checking for signature scalars.
2019-10-11 21:58:15 +00:00
Frank Denis
e1bff2608f
Merge branch 'master' of github.com:jedisct1/libsodium
...
* 'master' of github.com:jedisct1/libsodium:
Add -S for curl
randombytes: make the emscripten version consistent with others
2019-09-25 17:16:43 +02:00
Frank Denis
2f915846ff
randombytes: make the emscripten version consistent with others
2019-09-24 16:56:49 +02:00
Frank Denis
44b4526309
Add ARM implementation of aegis256 - Not connected to builds yet
2019-09-16 14:52:10 +02:00
Frank Denis
5990dc00d0
Fix crypto_aead_aegis256_MESSAGEBYTES_MAX
2019-09-13 19:46:57 +02:00
Frank Denis
cb4160b82c
Merge pull request #869 from angt/aegis256-mac-verification
...
aegis256: Support mac verification when m is NULL
2019-09-13 10:39:43 +02:00
Frank Denis
1d536ffab7
Indent
2019-09-13 00:17:46 +02:00
Adrien Gallouët
0a31dd5a31
aegis256: Support mac verification when m is NULL
...
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr >
2019-09-12 21:11:07 +00:00
Frank Denis
f537541a0a
For clarity, don't use different terms for the same thing
2019-09-12 22:24:39 +02:00
Frank Denis
4de2620fb1
Indent
2019-09-12 20:48:52 +02:00
Adrien Gallouët
4520c080cc
Define ENOSYS where it is useful
...
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr >
2019-09-12 18:13:19 +00:00
Adrien Gallouët
0eecb81466
aegis256: Remove restrict
...
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr >
2019-09-11 13:14:32 +00:00
Adrien Gallouët
452ac1f3ee
Add AEGIS-256 (aesni only)
...
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr >
2019-09-11 12:53:22 +00:00
mpex
fb8e4d00df
Update utils.c
...
I noticed that the shielding_key is not used in sodium_mshield() (only filled in crypto_generichash())
Is the wrong key used in crypto_stream_xor?
2019-06-24 13:41:09 +02:00
Frank Denis
495fdb3693
mshield requires memory protection
2019-06-22 17:02:34 +02:00
Frank Denis
bfeca0eb73
Implement key shielding to protect against side channels
...
We may want to fold this into `sodium_mprotect_*()` instead of
exposing these functions.
The drawback is that a transition from PROT_NONE to PROT_READ
(or the other way round) would need an intermediary state in PROT_WRITE
for shielding/unshielding.
Shielding is also not thread-safe, while the `mprotect_*()` functions
are, and adding locks would make things more complicated than they
probably should.
2019-06-22 14:56:16 +02:00
Frank Denis
2dd3b91628
Try to rename internal symbols that were visible in static libraries
...
Fixes #839
2019-06-10 23:08:21 +02:00
Frank Denis
a97ab7085f
argon2_pick_best_implementation() can be static
2019-06-10 20:35:43 +02:00
Frank Denis
47153bb56e
Style: remove unneeded extern
2019-06-10 20:35:38 +02:00
Frank Denis
42a06fdecc
common.h -> private/common.h
2019-06-10 16:24:47 +02:00
Frank Denis
7214dff083
Rename the remaining unprefixed functions
...
argon2_fill_first_blocks() can be static
2019-06-09 01:01:20 +02:00
Frank Denis
550622b04b
Rename fill_segment_* to argon2_fill_segment_*
2019-06-09 00:19:41 +02:00
Frank Denis
9f14962388
Rename a few common internal symbols
2019-06-09 00:14:48 +02:00
Frank Denis
6723e22907
Rename PBKDF2_SHA256 to escrypt_PBKDF2_SHA256
2019-06-09 00:02:23 +02:00
Frank Denis
bdc4db7c9c
Remove useless macros hiding the actual symbol names
2019-06-08 23:26:49 +02:00
Frank Denis
d855d30826
Use MAP_CONCEAL on OpenBSD
2019-06-06 11:51:57 +02:00
Frank Denis
d54f0721cd
getentropy() may be defined but NULL on older iOS versions
2019-06-02 21:11:30 +02:00
Frank Denis
1707281a3a
Revert "scrypt: reject r == 0 and p == 0"
...
This reverts commit 00c8ecd1c4 .
2019-06-01 15:33:37 +02:00
Frank Denis
3e5c2531eb
Back to dev mode
2019-05-30 23:05:07 +02:00
Frank Denis
252fda724c
Bump
2019-05-30 15:52:09 +02:00
Frank Denis
00c8ecd1c4
scrypt: reject r == 0 and p == 0
2019-05-21 14:11:03 +02:00
Frank Denis
e24847c364
Comment
2019-05-21 10:17:35 +02:00