Lines Matching refs:tag
45 /* Set the AES key length to use and length of authentication tag to produce.
850 /* Process remaining associated data, compute its tag contribution */
919 int ad_len, void* ct, void* tag, int final) {
1006 /* Process remaining plaintext and compute its tag contribution */
1054 offset = xor_block(offset, ctx->Ldollar); /* Part of tag gen */
1055 ta[k] = xor_block(offset, checksum); /* Part of tag gen */
1057 offset = xor_block(ta[k], ctx->ad_checksum); /* Part of tag gen */
1084 if (tag) {
1086 *(block*)tag = offset;
1088 memcpy((char*)tag, &offset, OCB_TAG_LEN);
1090 memcpy((char*)tag, &offset, ctx->tag_len);
1130 int ad_len, void* pt, const void* tag, int final) {
1141 /* Reduce ct_len tag bundled in ct */
1142 if ((final) && (!tag))
1224 /* Process remaining plaintext and compute its tag contribution */
1295 /* Calculate expected tag */
1299 tmp.bl = xor_block(tmp.bl, ctx->ad_checksum); /* Full tag */
1301 /* Compare with proposed tag, change ct_len if invalid */
1302 if ((OCB_TAG_LEN == 16) && tag) {
1303 if (unequal_blocks(tmp.bl, *(block*)tag))
1311 if (tag) {
1312 if (constant_time_memcmp(tag, tmp.u8, len) != 0)
1369 ALIGN(16) char tag[16];
1436 ae_encrypt(&ctx,nonce,NULL,0,val_buf,next-val_buf,ct,tag,AE_FINALIZE);
1437 pbuf(tag,OCB_TAG_LEN,0);
1449 len = ae_encrypt(&ctx,nonce,val_buf,i,val_buf,i,ct,tag,AE_FINALIZE);
1450 len = ae_encrypt(&ctx,nonce,val_buf,i,val_buf,-1,ct,tag,AE_FINALIZE);
1451 len = ae_decrypt(&ctx,nonce,ct,len,val_buf,-1,pt,tag,AE_FINALIZE);