[gnutls-devel] GnuTLS | lib/nettle: fix carry flag in Streebog code (!992)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Tue May 7 15:54:07 CEST 2019
Tim Rühsen commented on a discussion on lib/nettle/gost/streebog.c: https://gitlab.com/gnutls/gnutls/merge_requests/992#note_167553884
> }
> }
>
> + cf = 0;
> ctx->sigma[0] += M[0];
> for (i = 1; i < 8; i++)
> - if (ctx->sigma[i-1] < M[i-1])
> - ctx->sigma[i] += M[i] + 1;
> - else
> - ctx->sigma[i] += M[i];
> + {
> + if (ctx->sigma[i-1] != M[i-1])
> + cf = (ctx->sigma[i-1] < M[i-1]);
Yes, you are right :-)
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/992#note_167553884
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20190507/48d28d31/attachment.html>
More information about the Gnutls-devel
mailing list