<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/hmac, branch libressl-v3.5.3</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=libressl-v3.5.3</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=libressl-v3.5.3'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2022-03-30T07:17:48+00:00</updated>
<entry>
<title>Avoid segfaults in EVP_PKEY_CTX_free()</title>
<updated>2022-03-30T07:17:48+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-03-30T07:17:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c650ef2b4f969ce6b8d9a39f9e86c5e181dfafbc'/>
<id>urn:sha1:c650ef2b4f969ce6b8d9a39f9e86c5e181dfafbc</id>
<content type='text'>
It is possible to call pmeth-&gt;cleanup() with an EVP_PKEY_CTX whose data
is NULL. If pmeth-&gt;init() in int_ctx_new() fails, EVP_PKEY_CTX_free() is
called with such a context. This in turn calls pmeth-&gt;cleanup(), and thus
these cleanup functions must be careful not to use NULL data.  Most of
them are, but one of GOST's functions and HMAC's aren't.

Reported for HMAC by Masaru Masada
https://github.com/libressl-portable/openbsd/issues/129

ok bcook jsing
</content>
</entry>
<entry>
<title>pkey_hmac_init(): use calloc()</title>
<updated>2022-03-30T07:12:30+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-03-30T07:12:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=4f0946cf87d94f094252f696625cc100be8bbd76'/>
<id>urn:sha1:4f0946cf87d94f094252f696625cc100be8bbd76</id>
<content type='text'>
Instead of using malloc() and setting most struct members to 0,
simply use calloc().

ok bcook jsing
</content>
</entry>
<entry>
<title>Remove HMAC_CTX_{init,cleanup}() and HMAC_init from public visibility</title>
<updated>2022-01-14T08:06:03+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-01-14T08:06:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=91bb5e9900c0e103adf709034df105c4f34b6bd3'/>
<id>urn:sha1:91bb5e9900c0e103adf709034df105c4f34b6bd3</id>
<content type='text'>
In OpenSSL commit 32fd54a9a3 HMAC_CTX_cleanup() was integrated into
HMAC_CTX_init(), then HMAC_CTX_init() was renamed to HMAC_CTX_reset()
in dc0099e1.

LibreSSL retained them for API compatibility with OpenSSL 1.0.
Not many things use them anymore. In fact, some projects that didn't
want to modify their code for OpenSSL 1.1 API compatibility used the
removed functions to wrap the OpenSSL 1.1 API. We had to patch some
of these and this will now no longer be necessary.

Also remove HMAC_cleanup(). Nothing uses this.

ok inoguchi jsing
</content>
</entry>
<entry>
<title>Make structs in evp.h and hmac.h opaque</title>
<updated>2022-01-14T08:04:14+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-01-14T08:04:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=8be1fd92836a1a22c1b53e77ef08a7768e9a9b05'/>
<id>urn:sha1:8be1fd92836a1a22c1b53e77ef08a7768e9a9b05</id>
<content type='text'>
This moves most structs to evp_locl.h and moves HMAC_CTX to hmac_local.h.

ok inoguchi jsing
</content>
</entry>
<entry>
<title>Annotate the structs that will be moved to hmac_local.h and evp_locl.h</title>
<updated>2021-12-12T21:35:47+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2021-12-12T21:35:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c2c9cf22aa6a46cfa24e29a06a5d0385ca428117'/>
<id>urn:sha1:c2c9cf22aa6a46cfa24e29a06a5d0385ca428117</id>
<content type='text'>
in an upcoming bump.  This omits EVP_AEAD_CTX which will be dealt with
separately. EVP_CIPHER_INFO internals are still publicly visible in
OpenSSL, so it won't be moved.

Move typedefs for HMAC_CTX and EVP_ENCODE_CTX to ossl_typ.h.  These
typedefs will be visible by files including only hmac.h or evp.h since
hmac.h includes evp.h and evp.h includes ossl_typ.h.

ok inoguchi
</content>
</entry>
<entry>
<title>Include evp_locl.h where it will be needed once most structs from</title>
<updated>2021-12-12T21:30:14+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2021-12-12T21:30:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b632ec4f99386efc52214c580c9f233748302224'/>
<id>urn:sha1:b632ec4f99386efc52214c580c9f233748302224</id>
<content type='text'>
evp.h will be moved to evp_locl.h in an upcoming bump.

ok inoguchi
</content>
</entry>
<entry>
<title>Add a mostly empty hmac_local.h. HMAC_CTX and a few other things</title>
<updated>2021-12-12T21:27:38+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2021-12-12T21:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e6d34a52bf003f2e199023dc166779f5d25bfcff'/>
<id>urn:sha1:e6d34a52bf003f2e199023dc166779f5d25bfcff</id>
<content type='text'>
from hmac.h will be moved there in an umpcoming bump. Include this
file where it will be needed.

ok inoguchi
</content>
</entry>
<entry>
<title>Provide HMAC_CTX_new(), HMAC_CTX_free(), HMAC_CTX_reset() and</title>
<updated>2018-02-17T14:53:59+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2018-02-17T14:53:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=fe31e083891620d38e67f59ea40fa3b92f6fcc48'/>
<id>urn:sha1:fe31e083891620d38e67f59ea40fa3b92f6fcc48</id>
<content type='text'>
HMAC_CTX_get_md().
</content>
</entry>
<entry>
<title>use freezero() instead of memset/explicit_bzero + free.  Substantially</title>
<updated>2017-05-02T03:59:45+00:00</updated>
<author>
<name>deraadt</name>
<email></email>
</author>
<published>2017-05-02T03:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=5904cc0e04409fde39a97e6580535da34eeb4291'/>
<id>urn:sha1:5904cc0e04409fde39a97e6580535da34eeb4291</id>
<content type='text'>
reduces conditional logic (-218, +82).

MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH cache alignment calculation bn/bn_exp.c
wasn'tt quite right.  Two other tricky bits with ASN1_STRING_FLAG_NDEF and
BN_FLG_STATIC_DATA where the condition cannot be collapsed completely.

Passes regress.  ok beck
</content>
</entry>
<entry>
<title>Ensure MD and key initialized before processing HMAC</title>
<updated>2017-03-03T10:39:07+00:00</updated>
<author>
<name>inoguchi</name>
<email></email>
</author>
<published>2017-03-03T10:39:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c45f068d1d019c55301b10504d06350ca5e3e625'/>
<id>urn:sha1:c45f068d1d019c55301b10504d06350ca5e3e625</id>
<content type='text'>
Ensure both MD and key have been initialized before processing HMAC.
Releasing HMAC_CTX in error path of HMAC().
In regress test, added test 4,5,6 and cleaned up the code.

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