Replace the aes256gcm implementation with Romain Dolbeau's implementation
which is slightly faster than mine. Reimplement features from the previous implementation: add batch mode and use two passes in the decryption function in order to check the tag before decrypting.
This commit is contained in:
parent
ef1417bc2f
commit
ab2e86748e
3
AUTHORS
3
AUTHORS
@ -32,6 +32,9 @@ scrypt Colin Percival
|
||||
Implementors
|
||||
============
|
||||
|
||||
crypto_aead/aes256gcm/aesni Romain Dolbeau
|
||||
Frank Denis
|
||||
|
||||
crypto_aead/chacha20poly1305 Frank Denis
|
||||
|
||||
crypto_box/curve25519xsalsa20poly1305 Daniel J. Bernstein
|
||||
|
@ -211,13 +211,8 @@ AX_CHECK_COMPILE_FLAG([-Wwrite-strings], [CFLAGS="$CFLAGS -Wwrite-strings"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wdiv-by-zero], [CFLAGS="$CFLAGS -Wdiv-by-zero"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wsometimes-uninitialized], [CFLAGS="$CFLAGS -Wsometimes-uninitialized"])
|
||||
|
||||
AX_CHECK_COMPILE_FLAG([$CFLAGS -mmmx], [CFLAGS="$CFLAGS -mmmx"])
|
||||
AX_CHECK_COMPILE_FLAG([$CFLAGS -msse], [CFLAGS="$CFLAGS -msse"])
|
||||
AX_CHECK_COMPILE_FLAG([$CFLAGS -msse2], [CFLAGS="$CFLAGS -msse2"])
|
||||
AX_CHECK_COMPILE_FLAG([$CFLAGS -msse3], [CFLAGS="$CFLAGS -msse3"])
|
||||
AX_CHECK_COMPILE_FLAG([$CFLAGS -mssse3], [CFLAGS="$CFLAGS -mssse3"])
|
||||
AX_CHECK_COMPILE_FLAG([$CFLAGS -maes], [CFLAGS="$CFLAGS -maes"])
|
||||
AX_CHECK_COMPILE_FLAG([$CFLAGS -mpclmul], [CFLAGS="$CFLAGS -mpclmul"])
|
||||
AC_MSG_CHECKING([Checking if we can compile for westmere])
|
||||
AX_CHECK_COMPILE_FLAG([-march=westmere $CFLAGS], [CFLAGS="-march=westmere $CFLAGS"])
|
||||
|
||||
AC_ARG_VAR([CWFLAGS], [define to compilation flags for generating extra warnings])
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -12,11 +12,24 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#define crypto_aead_aes256gcm_KEYBYTES 32U
|
||||
#define crypto_aead_aes256gcm_NSECBYTES 0U
|
||||
#define crypto_aead_aes256gcm_NPUBBYTES 12U
|
||||
#define crypto_aead_aes256gcm_ABYTES 16U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_aead_aes256gcm_aesni_keybytes(void);
|
||||
|
||||
typedef CRYPTO_ALIGN(128) unsigned char crypto_aead_aes256gcm_aesni_state[384];
|
||||
#define crypto_aead_aes256gcm_NSECBYTES 0U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_aead_aes256gcm_aesni_nsecbytes(void);
|
||||
|
||||
#define crypto_aead_aes256gcm_NPUBBYTES 12U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_aead_aes256gcm_aesni_npubbytes(void);
|
||||
|
||||
#define crypto_aead_aes256gcm_ABYTES 16U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_aead_aes256gcm_aesni_abytes(void);
|
||||
|
||||
typedef CRYPTO_ALIGN(16) unsigned char crypto_aead_aes256gcm_aesni_state[272];
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_aead_aes256gcm_aesni_statebytes(void);
|
||||
|
||||
SODIUM_EXPORT
|
||||
int crypto_aead_aes256gcm_aesni_encrypt(unsigned char *c,
|
||||
|
@ -30,7 +30,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef CRYPTO_ALIGN
|
||||
# if defined(_MSC_VER)
|
||||
# if defined(__INTEL_COMPILER) || defined(_MSC_VER)
|
||||
# define CRYPTO_ALIGN(x) __declspec(align(x))
|
||||
# else
|
||||
# define CRYPTO_ALIGN(x) __attribute__((aligned(x)))
|
||||
|
Loading…
Reference in New Issue
Block a user