<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/cmac, branch libressl-v3.9.2</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=libressl-v3.9.2</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=libressl-v3.9.2'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2024-03-02T09:30:21+00:00</updated>
<entry>
<title>Remove CMAC_resume()</title>
<updated>2024-03-02T09:30:21+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-03-02T09:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=abe96e60083ddd83f68f68979348706259296fab'/>
<id>urn:sha1:abe96e60083ddd83f68f68979348706259296fab</id>
<content type='text'>
While it is a neat design detail of CMAC that you can resume it after
having finalized it, nothing uses this functionality and it adds some
gross things such as retaining intermediate secrets in the CMAC ctx.
Once this is gone, we can simplify the CMAC code a bit.

ok jsing
</content>
</entry>
<entry>
<title>Remove now unnecessary NULL check before EVP_CIPHER_CTX_cleanup()</title>
<updated>2024-01-30T17:43:39+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-01-30T17:43:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d69e90f471c3ff0a651a84a63f0eac291c56b6b4'/>
<id>urn:sha1:d69e90f471c3ff0a651a84a63f0eac291c56b6b4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Curious to see if explicitly ignoring the return value appeases Coverity</title>
<updated>2024-01-29T06:05:50+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-01-29T06:05:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=952c265dd1ad7b37708e0e9d411cf78fb1149a7a'/>
<id>urn:sha1:952c265dd1ad7b37708e0e9d411cf78fb1149a7a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Avoid calling EVP_CIPHER_CTX_reset() on a NULL ctx</title>
<updated>2024-01-28T20:57:15+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-01-28T20:57:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=eb7ae427b18097f003416068ef5c6d6909d3c4ae'/>
<id>urn:sha1:eb7ae427b18097f003416068ef5c6d6909d3c4ae</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Clean up EVP_CIPHER_CTX_init() usage in cmac.c</title>
<updated>2024-01-28T14:55:40+00:00</updated>
<author>
<name>joshua</name>
<email></email>
</author>
<published>2024-01-28T14:55:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=021245d7e62a8465900bc72da18b21962d19e186'/>
<id>urn:sha1:021245d7e62a8465900bc72da18b21962d19e186</id>
<content type='text'>
This replaces usage of EVP_CIPHER_CTX_init() with EVEP_CIPHER_CTX_new(),
and EVP_CIPHER_CTX_cleanup() with EVP_CIPHER_CTX_reset().

This also replaces usage of malloc with calloc, and free with freezero.

ok tb@
</content>
</entry>
<entry>
<title>Replace .pkey_base_id with a .base_method pointer</title>
<updated>2024-01-04T17:01:26+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-01-04T17:01:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=9f1cd2582409ac5778c5a0e28dfb77f18d122c98'/>
<id>urn:sha1:9f1cd2582409ac5778c5a0e28dfb77f18d122c98</id>
<content type='text'>
Every EVP_PKEY_ASN1_METHOD is either an ASN.1 method or an alias.
As such it resolves to an underlying ASN.1 method (in one step).
This information can be stored in a base_method pointer in allusion
to the pkey_base_id, which is the name for the nid (aka pkey_id aka
type) of the underlying method.

For an ASN.1 method, the base method is itself, so the base method
is set as a pointer to itself. For an alias it is of course a pointer
to the underlying method. Then obviously ameth-&gt;pkey_base_id is the
same as ameth-&gt;base_method-&gt;pkey_id, so rework all ASN.1 methods to
follow that.

ok jsing
</content>
</entry>
<entry>
<title>Clean up and fix pkey_cmac_keygen()</title>
<updated>2023-12-28T21:56:12+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-12-28T21:56:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=9c04f3e6f64642074c016ed4b3fdcbce9db722ed'/>
<id>urn:sha1:9c04f3e6f64642074c016ed4b3fdcbce9db722ed</id>
<content type='text'>
A void pointer can be passed without any cast or assigning it to an
intermediate variable. That's one of hte puzzling things in old OpenSSL
code: there are plenty of unnecessary casts and assignments of void
pointers.

Make use of this fact and rework the function to be single exit, error
check consistently, including the EVP_PKEY_assign() call that can't
really fail and free the cmkey on exit.

Why coverity didn't flag this one is another mystery.

ok jsing
</content>
</entry>
<entry>
<title>cmac: use block_size rather than bl</title>
<updated>2023-12-18T21:15:00+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-12-18T21:15:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=81cb389e7f4e9608ec9b8c91bbc5f66b3b6dac99'/>
<id>urn:sha1:81cb389e7f4e9608ec9b8c91bbc5f66b3b6dac99</id>
<content type='text'>
This is purely mechanical apart from a single line wrap.
</content>
</entry>
<entry>
<title>Disallow ciphers with EVP_CIPH_FLAG_CUSTOM_CIPHER in CMAC</title>
<updated>2023-12-15T13:45:05+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-12-15T13:45:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d97db60c4f81d255da31d14e7811f19d3505ff6b'/>
<id>urn:sha1:d97db60c4f81d255da31d14e7811f19d3505ff6b</id>
<content type='text'>
These are usually AEAD ciphers, for which CMAC makes little sense (if you
need a MAC and all you have is an AEAD, you don't need CMAC, you can just
use a zero length cipher text). Also, since the CMAC implementation only
allows 64 and 128 bit block sizes, the AEADs would error out later anyway.

The only family of ciphers this effectively excludes is AES key wrap, for
which CMAC makes little sense.

One notable side effect of doing this is that the EVP_Cipher() return
value checks in the CMAC code magically become correct. EVP. What's not to
love about it.

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>
</feed>
