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 | while (src.sg_wa.bytes_left) { | 782 | while (src.sg_wa.bytes_left) { |
| 783 | ccp_prepare_data(&src, &dst, &op, AES_BLOCK_SIZE, true); | 783 | ccp_prepare_data(&src, &dst, &op, AES_BLOCK_SIZE, true); |
| 784 | if (!src.sg_wa.bytes_left) { | 784 | if (!src.sg_wa.bytes_left) { |
| 785 | unsigned int nbytes = aes->src_len | 785 | unsigned int nbytes = ilen % AES_BLOCK_SIZE; |
| 786 | % AES_BLOCK_SIZE; | ||
| 787 | 786 | ||
| 788 | if (nbytes) { | 787 | if (nbytes) { |
| 789 | op.eom = 1; | 788 | op.eom = 1; |