Previously we assumed that the nettle GCM internal functions
will use the provided ECB function for single block encryption.
Newer versions no longer operate that way. Ensure that we
are compatible with them.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
const uint8_t * src)
{
AES_KEY *ctx = (void*)_ctx;
+ unsigned i;
+ unsigned blocks = (length+15) / 16;
- vpaes_encrypt(src, dst, ctx);
+ for (i=0;i<blocks;i++) {
+ vpaes_encrypt(src, dst, ctx);
+ dst += 16;
+ src += 16;
+ }
}
static void x86_aes_128_set_encrypt_key(void *_ctx,