diff options
author | Mamone Tarsha <maamoun.tk@googlemail.com> | 2021-07-10 20:57:08 +0300 |
---|---|---|
committer | Mamone Tarsha <maamoun.tk@googlemail.com> | 2021-07-10 20:57:08 +0300 |
commit | 3be3ff3eefbba816930498b6a5bbe4fde2108b89 (patch) | |
tree | b271655f511aab1b98a4e9051a61f8b74eaa2984 /aes128-set-decrypt-key.c | |
parent | 6dfdd0bc63cbcf4d7eca01bfda81e02823a4796e (diff) | |
download | nettle-3be3ff3eefbba816930498b6a5bbe4fde2108b89.tar.gz |
[S390x] Fat build support for AES and GHASH
Diffstat (limited to 'aes128-set-decrypt-key.c')
-rw-r--r-- | aes128-set-decrypt-key.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/aes128-set-decrypt-key.c b/aes128-set-decrypt-key.c index d86d2b34..8be4f922 100644 --- a/aes128-set-decrypt-key.c +++ b/aes128-set-decrypt-key.c @@ -40,14 +40,28 @@ #include "aes-internal.h" #include "macros.h" +/* For fat builds */ +#if HAVE_NATIVE_aes128_invert_key void -aes128_invert_key (struct aes128_ctx *dst, const struct aes128_ctx *src) +_nettle_aes128_invert_key_c(struct aes128_ctx *dst, + const struct aes128_ctx *src); +# define nettle_aes128_invert_key _nettle_aes128_invert_key_c +#endif + +#if HAVE_NATIVE_aes128_set_decrypt_key +void +_nettle_aes128_set_decrypt_key_c(struct aes128_ctx *ctx, const uint8_t *key); +# define nettle_aes128_set_decrypt_key _nettle_aes128_set_decrypt_key_c +#endif + +void +nettle_aes128_invert_key (struct aes128_ctx *dst, const struct aes128_ctx *src) { _nettle_aes_invert (_AES128_ROUNDS, dst->keys, src->keys); } void -aes128_set_decrypt_key(struct aes128_ctx *ctx, const uint8_t *key) +nettle_aes128_set_decrypt_key(struct aes128_ctx *ctx, const uint8_t *key) { aes128_set_encrypt_key (ctx, key); aes128_invert_key (ctx, ctx); |