<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/sha/sha256.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-02-14T12:01:58+00:00</updated>
<entry>
<title>Replace Makefile based SHA*_ASM defines with HAVE_SHA_* defines.</title>
<updated>2025-02-14T12:01:58+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-02-14T12:01:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a89810379a758c9cd27af2462547dc646dcfaa61'/>
<id>urn:sha1:a89810379a758c9cd27af2462547dc646dcfaa61</id>
<content type='text'>
Currently, SHA{1,256,512}_ASM defines are used to remove the C
implementation of sha{1,256,512}_block_data_order() when it is provided
by assembly. However, this prevents the C implementation from being used
as a fallback.

Rename the C sha*_block_data_order() to sha*_block_generic() and provide
a sha*_block_data_order() that calls sha*_block_generic(). Replace the
Makefile based SHA*_ASM defines with two HAVE_SHA_* defines that allow
these functions to be compiled in or removed, such that machine specific
verisons can be provided. This should effectively be a no-op on any
platform that defined SHA{1,256,512}_ASM.

ok tb@
</content>
</entry>
<entry>
<title>Remove support for static buffers in HMAC/digests</title>
<updated>2024-06-01T07:36:17+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-06-01T07:36:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=0cd26255605cab2a8643bb8585c4148069240e3c'/>
<id>urn:sha1:0cd26255605cab2a8643bb8585c4148069240e3c</id>
<content type='text'>
HMAC() and the one-step digests used to support passing a NULL buffer and
would return the digest in a static buffer. This design is firmly from the
nineties, not thread safe and it saves callers a single line. The few ports
that used to rely this were fixed with patches sent to non-hostile (and
non-dead) upstreams. It's early enough in the release cycle that remaining
uses hidden from the compiler should be caught, at least the ones that
matter.

There won't be that many since BoringSSL removed this feature in 2017.
https://boringssl-review.googlesource.com/14528

Add non-null attributes to the headers and add a few missing bounded
attributes.

ok beck jsing
</content>
</entry>
<entry>
<title>Fix line wrapping.</title>
<updated>2024-03-28T04:23:02+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2024-03-28T04:23:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=315693de05b08c3f051a52e78d7a801d8025ee4e'/>
<id>urn:sha1:315693de05b08c3f051a52e78d7a801d8025ee4e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Stop including md32_common.h.</title>
<updated>2023-08-11T15:27:28+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-08-11T15:27:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=2ea556a1c666b7176ccef64d78e376f1bfabef7c'/>
<id>urn:sha1:2ea556a1c666b7176ccef64d78e376f1bfabef7c</id>
<content type='text'>
Now that we're no longer dependent on md32_common.h, stop including it.
Remove various defines that only existed for md32_common.h usage.
</content>
</entry>
<entry>
<title>Demacro sha256.</title>
<updated>2023-08-11T15:25:36+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-08-11T15:25:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e5c37e5e9f9d7f447090e5f144afac1bcc9341d9'/>
<id>urn:sha1:e5c37e5e9f9d7f447090e5f144afac1bcc9341d9</id>
<content type='text'>
Replace macros with static inline functions, as well as writing out the
variable rotations instead of trying to outsmart the compiler. Also pull
the message schedule update up and complete it prior to commencement of
the round. Also use rotate right, rather than transposed rotate left.

Overall this is more readable and more closely follows the specification.
On some platforms (e.g. aarch64) there is no noteable change in
performance, while on others there is a significant improvement (more than
25% on arm).

ok miod@ tb@
</content>
</entry>
<entry>
<title>Remove MD32_REG_T.</title>
<updated>2023-08-10T07:15:23+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-08-10T07:15:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=13ecebf7d6c58d65f6df008731bbb41f4c2be2f6'/>
<id>urn:sha1:13ecebf7d6c58d65f6df008731bbb41f4c2be2f6</id>
<content type='text'>
This is a hack that is only enabled on a handful of 64 bit platforms, as
a workaround for poor compiler optimisation. If you're running an archiac
compiler on an archiac architecture, then you can deal with slightly lower
performance.

ok tb@
</content>
</entry>
<entry>
<title>Hide symbols in sha</title>
<updated>2023-07-08T12:24:10+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2023-07-08T12:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f46ac389a5f2c573c854a6c2b50156ca974ea892'/>
<id>urn:sha1:f46ac389a5f2c573c854a6c2b50156ca974ea892</id>
<content type='text'>
ok tb@
</content>
</entry>
<entry>
<title>Clean up alignment handling for SHA-256.</title>
<updated>2023-07-07T15:06:50+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-07-07T15:06:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=fde51cb4e2939ec0bb618d4f3d036d65f9d10fb0'/>
<id>urn:sha1:fde51cb4e2939ec0bb618d4f3d036d65f9d10fb0</id>
<content type='text'>
If input data is 32 bit aligned use be32toh() directly, otherwise use
crypto_load_be32toh(), cleaning up all of the HOST_c2l() usage.

ok beck@
</content>
</entry>
<entry>
<title>Clean up SHA-256 input handling and round macros.</title>
<updated>2023-07-07T15:03:55+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-07-07T15:03:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=44be04de359e261a9500ecf15cdd8379adbbbb9c'/>
<id>urn:sha1:44be04de359e261a9500ecf15cdd8379adbbbb9c</id>
<content type='text'>
Avoid reach around and initialisation outside of the macro, cleaning up
the call sites to remove the initialisation.

ok beck@
</content>
</entry>
<entry>
<title>Remove unused SHA-256 implementation.</title>
<updated>2023-07-07T14:32:41+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2023-07-07T14:32:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=94d3e66bc0e7a75b697c3f80aa4dc9abb31d00dd'/>
<id>urn:sha1:94d3e66bc0e7a75b697c3f80aa4dc9abb31d00dd</id>
<content type='text'>
ok beck@
</content>
</entry>
</feed>
