<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/bn/bn_gcd.c, branch OPENBSD_7_9_BASE</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9_BASE</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9_BASE'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2025-06-02T12:40:10+00:00</updated>
<entry>
<title>bn_gcd: fix wacky indentation found by smatch</title>
<updated>2025-06-02T12:40:10+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-06-02T12:40:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a0e8b5e2ce5f6c14ed133fc2350b4268645c65d5'/>
<id>urn:sha1:a0e8b5e2ce5f6c14ed133fc2350b4268645c65d5</id>
<content type='text'>
via/ok jsg
</content>
</entry>
<entry>
<title>Use err_local.h rather than err.h in most places</title>
<updated>2025-05-10T05:54:39+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-05-10T05:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=41e8f99dd1625a9f0c80ce9d4383e95b18e85709'/>
<id>urn:sha1:41e8f99dd1625a9f0c80ce9d4383e95b18e85709</id>
<content type='text'>
ok jsing
</content>
</entry>
<entry>
<title>Hide symbols in bn.h</title>
<updated>2024-04-10T14:58:06+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2024-04-10T14:58:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c1002fc07c1599164ea7518630da25bd606c9993'/>
<id>urn:sha1:c1002fc07c1599164ea7518630da25bd606c9993</id>
<content type='text'>
Mark them LCRYPTO_UNUSED appropriately and remove the LIBRESSL_INTERNAL
guards around them

ok tb@
</content>
</entry>
<entry>
<title>Fix variable reuse in BN_mod_inverse()</title>
<updated>2023-06-02T17:15:30+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-06-02T17:15:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=bb185fc15eb97e85801b9f2ecdd0bfb242f9231a'/>
<id>urn:sha1:bb185fc15eb97e85801b9f2ecdd0bfb242f9231a</id>
<content type='text'>
The somewhat strange calculation m = a^{-1} (mod m) can return 0. This
breaks because of BN_nnmod() having delicate semantics of which variable
can be reused. BN_nnmod(a, a, m, ctx) works and the library relies on that.

Here, the code ends up doing BN_nnmod(m, a, m, ctx) and this doesn't work.
If the result of the initial BN_mod() is negative, then BN_nnmod() will
return 0.

Problem reported by Guido Vranken in
https://github.com/openssl/openssl/issues/21110

This code is well covered by regress, but it does not currently have
explicit test coverage. Such will be added soon.

ok beck jsing
</content>
</entry>
<entry>
<title>Remove some doubled empty lines</title>
<updated>2023-04-09T18:38:59+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-04-09T18:38:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1ddb2ff985be4a287c82d504f59d7ae8323def92'/>
<id>urn:sha1:1ddb2ff985be4a287c82d504f59d7ae8323def92</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Compress euclid() a little</title>
<updated>2023-04-03T21:43:43+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-04-03T21:43:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b5c34e79a0f8a9c8f04fad14bc858c12039ecc60'/>
<id>urn:sha1:b5c34e79a0f8a9c8f04fad14bc858c12039ecc60</id>
<content type='text'>
This function is spread out over way too many lines and has too much
repetition. Once this is made a little more compact, it becomes clearer
that this is a somewhat obfuscated version of binary gcd (it is not
constant time therefore cryptographically unsound. It is not used
internally). This will likely go away later.

ok jsing
</content>
</entry>
<entry>
<title>Indent labels</title>
<updated>2023-04-01T11:10:55+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-04-01T11:10:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=41392dc26c09906ca7a9319a0980cdc04f6aae38'/>
<id>urn:sha1:41392dc26c09906ca7a9319a0980cdc04f6aae38</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Group the non-constant time gcd functions together</title>
<updated>2023-04-01T11:08:43+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-04-01T11:08:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=9bf5abd4bce2c2aac1ab6872653f28d9d09eb26b'/>
<id>urn:sha1:9bf5abd4bce2c2aac1ab6872653f28d9d09eb26b</id>
<content type='text'>
The only consumer of euclid() is BN_gcd(), which, in turn is only
used by BN_gcd_nonct(). Group them together rather than having
parts of the constant time implementation separate them.

This moves two functions to a different place in the file.
</content>
</entry>
<entry>
<title>Replace the remaining BN_copy() with bn_copy()</title>
<updated>2023-03-27T10:25:02+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-03-27T10:25:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=aeb32cad44c92f3786167b06a0f9c4310cbb713d'/>
<id>urn:sha1:aeb32cad44c92f3786167b06a0f9c4310cbb713d</id>
<content type='text'>
ok jsing
</content>
</entry>
<entry>
<title>Convert BN_copy() with explicit comparison against NULL to bn_copy()</title>
<updated>2023-03-27T10:21:23+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-03-27T10:21:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a81a8ccd42d8aec45ab93fd62a292dc1d27c0db6'/>
<id>urn:sha1:a81a8ccd42d8aec45ab93fd62a292dc1d27c0db6</id>
<content type='text'>
ok jsing
</content>
</entry>
</feed>
