Lines Matching refs:k
797 unsigned i, k, tz, remaining; in process_ad() local
853 k = 0; in process_ad()
865 k = 4; in process_ad()
870 ta[k] = xor_block(ad_offset, adp[k]); in process_ad()
871 ad_offset = xor_block(ad_offset, getL(ctx, ntz(k + 2))); in process_ad()
872 ta[k + 1] = xor_block(ad_offset, adp[k + 1]); in process_ad()
874 k += 2; in process_ad()
878 ta[k] = xor_block(ad_offset, adp[k]); in process_ad()
880 ++k; in process_ad()
885 memcpy(tmp.u8, adp + k, remaining); in process_ad()
887 ta[k] = xor_block(ad_offset, tmp.bl); in process_ad()
888 ++k; in process_ad()
890 AES_ecb_encrypt_blks(ta, k, &ctx->encrypt_key); in process_ad()
891 switch (k) { in process_ad()
926 unsigned i, k; in ae_encrypt() local
1008 k = 0; /* How many blocks in ta[] need ECBing */ in ae_encrypt()
1025 k = 4; in ae_encrypt()
1029 oa[k] = xor_block(offset, ctx->L[0]); in ae_encrypt()
1030 ta[k] = xor_block(oa[k], ptp[k]); in ae_encrypt()
1031 checksum = xor_block(checksum, ptp[k]); in ae_encrypt()
1032 offset = oa[k + 1] = xor_block(oa[k], ctx->L[1]); in ae_encrypt()
1033 ta[k + 1] = xor_block(offset, ptp[k + 1]); in ae_encrypt()
1034 checksum = xor_block(checksum, ptp[k + 1]); in ae_encrypt()
1036 k += 2; in ae_encrypt()
1039 offset = oa[k] = xor_block(offset, ctx->L[0]); in ae_encrypt()
1040 ta[k] = xor_block(offset, ptp[k]); in ae_encrypt()
1041 checksum = xor_block(checksum, ptp[k]); in ae_encrypt()
1043 ++k; in ae_encrypt()
1047 memcpy(tmp.u8, ptp + k, remaining); in ae_encrypt()
1050 ta[k] = offset = xor_block(offset, ctx->Lstar); in ae_encrypt()
1051 ++k; in ae_encrypt()
1055 ta[k] = xor_block(offset, checksum); /* Part of tag gen */ in ae_encrypt()
1056 AES_ecb_encrypt_blks(ta, k + 1, &ctx->encrypt_key); in ae_encrypt()
1057 offset = xor_block(ta[k], ctx->ad_checksum); /* Part of tag gen */ in ae_encrypt()
1059 --k; in ae_encrypt()
1060 tmp.bl = xor_block(tmp.bl, ta[k]); in ae_encrypt()
1061 memcpy(ctp + k, tmp.u8, remaining); in ae_encrypt()
1063 switch (k) { in ae_encrypt()
1137 unsigned i, k; in ae_decrypt() local
1226 k = 0; /* How many blocks in ta[] need ECBing */ in ae_decrypt()
1239 k = 4; in ae_decrypt()
1243 oa[k] = xor_block(offset, ctx->L[0]); in ae_decrypt()
1244 ta[k] = xor_block(oa[k], ctp[k]); in ae_decrypt()
1245 offset = oa[k + 1] = xor_block(oa[k], ctx->L[1]); in ae_decrypt()
1246 ta[k + 1] = xor_block(offset, ctp[k + 1]); in ae_decrypt()
1248 k += 2; in ae_decrypt()
1251 offset = oa[k] = xor_block(offset, ctx->L[0]); in ae_decrypt()
1252 ta[k] = xor_block(offset, ctp[k]); in ae_decrypt()
1254 ++k; in ae_decrypt()
1261 memcpy(tmp.u8, ctp + k, remaining); in ae_decrypt()
1264 memcpy(ptp + k, tmp.u8, remaining); in ae_decrypt()
1268 AES_ecb_decrypt_blks(ta, k, &ctx->decrypt_key); in ae_decrypt()
1269 switch (k) { in ae_decrypt()