<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/bn/bn_exp.c, branch OPENBSD_7_9</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2025-05-10T05:54:39+00:00</updated>
<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>Convert bn_exp to BN_MONT_CTX_create()</title>
<updated>2025-02-13T11:15:09+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-02-13T11:15:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=aa1d25c8cda35c34eff58c5d6568560b729ba8bf'/>
<id>urn:sha1:aa1d25c8cda35c34eff58c5d6568560b729ba8bf</id>
<content type='text'>
This simplifies the handling of the BN_MONT_CTX passed in and unifies the
exit paths. Also zap some particularly insightful comments by our favorite
captain.

ok jsing
</content>
</entry>
<entry>
<title>Rename BN_mod_exp_recp() to BN_mod_exp_reciprocal()</title>
<updated>2025-02-12T21:21:34+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-02-12T21:21:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=dc6d44d71f3b088ce53a7010caf810507bf2d721'/>
<id>urn:sha1:dc6d44d71f3b088ce53a7010caf810507bf2d721</id>
<content type='text'>
(leaving out a dotasm comment that would become harder to read than it
already is)
</content>
</entry>
<entry>
<title>bn_recp: Avoid complication for negative moduli</title>
<updated>2025-01-22T12:53:16+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-01-22T12:53:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b247738e05b5336b6b755731d3686ac29e6cf54f'/>
<id>urn:sha1:b247738e05b5336b6b755731d3686ac29e6cf54f</id>
<content type='text'>
Instead of doing a weird dance, set the sign on N in BN_RECP_CTX_create().
Since we're not exposing a general purpose calculator API, we can simplify.

ok jsing
</content>
</entry>
<entry>
<title>Split BN_mod_sqr_reciprocal() out of BN_mod_mul_reciprocal()</title>
<updated>2025-01-22T10:08:10+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-01-22T10:08:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=08809e17ad814f4314ef0a7cc09287483156803b'/>
<id>urn:sha1:08809e17ad814f4314ef0a7cc09287483156803b</id>
<content type='text'>
There's no need for BN_mod_mul_reciprocal() to have this complication.
The caller knows when x == y, so place the burden on the caller. This
simplifies both the caller side and the implementation in bn_recp.c.

ok jsing
</content>
</entry>
<entry>
<title>Move BN_RECP_CTX to the heap</title>
<updated>2025-01-21T15:44:22+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-01-21T15:44:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=797cf6b23360385bf34a89fce562aa5cb0a0e978'/>
<id>urn:sha1:797cf6b23360385bf34a89fce562aa5cb0a0e978</id>
<content type='text'>
This introduces a BN_RECP_CTX_create() function that allocates and
populates the BN_RECP_CTX in a single call, without taking an unused
BN_CTX argument.

At the same time, make the N and Nr members BIGNUMs on the heap which
are allocated by BN_RECP_CTX_create() and freed by BN_RECP_CTX_free()
and remove the unnecessary flags argument.

Garbage collect the now unused BN_RECP_CTX_{new,init,set}().

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>Make BN_mod_exp2_mont() and BN_mod_exp_mont_word() internal</title>
<updated>2024-03-02T09:27:31+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-03-02T09:27:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=7542aebe05afee384f3e3d61ec0d1ea06fe2427c'/>
<id>urn:sha1:7542aebe05afee384f3e3d61ec0d1ea06fe2427c</id>
<content type='text'>
The former could be useful but nothing uses it. The latter is a
dangerous implementation detail of Montgomery exponentiation that
should never have been leaked out of the library. Fix this.

ok jsing
</content>
</entry>
<entry>
<title>Make BN_mod_exp_simple() internal</title>
<updated>2024-03-02T09:24:59+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-03-02T09:24:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=5c948777cac23e8035e04e3971d7b5a676652af6'/>
<id>urn:sha1:5c948777cac23e8035e04e3971d7b5a676652af6</id>
<content type='text'>
This function is very slow and useful for testing purposes only. It
should never have been part of the public API. Remove it from there.

ok jsing
</content>
</entry>
<entry>
<title>Garbage collect weird /* 1 */ and /* 2 */ comments</title>
<updated>2023-10-19T10:27:27+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-10-19T10:27:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=ccee90d9ab3953a89f3e0e9eb3833bfa480e4eda'/>
<id>urn:sha1:ccee90d9ab3953a89f3e0e9eb3833bfa480e4eda</id>
<content type='text'>
If they ever had any meaning, that's long been lost.

Requested by jsing
</content>
</entry>
</feed>
