Lines Matching defs:nonce

748 static block gen_offset_from_nonce(ae_ctx* ctx, const void* nonce) {
760 /* Replace cached nonce Top if needed */
772 tmp.u32[1] = ((uint32_t*)nonce)[0];
773 tmp.u32[2] = ((uint32_t*)nonce)[1];
774 tmp.u32[3] = ((uint32_t*)nonce)[2];
775 idx = (unsigned)(tmp.u8[15] & 0x3f); /* Get low 6 bits of nonce */
776 tmp.u8[15] = tmp.u8[15] & 0xc0; /* Zero low 6 bits of nonce */
918 int ae_encrypt(ae_ctx* ctx, const void* nonce, const void* pt, int pt_len, const void* ad,
930 /* Non-null nonce means start of new message, init per-message values */
931 if (nonce) {
932 ctx->offset = gen_offset_from_nonce(ctx, nonce);
1129 int ae_decrypt(ae_ctx* ctx, const void* nonce, const void* ct, int ct_len, const void* ad,
1149 /* Non-null nonce means start of new message, init per-message values */
1150 if (nonce) {
1151 ctx->offset = gen_offset_from_nonce(ctx, nonce);
1354 ALIGN(16) char nonce[] = {0,1,2,3,4,5,6,7,8,9,10,11};
1357 i = ae_encrypt(ctx,nonce,pt,len,pt,len,ct,NULL,AE_FINALIZE);
1359 i = ae_encrypt(ctx,nonce,pt,0,pt,len,ct,NULL,AE_FINALIZE);
1361 i = ae_encrypt(ctx,nonce,pt,len,pt,0,ct,NULL,AE_FINALIZE);
1370 ALIGN(16) char nonce[12] = {0,};
1400 nonce[11] = i;
1403 ae_encrypt(&ctx,nonce,pt,i,pt,i,ct,NULL,AE_FINALIZE);
1407 ae_encrypt(&ctx,nonce,pt,i,pt,0,ct,NULL,AE_FINALIZE);
1411 ae_encrypt(&ctx,nonce,pt,0,pt,i,ct,NULL,AE_FINALIZE);
1415 ae_encrypt(&ctx,nonce,pt,first,pt,first,ct,NULL,AE_PENDING);
1421 ae_encrypt(&ctx,nonce,pt,first,pt,0,ct,NULL,AE_PENDING);
1427 ae_encrypt(&ctx,nonce,pt,0,pt,first,ct,NULL,AE_PENDING);
1435 nonce[11] = 0;
1436 ae_encrypt(&ctx,nonce,NULL,0,val_buf,next-val_buf,ct,tag,AE_FINALIZE);
1446 nonce[11] = i%128;
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);
1456 len = ae_encrypt(&ctx,nonce,val_buf,i,val_buf,i,ct,NULL,AE_FINALIZE);
1457 ae_decrypt(&ctx,nonce,ct,first,val_buf,first,pt,NULL,AE_PENDING);