<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/ec/ec_convert.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-12-26T18:44:19+00:00</updated>
<entry>
<title>Replace group-&gt;meth != point-&gt;meth checks</title>
<updated>2025-12-26T18:44:19+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-12-26T18:44:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e568a255270032a6a88715db4e3609b6129702ed'/>
<id>urn:sha1:e568a255270032a6a88715db4e3609b6129702ed</id>
<content type='text'>
The method will currently always be identical since all groups use the
EC_GFp_mont_method(). Use the ec_group_and_point_compatible() check to
ensure this and if both group and point have a nid set, check that they
are identical.

ok jsing kenjiro
</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>Move BIGNUMs in EC_GROUP and EC_POINT to the heap</title>
<updated>2025-01-05T16:07:08+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-01-05T16:07:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=26c9248a10bd0d95f47397e21bc2f056e53e19c8'/>
<id>urn:sha1:26c9248a10bd0d95f47397e21bc2f056e53e19c8</id>
<content type='text'>
The only way to get an EC_GROUP or an EC_POINT is by calling the relevant
_new() function and to get rid of it, something must call _free(). Thus we
can establish the invariant that every group has Weierstrass coefficients
p, a, b as well as order and cofactor hanging off it. Similarly, Every
point has allocated BIGNUMs for its Jacobian projective coordinates.

Unfortunately, a group has the generator as an optional component in
addition to seed and montgomery context/one (where optionality makes
more sense).

This is a mostly mechanical diff and only drops a few silly comments and
a couple of unnecessary NULL checks since in our part of the wrold the
word invariant has a meaning.

This should also appease Coverity who likes to throw fits at calling
BN_free() for BIGNUM on the stack (yes, this is actually a thing).

ok jsing
</content>
</entry>
<entry>
<title>Simplify ec_point_to_octets()</title>
<updated>2024-12-16T06:11:26+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-12-16T06:11:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b19d3762a5c9d4830000c9ee4a3b5562f5007ad4'/>
<id>urn:sha1:b19d3762a5c9d4830000c9ee4a3b5562f5007ad4</id>
<content type='text'>
This had an extra dance to allow a NULL output buffer. The plan was to
use this in i2o_ECPublicKey() to preserve the behavior of avoiding an
allocation if out == NULL. However, when I rewrote the latter I punted
on preserving that complication, as it was already batshit crazy enough.

Thus, remove said dance and make ec_point_to_octets() cleaner.

ok jsing
</content>
</entry>
<entry>
<title>Rename group-&gt;field to group-&gt;p</title>
<updated>2024-12-12T10:00:15+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-12-12T10:00:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=4f38523378d1aec3f012e825f343758e4861f2f4'/>
<id>urn:sha1:4f38523378d1aec3f012e825f343758e4861f2f4</id>
<content type='text'>
Now that we only do curves over GF(p) fields, there's no need to use a
weird, confusing name for what we usually call p. Adjust some comments
in the vicinity as well.
</content>
</entry>
<entry>
<title>Rename EC_YBIT to EC_POINT_YBIT</title>
<updated>2024-11-08T02:24:37+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-11-08T02:24:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=6d179c09913c0a5c5401d9b87ceea55c903a6439'/>
<id>urn:sha1:6d179c09913c0a5c5401d9b87ceea55c903a6439</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ec_convert: remove _OCT also from the macro names</title>
<updated>2024-11-02T16:02:01+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-11-02T16:02:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a1e4dc991adb7095aeb1a0b53f421f6d94cf8f5f'/>
<id>urn:sha1:a1e4dc991adb7095aeb1a0b53f421f6d94cf8f5f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move point_conversion_t conversion to API boundary</title>
<updated>2024-11-01T05:20:58+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-11-01T05:20:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=0cb2a2476b758ee5bb2fd68491189400b213a325'/>
<id>urn:sha1:0cb2a2476b758ee5bb2fd68491189400b213a325</id>
<content type='text'>
EC_POINT_oct2point() is the only API that needs detailed knowledge about
this incomplete enum. [Arguably, the setters for the EC_KEY and EC_GROUP
member of that type would also need to be able to validate what's being
set, but they can't since they can't fail.] Anyway. Add a helper that lets
EC_POINT_oct2point() translate that enum to its internal representation
at the API boundary and add a check that ensures that we only encode the
point at infinity as the point at infinity.

ok jsing
</content>
</entry>
<entry>
<title>Drop the _oct from the function prefixes</title>
<updated>2024-10-31T15:42:47+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-10-31T15:42:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=211987661d8c34699fd344ac1a8a5791d8c5c9bc'/>
<id>urn:sha1:211987661d8c34699fd344ac1a8a5791d8c5c9bc</id>
<content type='text'>
With the functions living in ec_convert now, the oct makes little sense.
And ec_oct_oct2point() was too much for poor jsing to bear.

requested by jsing
</content>
</entry>
<entry>
<title>Retire the oct2point and point2oct EC_METHOD members</title>
<updated>2024-10-31T15:37:53+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-10-31T15:37:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=bebe8bdb2de5180072fb5cf327bce41d8398e8cc'/>
<id>urn:sha1:bebe8bdb2de5180072fb5cf327bce41d8398e8cc</id>
<content type='text'>
Both our remaining EC_METHODs use the methods that used to be called
ec_GFp_simple_{oct2point,point2oct}() so there's no need for the function
pointer indirection. Make the public API call them directly.

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