Skip to content

Commit

Permalink
Bug 1566124 - Fix counter increase in ppc-gcm-wrap.c r=bbeurdouche
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D116297

--HG--
extra : moz-landing-system : lando
  • Loading branch information
mamonet committed Jun 4, 2021
1 parent 32ebd26 commit 73b47b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/freebl/ppc-gcm-wrap.c
Expand Up @@ -155,7 +155,7 @@ ppc_aes_gcmInitCounter(ppc_AES_GCMContext *gcm,
/* Promote the counter by 1 */
gcm->CTR[14] += !(++gcm->CTR[15]);
gcm->CTR[13] += !(gcm->CTR[15]) && !(gcm->CTR[14]);
gcm->CTR[12] += !(gcm->CTR[15]) && !(gcm->CTR[13]) && !(gcm->CTR[12]);
gcm->CTR[12] += !(gcm->CTR[15]) && !(gcm->CTR[14]) && !(gcm->CTR[13]);

/* Now hash AAD - it would actually make sense to seperate the context
* creation from the AAD, because that would allow to reuse the H, which
Expand Down

0 comments on commit 73b47b7

Please sign in to comment.