diff options
author | Niels Möller <nisse@lysator.liu.se> | 2020-07-08 10:46:45 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2020-07-08 10:46:45 +0200 |
commit | 25e4316f0e75fb16cc99111bfecd4bd8f4f2c812 (patch) | |
tree | acd2ce6b172ba3e85aa1bae118a23217062b024e /fat-arm.c | |
parent | 2ac58a1ce729a6cfe1d3703f4deb6da8862909e9 (diff) | |
download | nettle-25e4316f0e75fb16cc99111bfecd4bd8f4f2c812.tar.gz |
Rearrange salsa20, enabling ARM fat builds to use sala20_2core.salsa20-2core-neon
Diffstat (limited to 'fat-arm.c')
-rw-r--r-- | fat-arm.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -43,6 +43,7 @@ #include "nettle-types.h" #include "aes-internal.h" +#include "salsa20-internal.h" #include "fat-setup.h" struct arm_features @@ -147,6 +148,10 @@ DECLARE_FAT_FUNC(_nettle_salsa20_core, salsa20_core_func) DECLARE_FAT_FUNC_VAR(salsa20_core, salsa20_core_func, c) DECLARE_FAT_FUNC_VAR(salsa20_core, salsa20_core_func, neon) +DECLARE_FAT_FUNC(_nettle_salsa20_crypt, salsa20_crypt_func) +DECLARE_FAT_FUNC_VAR(salsa20_crypt, salsa20_crypt_func, 1core) +DECLARE_FAT_FUNC_VAR(salsa20_crypt, salsa20_crypt_func, 2core) + DECLARE_FAT_FUNC(nettle_sha1_compress, sha1_compress_func) DECLARE_FAT_FUNC_VAR(sha1_compress, sha1_compress_func, c) DECLARE_FAT_FUNC_VAR(sha1_compress, sha1_compress_func, armv6) @@ -212,6 +217,7 @@ fat_init (void) if (verbose) fprintf (stderr, "libnettle: enabling neon code.\n"); _nettle_salsa20_core_vec = _nettle_salsa20_core_neon; + _nettle_salsa20_crypt_vec = _nettle_salsa20_crypt_2core; _nettle_sha512_compress_vec = _nettle_sha512_compress_neon; nettle_sha3_permute_vec = _nettle_sha3_permute_neon; _nettle_umac_nh_vec = _nettle_umac_nh_neon; @@ -223,6 +229,7 @@ fat_init (void) if (verbose) fprintf (stderr, "libnettle: not enabling neon code.\n"); _nettle_salsa20_core_vec = _nettle_salsa20_core_c; + _nettle_salsa20_crypt_vec = _nettle_salsa20_crypt_1core; _nettle_sha512_compress_vec = _nettle_sha512_compress_c; nettle_sha3_permute_vec = _nettle_sha3_permute_c; _nettle_umac_nh_vec = _nettle_umac_nh_c; @@ -249,6 +256,12 @@ DEFINE_FAT_FUNC(_nettle_salsa20_core, void, (uint32_t *dst, const uint32_t *src, unsigned rounds), (dst, src, rounds)) +DEFINE_FAT_FUNC(_nettle_salsa20_crypt, void, + (struct salsa20_ctx *ctx, unsigned rounds, + size_t length, uint8_t *dst, + const uint8_t *src), + (ctx, rounds, length, dst, src)) + DEFINE_FAT_FUNC(nettle_sha1_compress, void, (uint32_t *state, const uint8_t *input), (state, input)) |