AES GCM input buffers for decryption contain AAD+CTEXT+TAG. Only decrypt the ciphertext, and use the tag for comparison.
Unified · Split
| @@ -782,8 +782,7 @@ static int ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, · 781 unmodified lines | ||
| 782 | 782 | while (src.sg_wa.bytes_left) { |
| 783 | 783 | ccp_prepare_data(&src, &dst, &op, AES_BLOCK_SIZE, true); |
| 784 | 784 | if (!src.sg_wa.bytes_left) { |
| 785 | − unsigned int nbytes = aes->src_len | |
| 786 | − % AES_BLOCK_SIZE; | |
| 785 | + unsigned int nbytes = ilen % AES_BLOCK_SIZE; | |
| 787 | 786 | |
| 788 | 787 | if (nbytes) { |
| 789 | 788 | op.eom = 1; |