Lines Matching refs:offset
124 size_t offset, size_t use_len, in mbedtls_ccm_crypt() argument
143 mbedtls_xor(output, input, tmp_buf + offset, use_len); in mbedtls_ccm_crypt()
294 size_t use_len, offset; in mbedtls_ccm_update_ad() local
322 offset = (ctx->processed + 2) % 16; /* account for y[0] and y[1] in mbedtls_ccm_update_ad()
324 use_len = 16 - offset; in mbedtls_ccm_update_ad()
330 mbedtls_xor(ctx->y + offset, ctx->y + offset, add, use_len); in mbedtls_ccm_update_ad()
336 if (use_len + offset == 16 || ctx->processed == ctx->add_len) { in mbedtls_ccm_update_ad()
365 size_t use_len, offset; in mbedtls_ccm_update() local
391 offset = ctx->processed % 16; in mbedtls_ccm_update()
393 use_len = 16 - offset; in mbedtls_ccm_update()
403 mbedtls_xor(ctx->y + offset, ctx->y + offset, input, use_len); in mbedtls_ccm_update()
405 if (use_len + offset == 16 || ctx->processed == ctx->plaintext_len) { in mbedtls_ccm_update()
417 ret = mbedtls_ccm_crypt(ctx, offset, use_len, input, output); in mbedtls_ccm_update()
431 ret = mbedtls_ccm_crypt(ctx, offset, use_len, input, local_output); in mbedtls_ccm_update()
436 mbedtls_xor(ctx->y + offset, ctx->y + offset, local_output, use_len); in mbedtls_ccm_update()
440 if (use_len + offset == 16 || ctx->processed == ctx->plaintext_len) { in mbedtls_ccm_update()
453 if (use_len + offset == 16 || ctx->processed == ctx->plaintext_len) { in mbedtls_ccm_update()