<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/ec/ec_local.h, 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>2026-03-18T08:02:40+00:00</updated>
<entry>
<title>libcrypto: prefix EC_KEY methods with ec_key_</title>
<updated>2026-03-18T08:02:40+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-03-18T08:02:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e1991105df8fe12032795b7f34ed61fd9272e525'/>
<id>urn:sha1:e1991105df8fe12032795b7f34ed61fd9272e525</id>
<content type='text'>
We received reports that the too generic internal ecdsa_{sign,verify}()
symbol names clash in some static links. The naming here is annoying
because the EC_KEY_METHOD amalgamated the no longer existing ECDH and
ECDSA methods which themselves had poorly chosen method names, still
reflected in public API.

There are various messes here. The ECDSA verify methods are declared
in ec_local.h, whereas the ECDSA sign methods are in ecdsa_local.h
(which is itself pretty useless and really only about EC_KEY_METHOD).
I therefore merged the ECDSA method declarations into ec_local.h and
deleted ecdsa_local.h since I see no real benefit to the latter.
ecdsa.c needs ec_local.h anyway. Having the method declarations next
to EC_KEY_METHOD seems sensible. I left the order as it was, matching
ecdsa.c. The eckey_compute_pubkey() prototype should probably be moved
down.

With one exception I just added an ec_key_ prefix. This leads to a
a repetition of 'key' in ec_key_ecdh_compute_key() which I chose to
live with because it matches the public ECDH_compute_key() (mostly
used by SSH implementations). The exception is ec_key_generate_key()
where I expanded the gen() leading to another _key repetition but
this then matches EC_KEY_generate_key().

Thanks to Rosen Penev for reporting and sending an initial diff.
See also https://github.com/gsliepen/tinc/issues/478

ok jsing
</content>
</entry>
<entry>
<title>Add ec_group_and_point_compatible() helper</title>
<updated>2025-12-26T18:42:33+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-12-26T18:42:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=6aad598b27692cde1ada140f0cf7be0f102d2c84'/>
<id>urn:sha1:6aad598b27692cde1ada140f0cf7be0f102d2c84</id>
<content type='text'>
Check that a given group and point are reasonably compatible. First see
if they use the same method. Compare nids if both have nid != NID_undef.

ok jsing kenjiro
</content>
</entry>
<entry>
<title>Add nid to EC_POINT for compat checking</title>
<updated>2025-12-26T18:41:05+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-12-26T18:41:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=9f98bd62b5811dc1239ca4a121b39c3d962c73c2'/>
<id>urn:sha1:9f98bd62b5811dc1239ca4a121b39c3d962c73c2</id>
<content type='text'>
It is annoying that an EC_POINT does not really know on what EC_GROUP it
lives. Adding a refcount to EC_GROUP is slightly tricky, so instead use
a nid which we will know unless the group was constructed by hand.

ok jsing kenjiro
</content>
</entry>
<entry>
<title>libcrypto: add header guards to *_local.h</title>
<updated>2025-11-26T10:19:57+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-11-26T10:19:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=4879f73ba340a5a6a1e4b5812f046c92cf362d95'/>
<id>urn:sha1:4879f73ba340a5a6a1e4b5812f046c92cf362d95</id>
<content type='text'>
An upcoming change requires the inclusion of asn1_local.h in x509_local.h
which doesn't work due to missing header guards. Add guards to all local
headers that don't have them, although reacharounds and multiple inclusions
are unlikely to occur for most of those.

ok jsing
</content>
</entry>
<entry>
<title>Add prototype for EC_GFp_homogeneous_projective_method().</title>
<updated>2025-08-03T15:07:57+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-08-03T15:07:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=bf229b0023f2f085d216bc2e742c6b48c7afe2b9'/>
<id>urn:sha1:bf229b0023f2f085d216bc2e742c6b48c7afe2b9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Provide an EC method that uses homogeneous projective coordinates.</title>
<updated>2025-05-25T05:19:26+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-05-25T05:19:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=26512301343d2b40a68a67d4f4175ddec368d2fe'/>
<id>urn:sha1:26512301343d2b40a68a67d4f4175ddec368d2fe</id>
<content type='text'>
This makes use of EC_FIELD_ELEMENT to perform fixed width constant
time operations.

Addition and doubling of points makes use of the formulas from
"Complete addition formulas for prime order elliptic curves"
(https://eprint.iacr.org/2015/1060). These are complete and
operate in constant time.

Further work will continue in tree.

ok tb@
</content>
</entry>
<entry>
<title>Provide method specific functions for EC POINT infinity.</title>
<updated>2025-05-24T08:25:58+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-05-24T08:25:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=cab63c063d816f7bdfc022c940ec9842e8308429'/>
<id>urn:sha1:cab63c063d816f7bdfc022c940ec9842e8308429</id>
<content type='text'>
Provide method specific functions for EC_POINT_set_to_infinity() and
EC_POINT_is_at_infinity(). These are not always the same thing and
will depend on the coordinate system in use.

ok beck@ tb@
</content>
</entry>
<entry>
<title>Explicitly pass group generator to mul_double_nonct() from EC_POINT_mul().</title>
<updated>2025-03-24T13:07:04+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-03-24T13:07:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=865465694bb9f7950a0710e8d7667d2540779602'/>
<id>urn:sha1:865465694bb9f7950a0710e8d7667d2540779602</id>
<content type='text'>
EC_POINT_mul() has a complex multi-use interface - there are effectively
three different ways it will behave, depending on which arguments are NULL.
In the case where we compute g_scalar * generator + p_scalar * point, the
mul_double_nonct() function pointer is called, however only g_scalar,
p_scalar and point are passed - it is expected that the lower level
implementation (in this case ec_wnaf_mul()) will use the generator from
the group.

Change mul_double_nonct(), ec_mul_double_nonct() and ec_wnaf_mul() so that
they take scalar1, point1, scalar2 and point2. This removes all knowledge
of g_scalar and the generator from the multiplication code, keeping it
limited to EC_POINT_mul(). While here also consistently pass scalar then
point, rather than a mix of scalar/point and point/scalar.

ok tb@
</content>
</entry>
<entry>
<title>Unexport EC_METHOD and all API using it</title>
<updated>2025-03-09T15:33:35+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-03-09T15:33:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=aea3014df333871d02dc263a69746399371b2009'/>
<id>urn:sha1:aea3014df333871d02dc263a69746399371b2009</id>
<content type='text'>
This is an implementation detail and there is no reason to leak it from
the library.

This removes EC_GFp_{mont,simple}_method(), EC_GROUP_{method_of,new}(),
EC_METHOD_get_field_type(), EC_POINT_method_of() from the public API.

EC_GROUP_copy() is now quite useless, so it will go as well.

ok jsing
</content>
</entry>
<entry>
<title>Garbage collect field_type member of the EC methods</title>
<updated>2025-01-25T13:15:21+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-01-25T13:15:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=60dc4676db34ffc570b69d7d4a833f2c05d9da5a'/>
<id>urn:sha1:60dc4676db34ffc570b69d7d4a833f2c05d9da5a</id>
<content type='text'>
ok jsing
</content>
</entry>
</feed>
