Lines Matching refs:ct
939 int ad_len, void* ct, void* tag, int final) { in ae_encrypt() argument
947 block* ctp = (block*)ct; in ae_encrypt()
1120 memcpy((char*)ct + pt_len, &offset, OCB_TAG_LEN); in ae_encrypt()
1123 memcpy((char*)ct + pt_len, &offset, ctx->tag_len); in ae_encrypt()
1155 int ae_decrypt(ae_ctx* ctx, const void* nonce, const void* ct, int ct_len, const void* ad, in ae_decrypt() argument
1164 block* ctp = (block*)ct; in ae_decrypt()
1347 if (constant_time_memcmp((char*)ct + ct_len, tmp.u8, len) != 0) in ae_decrypt()
1385 ALIGN(16) char ct[144];
1389 i = ae_encrypt(ctx,nonce,pt,len,pt,len,ct,NULL,AE_FINALIZE);
1390 printf("P=%d,A=%d: ",len,len); pbuf(ct, i, NULL);
1391 i = ae_encrypt(ctx,nonce,pt,0,pt,len,ct,NULL,AE_FINALIZE);
1392 printf("P=%d,A=%d: ",0,len); pbuf(ct, i, NULL);
1393 i = ae_encrypt(ctx,nonce,pt,len,pt,0,ct,NULL,AE_FINALIZE);
1394 printf("P=%d,A=%d: ",len,0); pbuf(ct, i, NULL);
1400 ALIGN(16) char ct[1024];
1435 ae_encrypt(&ctx,nonce,pt,i,pt,i,ct,NULL,AE_FINALIZE);
1436 memcpy(next,ct,(size_t)i+OCB_TAG_LEN);
1439 ae_encrypt(&ctx,nonce,pt,i,pt,0,ct,NULL,AE_FINALIZE);
1440 memcpy(next,ct,(size_t)i+OCB_TAG_LEN);
1443 ae_encrypt(&ctx,nonce,pt,0,pt,i,ct,NULL,AE_FINALIZE);
1444 memcpy(next,ct,OCB_TAG_LEN);
1447 ae_encrypt(&ctx,nonce,pt,first,pt,first,ct,NULL,AE_PENDING);
1448 ae_encrypt(&ctx,NULL,pt+first,second,pt+first,second,ct+first,NULL,AE_PENDING);
1449 …ae_encrypt(&ctx,NULL,pt+first+second,third,pt+first+second,third,ct+first+second,NULL,AE_FINALIZE);
1450 memcpy(next,ct,(size_t)i+OCB_TAG_LEN);
1453 ae_encrypt(&ctx,nonce,pt,first,pt,0,ct,NULL,AE_PENDING);
1454 ae_encrypt(&ctx,NULL,pt+first,second,pt,0,ct+first,NULL,AE_PENDING);
1455 ae_encrypt(&ctx,NULL,pt+first+second,third,pt,0,ct+first+second,NULL,AE_FINALIZE);
1456 memcpy(next,ct,(size_t)i+OCB_TAG_LEN);
1459 ae_encrypt(&ctx,nonce,pt,0,pt,first,ct,NULL,AE_PENDING);
1460 ae_encrypt(&ctx,NULL,pt,0,pt+first,second,ct,NULL,AE_PENDING);
1461 ae_encrypt(&ctx,NULL,pt,0,pt+first+second,third,ct,NULL,AE_FINALIZE);
1462 memcpy(next,ct,OCB_TAG_LEN);
1468 ae_encrypt(&ctx,nonce,NULL,0,val_buf,next-val_buf,ct,tag,AE_FINALIZE);
1481 len = ae_encrypt(&ctx,nonce,val_buf,i,val_buf,i,ct,tag,AE_FINALIZE);
1482 len = ae_encrypt(&ctx,nonce,val_buf,i,val_buf,-1,ct,tag,AE_FINALIZE);
1483 len = ae_decrypt(&ctx,nonce,ct,len,val_buf,-1,pt,tag,AE_FINALIZE);
1488 len = ae_encrypt(&ctx,nonce,val_buf,i,val_buf,i,ct,NULL,AE_FINALIZE);
1489 ae_decrypt(&ctx,nonce,ct,first,val_buf,first,pt,NULL,AE_PENDING);
1490 ae_decrypt(&ctx,NULL,ct+first,second,val_buf+first,second,pt+first,NULL,AE_PENDING);
1491 …len = ae_decrypt(&ctx,NULL,ct+first+second,len-(first+second),val_buf+first+second,third,pt+first+…