Lines Matching refs:use_len
266 size_t use_len, olen = 0; in mbedtls_gcm_starts() local
292 use_len = (iv_len < 16) ? iv_len : 16; in mbedtls_gcm_starts()
294 mbedtls_xor(ctx->y, ctx->y, p, use_len); in mbedtls_gcm_starts()
298 iv_len -= use_len; in mbedtls_gcm_starts()
299 p += use_len; in mbedtls_gcm_starts()
336 size_t use_len, offset; in mbedtls_gcm_update_ad() local
347 use_len = 16 - offset; in mbedtls_gcm_update_ad()
348 if (use_len > add_len) { in mbedtls_gcm_update_ad()
349 use_len = add_len; in mbedtls_gcm_update_ad()
352 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, p, use_len); in mbedtls_gcm_update_ad()
354 if (offset + use_len == 16) { in mbedtls_gcm_update_ad()
358 ctx->add_len += use_len; in mbedtls_gcm_update_ad()
359 add_len -= use_len; in mbedtls_gcm_update_ad()
360 p += use_len; in mbedtls_gcm_update_ad()
396 size_t offset, size_t use_len, in gcm_mask() argument
410 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, input, use_len); in gcm_mask()
412 mbedtls_xor(output, ectr + offset, input, use_len); in gcm_mask()
414 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, output, use_len); in gcm_mask()
461 size_t use_len = 16 - offset; in mbedtls_gcm_update() local
462 if (use_len > input_length) { in mbedtls_gcm_update()
463 use_len = input_length; in mbedtls_gcm_update()
466 if ((ret = gcm_mask(ctx, ectr, offset, use_len, p, out_p)) != 0) { in mbedtls_gcm_update()
470 if (offset + use_len == 16) { in mbedtls_gcm_update()
474 ctx->len += use_len; in mbedtls_gcm_update()
475 input_length -= use_len; in mbedtls_gcm_update()
476 p += use_len; in mbedtls_gcm_update()
477 out_p += use_len; in mbedtls_gcm_update()