#undef HAVE_NATIVE_fat_poly1305_blocks
#undef HAVE_NATIVE_ghash_set_key
#undef HAVE_NATIVE_ghash_update
+#undef HAVE_NATIVE_gcm_aes_encrypt
+#undef HAVE_NATIVE_gcm_aes_decrypt
#undef HAVE_NATIVE_salsa20_core
#undef HAVE_NATIVE_salsa20_2core
#undef HAVE_NATIVE_fat_salsa20_2core
gcm_aes128_encrypt(struct gcm_aes128_ctx *ctx,
size_t length, uint8_t *dst, const uint8_t *src)
{
+#if HAVE_NATIVE_gcm_aes_encrypt
size_t done = _gcm_aes_encrypt (&ctx->key, _AES128_ROUNDS, length, dst, src);
- GCM_ENCRYPT(ctx, aes128_encrypt, length - done, dst + done, src + done);
+ ctx->gcm.data_size += done;
+ length -= done; src += done; dst += done;
+#endif
+ GCM_ENCRYPT(ctx, aes128_encrypt, length, dst, src);
}
void