<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/cmac/cmac.c, 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>2024-05-20T14:53:37+00:00</updated>
<entry>
<title>cmac: zero_iv should be const</title>
<updated>2024-05-20T14:53:37+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-05-20T14:53:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=63c9317f6e9b5528a0ef8157114bce0b6dfb1c02'/>
<id>urn:sha1:63c9317f6e9b5528a0ef8157114bce0b6dfb1c02</id>
<content type='text'>
</content>
</entry>
<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>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>
<entry>
<title>Clean up CMAC implementation a little</title>
<updated>2023-11-29T18:11:10+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-11-29T18:11:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=3ebd44f3473783d77d8842eaeb8e6687da31c0a5'/>
<id>urn:sha1:3ebd44f3473783d77d8842eaeb8e6687da31c0a5</id>
<content type='text'>
Add explanatory comments that refer to the spec so that all the weird
dances make a little more sense. It turns out that this implmeentation
only supports block ciphers with block sizes of 64 and 128 bits, so
enforce this with a check.

Simplify make_kn() to make a little more sense and make it constant
time. Some stylistic fixes like checking pointers explicitly against
NULL and shuffle things into an order that makes a bit more sense.

Includes a fix for a warning reported by Viktor Szakats in
https://github.com/libressl/portable/issues/926

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