<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/dsa/dsa_lib.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>Use dsa for DSA and dh for DH</title>
<updated>2024-03-27T01:49:31+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-03-27T01:49:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=4599e544af0563e395ebc622c53f1ed36ef9773d'/>
<id>urn:sha1:4599e544af0563e395ebc622c53f1ed36ef9773d</id>
<content type='text'>
This unifies variable names and does some other cleanup. Only change in
generated assembly is line number changes.
</content>
</entry>
<entry>
<title>Unify *_up_ref() implementations</title>
<updated>2024-03-27T01:22:30+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-03-27T01:22:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=34e2ca7d2d0a0fb4722dfa5e884d5657ea45d8f8'/>
<id>urn:sha1:34e2ca7d2d0a0fb4722dfa5e884d5657ea45d8f8</id>
<content type='text'>
No need for an inconsistently named local variable and a ternary operator.

ok jsing
</content>
</entry>
<entry>
<title>Ignore ENGINE at the API boundary</title>
<updated>2023-11-29T21:35:57+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-11-29T21:35:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=69bbc5fea4f411f0c0033ecb0fc5126c895ea82a'/>
<id>urn:sha1:69bbc5fea4f411f0c0033ecb0fc5126c895ea82a</id>
<content type='text'>
This removes the remaining ENGINE members from various internal structs
and functions. Any ENGINE passed into a public API is now completely
ignored functions returning an ENGINE always return NULL.

ok jsing
</content>
</entry>
<entry>
<title>Unifdef OPENSSL_NO_ENGINE in libcrypto</title>
<updated>2023-11-19T15:46:10+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-11-19T15:46:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=593d97e74cc873d99aced677883cf55625efe62d'/>
<id>urn:sha1:593d97e74cc873d99aced677883cf55625efe62d</id>
<content type='text'>
This is mechanical apart from a few manual edits to avoid doubled empty
lines.

ok jsing
</content>
</entry>
<entry>
<title>Convert {DH,DSA}_new_method() to using calloc()</title>
<updated>2023-08-12T06:14:36+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-08-12T06:14:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=43f9166987ef626b65b6af9f5e4b7a4179c0ecac'/>
<id>urn:sha1:43f9166987ef626b65b6af9f5e4b7a4179c0ecac</id>
<content type='text'>
Due to OPENSSL_NO_ENGINE the engine member of dh and dsa is currently
uninitialized. As a consequence, {DH,DSA}_get0_engine() will return a
garbage pointer, which is particularly bad because the only reason we
kept them in the first place is that they are used by some software...

A side effect of freeing with {DH,DSA}_free() instead of a hand-rolled
version is that we may call -&gt;meth-&gt;finish() before -&gt;meth-&gt;init() was
called. We need a NULL check for -&gt;meth to be on the safe side in case
we should need to bring ENGINE back.

with nits from djm
ok deraadt djm
</content>
</entry>
<entry>
<title>hide symbols in dsa</title>
<updated>2023-07-08T14:28:15+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2023-07-08T14:28:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=ed57ee23c30661b8054a17346a8e19be71fd9ede'/>
<id>urn:sha1:ed57ee23c30661b8054a17346a8e19be71fd9ede</id>
<content type='text'>
ok tb@
</content>
</entry>
<entry>
<title>Fix an off-by-one in dsa_check_key()</title>
<updated>2023-03-11T15:29:03+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-03-11T15:29:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b402f35d1e79e0a473421c7a9de69d6227f38d7e'/>
<id>urn:sha1:b402f35d1e79e0a473421c7a9de69d6227f38d7e</id>
<content type='text'>
The private key is a random number in [1, q-1], so 1 must be allowed.
Since q is at least an 160-bit prime and 2^159 + 1 is not prime (159
is not a power of 2), the probability that this is hit is &lt; 2^-159,
but a tiny little bit wrong is still wrong.

Found while investigating a report by bluhm
ok jsing
</content>
</entry>
<entry>
<title>Call BN_free() instead of BN_clear_free().</title>
<updated>2023-03-07T09:27:10+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-03-07T09:27:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=19dfe7f484e5739359ee8c102d879d125df916ad'/>
<id>urn:sha1:19dfe7f484e5739359ee8c102d879d125df916ad</id>
<content type='text'>
BN_clear_free() is a wrapper that calls BN_free() - call BN_free() directly
instead.

ok tb@
</content>
</entry>
<entry>
<title>Provide dsa_check_key()</title>
<updated>2023-03-04T20:54:52+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-03-04T20:54:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=990d95a448bfa7728c50a299c62b3fcbfe57d9eb'/>
<id>urn:sha1:990d95a448bfa7728c50a299c62b3fcbfe57d9eb</id>
<content type='text'>
This is a cheap check that ensures basid parameter consistency per
FIPS 186-4: 1 &lt; g &lt; q, that q has the allowed bit sizes 160, 224, 256
and that p is neither too small nor too large. Unfortunately, enforcing
the three allowed sizes for p is not possible since the default dsa key
generation has not respected this limitation.

Instead of checking that p and q are prime, we only check that they
are odd. Check that public and private keys, if set, are in the proper
range. In particular, disallow zero values.

Various versions of these checks have been added to the dsa code
over time. This consolidates and extends them and in a subsequent
commit wewill replace the incomplete checks. BoringSSL has a similar
function of the same name, thanks to David Benjamin for pointing it
out.

ok beck jsing
</content>
</entry>
</feed>
