<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/ec/ec_asn1.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>Simplify field and private key encoding</title>
<updated>2025-03-13T10:31:12+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-03-13T10:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a8dfe0e93a8dd087c97360014c85b4a5b706ac43'/>
<id>urn:sha1:a8dfe0e93a8dd087c97360014c85b4a5b706ac43</id>
<content type='text'>
Reach into the group (p and order are always available) and use
BN_num_bytes() rather than using clumsy and badly named API.
It's shorter and more readable.

ok jsing
</content>
</entry>
<entry>
<title>Simplify ec_asn1_group2fieldid()</title>
<updated>2025-01-25T10:27:58+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-01-25T10:27:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e5fb4b2acc1ca36e73a75dd5a67993a94887e351'/>
<id>urn:sha1:e5fb4b2acc1ca36e73a75dd5a67993a94887e351</id>
<content type='text'>
The field_type is always NID_X9_62_prime_field, no need to encode and
retrieve this from the group method.

ok jsing
</content>
</entry>
<entry>
<title>ec_asn1: update a comment to match reality</title>
<updated>2024-12-06T05:13:35+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-12-06T05:13:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=023d61e5240ed3937924bdf25edca29d361a1017'/>
<id>urn:sha1:023d61e5240ed3937924bdf25edca29d361a1017</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Set nid on group decoded from EC parameters</title>
<updated>2024-12-06T04:35:03+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-12-06T04:35:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=ec50a547d57fc5452ee5d0fe83af3f5b8dfecf79'/>
<id>urn:sha1:ec50a547d57fc5452ee5d0fe83af3f5b8dfecf79</id>
<content type='text'>
We match curve parameters against the builtin curves and only accept
them if they're encoding a curve known to us. After getting rid of the
wtls curves, some of which used to coincide with secp curves (sometimes
the wrong ones), the nid is unambiguous. Setting the nid has no direct
implications on the encoding.

This helps ssh avoid doing ugly computations during the key exchange
for PEM keys using this encoding.

ok djm joshua jsing
</content>
</entry>
<entry>
<title>Use OPENSSL_EC_EXPLICIT_CURVE rather than 0</title>
<updated>2024-11-22T12:01:14+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-11-22T12:01:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=774977599450d8bb74a955cf0ef9cdaa877cbdb2'/>
<id>urn:sha1:774977599450d8bb74a955cf0ef9cdaa877cbdb2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Relocate ECParameters_dup() to ec_asn1</title>
<updated>2024-11-08T13:55:45+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-11-08T13:55:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=269c43df8ea33b942e8a43354b9b48fb60ba4ba7'/>
<id>urn:sha1:269c43df8ea33b942e8a43354b9b48fb60ba4ba7</id>
<content type='text'>
jsing rightly points out that this has nothing to do with ASN.1, but
ec_lib.c has no EC_KEY knowledge otherwise (it's about groups and points)
and moving it to ec_key.c is also not satisfactory since the weird
d2i/i2d for ECParameters don't belong there either.

no objection from jsing
</content>
</entry>
<entry>
<title>d2i_ECPKParameters(): unify return statement with rest of file</title>
<updated>2024-11-02T19:21:24+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-11-02T19:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=942e317318945dfefdee58ac3f8f6f56f89796f2'/>
<id>urn:sha1:942e317318945dfefdee58ac3f8f6f56f89796f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Clean up the mess in i2d_EC_PRIVATEKEY()</title>
<updated>2024-10-31T15:26:05+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-10-31T15:26:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1bd9124c67ffd97dba5b773edc5d2e6968f685a3'/>
<id>urn:sha1:1bd9124c67ffd97dba5b773edc5d2e6968f685a3</id>
<content type='text'>
Use a few local variables to make the checks at the start slightly less
unappealing. Use those to simplify the conditionals a bit and avoid a
particularly silly exit code. ok is set unless ret is 0, so what do you
think 'return (ok ? ret : 0);' returns? By the way, ret &lt; 0 is an error
as well.

While most of the stuff in this file could use a lot more cleanup, I think
the first layer of cockroaches has been exterminated and there's even some
faint golden glimmer between the turds.

Let's shelve the biohazard warnings for now.

ok jsing
</content>
</entry>
<entry>
<title>Clean up o2i_ECPublicKey()</title>
<updated>2024-10-31T15:07:49+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-10-31T15:07:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1d528d0e86e60fc19b6b5d1f0e186214175a9ab7'/>
<id>urn:sha1:1d528d0e86e60fc19b6b5d1f0e186214175a9ab7</id>
<content type='text'>
a is a stupid name for an EC_key, so is ret. Pull apart the tests at the
start and check the length for negativity (long is always the wrong type).
Switch to ec_point_from_octets() and let it determine the point conversion
form rather than having yet another copy of the same ugly stanza.

Set the form on the key using EC_KEY_set_conv_form() (which also affects
the group on the key, so this is a slight change of behavior). Why on earth
this function returns the EC_KEY passed in, I'll never know.

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