lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 2 Nov 2021 12:12:20 +0100 From: Nicolas Toromanoff <nicolas.toromanoff@...s.st.com> To: Ard Biesheuvel <ardb@...nel.org> CC: Nicolas Toromanoff <nicolas.toromanoff@...s.st.com>, Herbert Xu <herbert@...dor.apana.org.au>, "David S . Miller" <davem@...emloft.net>, Maxime Coquelin <mcoquelin.stm32@...il.com>, Alexandre Torgue <alexandre.torgue@...s.st.com>, Marek Vasut <marex@...x.de>, Linux Crypto Mailing List <linux-crypto@...r.kernel.org>, <linux-stm32@...md-mailman.stormreply.com>, Linux ARM <linux-arm-kernel@...ts.infradead.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org> Subject: Re: [PATCH 3/8] crypto: stm32/cryp - fix CTR counter carry On Sun, 31 Oct 2021, Ard Biesheuvel wrote: > On Fri, 29 Oct 2021 at 16:01, Nicolas Toromanoff > <nicolas.toromanoff@...s.st.com> wrote: >> >> [...] >> >> @@ -1219,25 +1219,26 @@ static void stm32_cryp_check_ctr_counter(struct stm32_cryp *cryp) >> >> if (unlikely(cryp->last_ctr[3] == 0xFFFFFFFF)) { >> cryp->last_ctr[3] = 0; >> - cryp->last_ctr[2]++; >> + cryp->last_ctr[2] = cpu_to_be32(be32_to_cpu(cryp->last_ctr[2]) + 1); >> if (!cryp->last_ctr[2]) { >> - cryp->last_ctr[1]++; >> + cryp->last_ctr[1] = cpu_to_be32(be32_to_cpu(cryp->last_ctr[1]) + 1); >> if (!cryp->last_ctr[1]) >> - cryp->last_ctr[0]++; >> + cryp->last_ctr[0] = cpu_to_be32(be32_to_cpu(cryp->last_ctr[0]) + 1); >> } >> > > crypto_inc() ?? Good point, I didn't know/find this function. Thanks, Nicolas.
Powered by blists - more mailing lists