History

crypto: ccp - Ignore tag length when decrypting GCM ciphertext

AES GCM input buffers for decryption contain AAD+CTEXT+TAG. Only decrypt the ciphertext, and use the tag for comparison.

Gary R Hook committed 7 years ago

Commit e2664ec1 parent 9f00baf1 file · +1 −2Browse files

Unified · Split

drivers/crypto/ccp/ccp-ops.c+1−2
@@ -782,8 +782,7 @@ static int ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, · 781 unmodified lines
782782 while (src.sg_wa.bytes_left) {
783783 ccp_prepare_data(&src, &dst, &op, AES_BLOCK_SIZE, true);
784784 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;
787786
788787 if (nbytes) {
789788 op.eom = 1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t