Home | History | Annotate | Download | only in keymaster

Lines Matching defs:aad

374  * the wrong thing when given partial AAD blocks, so we have to take care to process AAD in
382 keymaster_blob_t aad;
383 if (input_params.GetTagValue(TAG_ASSOCIATED_DATA, &aad)) {
390 FillBufferedAadBlock(&aad);
395 size_t blocks_to_process = aad.data_length / AES_BLOCK_SIZE;
396 if (blocks_to_process && !ProcessAadBlocks(aad.data, blocks_to_process, error))
398 aad.data += blocks_to_process * AES_BLOCK_SIZE;
399 aad.data_length -= blocks_to_process * AES_BLOCK_SIZE;
401 FillBufferedAadBlock(&aad);
402 assert(aad.data_length == 0);
407 // Data has begun, no more AAD is allowed. Process any buffered AAD.
439 void AesEvpOperation::FillBufferedAadBlock(keymaster_blob_t* aad) {
440 size_t to_buffer = min(AES_BLOCK_SIZE - aad_block_buf_length_, aad->data_length);
441 memcpy(aad_block_buf_.get() + aad_block_buf_length_, aad->data, to_buffer);
442 aad->data += to_buffer;
443 aad->data_length -= to_buffer;