Lines Matching refs:k
810 unsigned i, k, tz, remaining; in process_ad() local
866 k = 0; in process_ad()
878 k = 4; in process_ad()
883 ta[k] = xor_block(ad_offset, adp[k]); in process_ad()
884 ad_offset = xor_block(ad_offset, getL(ctx, ntz(k + 2))); in process_ad()
885 ta[k + 1] = xor_block(ad_offset, adp[k + 1]); in process_ad()
887 k += 2; in process_ad()
891 ta[k] = xor_block(ad_offset, adp[k]); in process_ad()
893 ++k; in process_ad()
898 memcpy(tmp.u8, adp + k, remaining); in process_ad()
900 ta[k] = xor_block(ad_offset, tmp.bl); in process_ad()
901 ++k; in process_ad()
903 AES_ecb_encrypt_blks(ta, k, &ctx->encrypt_key); in process_ad()
904 switch (k) { in process_ad()
946 unsigned i, k; in ae_encrypt() local
1028 k = 0; /* How many blocks in ta[] need ECBing */ in ae_encrypt()
1045 k = 4; in ae_encrypt()
1049 oa[k] = xor_block(offset, ctx->L[0]); in ae_encrypt()
1050 ta[k] = xor_block(oa[k], ptp[k]); in ae_encrypt()
1051 checksum = xor_block(checksum, ptp[k]); in ae_encrypt()
1052 offset = oa[k + 1] = xor_block(oa[k], ctx->L[1]); in ae_encrypt()
1053 ta[k + 1] = xor_block(offset, ptp[k + 1]); in ae_encrypt()
1054 checksum = xor_block(checksum, ptp[k + 1]); in ae_encrypt()
1056 k += 2; in ae_encrypt()
1059 offset = oa[k] = xor_block(offset, ctx->L[0]); in ae_encrypt()
1060 ta[k] = xor_block(offset, ptp[k]); in ae_encrypt()
1061 checksum = xor_block(checksum, ptp[k]); in ae_encrypt()
1063 ++k; in ae_encrypt()
1067 memcpy(tmp.u8, ptp + k, remaining); in ae_encrypt()
1070 ta[k] = offset = xor_block(offset, ctx->Lstar); in ae_encrypt()
1071 ++k; in ae_encrypt()
1075 ta[k] = xor_block(offset, checksum); /* Part of tag gen */ in ae_encrypt()
1076 AES_ecb_encrypt_blks(ta, k + 1, &ctx->encrypt_key); in ae_encrypt()
1077 offset = xor_block(ta[k], ctx->ad_checksum); /* Part of tag gen */ in ae_encrypt()
1079 --k; in ae_encrypt()
1080 tmp.bl = xor_block(tmp.bl, ta[k]); in ae_encrypt()
1081 memcpy(ctp + k, tmp.u8, remaining); in ae_encrypt()
1083 switch (k) { in ae_encrypt()
1163 unsigned i, k; in ae_decrypt() local
1252 k = 0; /* How many blocks in ta[] need ECBing */ in ae_decrypt()
1265 k = 4; in ae_decrypt()
1269 oa[k] = xor_block(offset, ctx->L[0]); in ae_decrypt()
1270 ta[k] = xor_block(oa[k], ctp[k]); in ae_decrypt()
1271 offset = oa[k + 1] = xor_block(oa[k], ctx->L[1]); in ae_decrypt()
1272 ta[k + 1] = xor_block(offset, ctp[k + 1]); in ae_decrypt()
1274 k += 2; in ae_decrypt()
1277 offset = oa[k] = xor_block(offset, ctx->L[0]); in ae_decrypt()
1278 ta[k] = xor_block(offset, ctp[k]); in ae_decrypt()
1280 ++k; in ae_decrypt()
1287 memcpy(tmp.u8, ctp + k, remaining); in ae_decrypt()
1290 memcpy(ptp + k, tmp.u8, remaining); in ae_decrypt()
1294 AES_ecb_decrypt_blks(ta, k, &ctx->decrypt_key); in ae_decrypt()
1295 switch (k) { in ae_decrypt()