Frank Denis
4967aa8f23
Use inline asm if supported
2020-05-04 18:23:09 +02:00
Frank Denis
88c568a035
Nits
2020-05-02 17:54:02 +02:00
Frank Denis
809a9f9d7e
Inline
2020-05-02 17:42:25 +02:00
Frank Denis
300f12c6a3
space
2020-05-02 17:13:41 +02:00
Frank Denis
8b6f5ef505
ristretto255_is_canonical(): sync with wasm-crypto
...
Reject string with the top bit set.
2020-04-25 12:15:30 +02:00
Frank Denis
e768eae76d
Rename a few things
2020-04-23 11:10:19 +02:00
Frank Denis
599cb10246
Merge mont->ed conversion
2020-04-21 16:13:05 +02:00
Frank Denis
29f098d237
Revert "Add the BlaBla2000 stream cipher - will eventually become the default"
...
This reverts commit a31fe2a966 .
2020-04-21 13:35:29 +02:00
Frank Denis
72ec06c189
Comment
2020-04-21 13:35:29 +02:00
Frank Denis
f582db039f
Handle identity; fix comment
2020-04-21 13:35:26 +02:00
Frank Denis
6f1c987d2e
Add an assertion
2020-04-18 23:37:12 +02:00
Frank Denis
d01c49df02
H2C: convert DST encoding to suffix free
...
https://github.com/cfrg/draft-irtf-cfrg-hash-to-curve/pull/241
2020-04-10 09:48:26 +02:00
Frank Denis
a31fe2a966
Add the BlaBla2000 stream cipher - will eventually become the default
...
2000 rounds variant of the BlaBla20 cipher
for Very Post Quantum (VPQ) security.
2020-03-31 21:42:54 +02:00
Frank Denis
7d0aea6d5e
Remove unused code
2020-03-31 17:37:06 +02:00
Frank Denis
d9844396e3
Fix and add HKDF tests
2020-03-31 17:14:04 +02:00
Frank Denis
5f39c3ce09
Don't force include the suite ID in tags
2020-03-31 14:33:40 +02:00
Frank Denis
89eb497efa
Handle oversized contexts
2020-03-31 14:16:16 +02:00
Frank Denis
728b26c2c1
Remove edwards25519sha512batch
...
Tagged as deprecated for years, never imported by `<sodium.h>`, and
intentionally never documented.
`edwards25519sha512batch` was just around for ABI compatibility
with NaCl, but no projects seem to be using it.
2020-03-31 12:11:32 +02:00
Frank Denis
ac48996492
Remove crypto_core_ed25519_from_hash()
...
Undocumented, was deprecated for a while in stable versions,
obsoleted by `_from_string()` and `from_string_ro()`.
2020-03-31 12:04:47 +02:00
Frank Denis
2d5b9547d1
yield in spinlock on aarch64
2020-03-30 22:00:35 +02:00
Frank Denis
bf3bc8c386
Add nonnull attributes for new functions
2020-03-30 17:44:17 +02:00
Frank Denis
5fdd12fa97
Add crypto_core_ed25519_from_string() and crypto_core_ed25519_from_string_ro()
2020-03-30 17:19:36 +02:00
Frank Denis
1cedeee7fe
Code cleanup
2020-03-30 16:41:21 +02:00
Frank Denis
1e7562f59b
Remove useless self inclusion
2020-03-28 21:36:01 +01:00
Frank Denis
eab70f79c0
Add HKDF/SHA-512 and HKDF/SHA-256
2020-03-28 21:35:54 +01:00
Frank Denis
451bafc0d3
Include private/common.h wherever HAVE_*TRIN_H is required, for MSVC
2020-03-18 17:19:58 +01:00
Frank Denis
3881198254
Bring back explicit 64 bit xor on 64 bit archs for gcc
...
gcc doesn't seem to be very efficient here, especially with -O2
up
2020-03-14 17:06:16 +01:00
Frank Denis
2105fbfd46
Remove XOP stub
...
XOP is dead
2020-03-14 15:56:08 +01:00
Frank Denis
cce4a86f99
Reformat comments
2020-03-14 00:22:41 +01:00
Frank Denis
8e21cab950
Simplify integerify()
...
Make offsets 64 bit in the SSE scrypt impl
2020-03-14 00:20:23 +01:00
Frank Denis
6c4437d987
Get rid of escrypt_block_t
...
Fixes #937
2020-03-13 23:21:27 +01:00
Frank Denis
f3b0e32d64
Format multi-line comments consistently
2020-03-11 19:14:54 +01:00
Loup Vaillant and Frank Denis
e7e378fad1
Secretbox: explained non-portable behavior ( #936 )
...
Addresses #934
Some tools believe that comparing pointers, *even after converting them
to integers*, is undefined. A comment acknowledging this (as well as the
necessity of the comparison to begin with), can facilitate audits.
Co-authored-by: Frank Denis <124872+jedisct1@users.noreply.github.com >
2020-03-11 19:07:54 +01:00
Loup Vaillant
4bbc34c09c
Avoid memmove() call when buffers are already the same. ( #935 )
...
This completes the work started in commit
fbe3eb265f
2020-03-11 19:05:57 +01:00
Frank Denis
a0a8706c9d
Revert "Use CMOV on x86_64"
...
This reverts commit afae623190 .
2020-02-26 15:02:21 +01:00
Frank Denis
afae623190
Use CMOV on x86_64
...
CMOV has been constant time on all generations of x86_64 CPUs, even when
reading from memory.
2020-02-25 09:22:47 +01:00
Frank Denis
a6d317b2f3
Don't even define a .mult_base placeholder for sandy2x
...
Avoid two indirections for fixed base multiplication until another
implementation possibly exists.
2020-02-06 00:47:18 +01:00
Frank Denis
6a7fbccfd8
Remove sandy2x fixed base scalar multiplication
...
Thanks to precomputation, the generic implementation is faster.
2020-02-06 00:34:08 +01:00
Frank Denis
41c7e47efd
Set a default page size to 64K (wasm/linux large pages)
2020-01-05 21:01:28 -05:00
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