cryptonite/cbits
Olivier Chéron fc07a8b931 Fix counter wrapping in AES GCM
The generic and AESNI implementations used different conventions
regarding counter wrapping in GCM.  The generic code was based on
function block128_inc_be, for which the counter is a 128-bit value.
Whereas the AESNI code used intrinsic function _mm_add_epi64, and
therefore wrapping at 2^64.

In NIST.SP.800-38d the GCM specification mandates to use incrementing
function inc32, wrapping after 2^32 blocks.  This commit changes both
generic and AESNI implementations to align to the specification and
adds a test vector specially crafted to start encryption with IV block
0xfffffffffffffffffffffffffffffffe.
2019-08-20 10:34:40 +02:00
..
aes Fix counter wrapping in AES GCM 2019-08-20 10:34:40 +02:00
argon2 Argon2: add working hash function 2017-02-24 13:37:40 +00:00
blake2 Update reference blake2 implementation with upstream 2019-02-21 17:16:00 +05:30
curve25519 [Curve25519] Enabled 64-bit implementation 2016-04-20 11:23:51 -07:00
decaf Fix link error with OpenBSD and strip --strip-unneeded 2017-09-17 18:15:00 +02:00
ed25519 Add pointMulByCofactor and pointHasPrimeOrder 2017-12-17 11:56:33 +01:00
p256 Better P256 scalar primitives 2019-03-24 08:31:45 +01:00
cryptonite_aes.c Fix counter wrapping in AES GCM 2019-08-20 10:34:40 +02:00
cryptonite_aes.h Add Crypto.System.CPU 2019-06-15 09:28:02 +02:00
cryptonite_align.h fix compilation on openbsd and introduce more alignment compat fucntions 2017-02-20 07:05:44 +00:00
cryptonite_bitfn.h Add support for AIX in bitfn. 2016-02-07 09:44:45 +00:00
cryptonite_blake2b.c [Blake2] define the algorithm as a multiple algorithm so that the output digest size is explicit in the digest types. 2015-11-19 12:10:14 +00:00
cryptonite_blake2b.h [Blake2] define the algorithm as a multiple algorithm so that the output digest size is explicit in the digest types. 2015-11-19 12:10:14 +00:00
cryptonite_blake2bp.c [Blake2] define the algorithm as a multiple algorithm so that the output digest size is explicit in the digest types. 2015-11-19 12:10:14 +00:00
cryptonite_blake2bp.h [Blake2] define the algorithm as a multiple algorithm so that the output digest size is explicit in the digest types. 2015-11-19 12:10:14 +00:00
cryptonite_blake2s.c [Blake2] define the algorithm as a multiple algorithm so that the output digest size is explicit in the digest types. 2015-11-19 12:10:14 +00:00
cryptonite_blake2s.h [Blake2] define the algorithm as a multiple algorithm so that the output digest size is explicit in the digest types. 2015-11-19 12:10:14 +00:00
cryptonite_blake2sp.c [Blake2] define the algorithm as a multiple algorithm so that the output digest size is explicit in the digest types. 2015-11-19 12:10:14 +00:00
cryptonite_blake2sp.h [Blake2] define the algorithm as a multiple algorithm so that the output digest size is explicit in the digest types. 2015-11-19 12:10:14 +00:00
cryptonite_chacha.c Remove unused variables 2019-08-12 21:11:01 +02:00
cryptonite_chacha.h [ChaCha] opaquify the state to be handled directly in the C level just like the hash function 2015-05-22 14:04:27 +01:00
cryptonite_cpu.c [tidy-exports] properly prefix initialize_hw with cryptonite_aesni_ 2015-06-21 15:06:27 +01:00
cryptonite_cpu.h [tidy-exports] properly prefix initialize_hw with cryptonite_aesni_ 2015-06-21 15:06:27 +01:00
cryptonite_curve25519.h add initial support for curve25519 2015-01-27 06:20:19 +00:00
cryptonite_md2.c [hash] mark update function buffer as const 2015-04-18 12:20:38 +01:00
cryptonite_md2.h [hash] mark update function buffer as const 2015-04-18 12:20:38 +01:00
cryptonite_md4.c Fix many cases of unaligned accesses 2017-06-25 18:10:55 +01:00
cryptonite_md4.h [hash] mark update function buffer as const 2015-04-18 12:20:38 +01:00
cryptonite_md5.c Fix many cases of unaligned accesses 2017-06-25 18:10:55 +01:00
cryptonite_md5.h [hash] mark update function buffer as const 2015-04-18 12:20:38 +01:00
cryptonite_pbkdf2.c fix compilation on openbsd and introduce more alignment compat fucntions 2017-02-20 07:05:44 +00:00
cryptonite_pbkdf2.h add fastpbkdf2 with sha512 2017-02-11 14:08:27 +00:00
cryptonite_poly1305.c Fix many cases of unaligned accesses 2017-06-25 18:10:55 +01:00
cryptonite_poly1305.h Add working implementation of poly1305 with 1 test vector. 2014-07-06 15:44:54 +01:00
cryptonite_rc4.c add RC4 2014-07-21 10:58:42 +01:00
cryptonite_rc4.h add RC4 2014-07-21 10:58:42 +01:00
cryptonite_rdrand.c [random] re-use standard instruction 2016-07-11 06:59:12 +01:00
cryptonite_ripemd.c Fix many cases of unaligned accesses 2017-06-25 18:10:55 +01:00
cryptonite_ripemd.h [hash] mark update function buffer as const 2015-04-18 12:20:38 +01:00
cryptonite_salsa.c Remove unused variables 2019-08-12 21:11:01 +02:00
cryptonite_salsa.h [Salsa] opaquify the state just like for hash functions 2015-05-22 14:04:54 +01:00
cryptonite_scrypt.c Fix many cases of unaligned accesses 2017-06-25 18:10:55 +01:00
cryptonite_sha1.c Fix many cases of unaligned accesses 2017-06-25 18:10:55 +01:00
cryptonite_sha1.h Port Fast PBKDF2 for sha1 and sha256 2017-02-11 14:08:23 +00:00
cryptonite_sha3.c Add KMAC 2019-04-28 09:14:25 +02:00
cryptonite_sha3.h Add KMAC 2019-04-28 09:14:25 +02:00
cryptonite_sha256.c Fix many cases of unaligned accesses 2017-06-25 18:10:55 +01:00
cryptonite_sha256.h Port Fast PBKDF2 for sha1 and sha256 2017-02-11 14:08:23 +00:00
cryptonite_sha512.c Fix many cases of unaligned accesses 2017-06-25 18:10:55 +01:00
cryptonite_sha512.h add fastpbkdf2 with sha512 2017-02-11 14:08:27 +00:00
cryptonite_skein256.c Remove unused variables 2019-08-12 21:11:01 +02:00
cryptonite_skein256.h [hash] trim hash algorithm with multiple output size. 2015-11-19 11:52:21 +00:00
cryptonite_skein512.c Remove unused variables 2019-08-12 21:11:01 +02:00
cryptonite_skein512.h [hash] trim hash algorithm with multiple output size. 2015-11-19 11:52:21 +00:00
cryptonite_skein.h merge cryptohash 2014-07-07 14:55:55 +01:00
cryptonite_tiger.c Fix many cases of unaligned accesses 2017-06-25 18:10:55 +01:00
cryptonite_tiger.h [hash] mark update function buffer as const 2015-04-18 12:20:38 +01:00
cryptonite_whirlpool.c Remove unused variables 2019-08-12 21:11:01 +02:00
cryptonite_whirlpool.h merge cryptohash 2014-07-07 14:55:55 +01:00
cryptonite_xsalsa.c Fix many cases of unaligned accesses 2017-06-25 18:10:55 +01:00
cryptonite_xsalsa.h Implement the XSalsa20 stream cipher 2016-10-09 15:25:31 +02:00