<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test/sys/crypto/sha2, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/'/>
<updated>2018-07-20T07:01:28Z</updated>
<entry>
<title>libmd: Always erase context in _Final method, and when doing</title>
<updated>2018-07-20T07:01:28Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2018-07-20T07:01:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=66bdf50face2485fdb7164cf563cbc595370cd3e'/>
<id>urn:sha1:66bdf50face2485fdb7164cf563cbc595370cd3e</id>
<content type='text'>
it, consistently use explicit_bzero().

Update manual pages to match the behavior.

Reviewed by:	pfg, allanjude, jmg
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D16316
</content>
</entry>
<entry>
<title>Implement SHA2-224 submode of SHA2-256</title>
<updated>2018-07-09T07:24:05Z</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2018-07-09T07:24:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=1245c6d1a5984eeb64aa4d508874d48d966da823'/>
<id>urn:sha1:1245c6d1a5984eeb64aa4d508874d48d966da823</id>
<content type='text'>
Like SHA2-384:SHA2-512, SHA2-224 is simply a truncated SHA2-256 with a
different initial vector.  Add to round out the complete basic SHA2 family.
</content>
</entry>
<entry>
<title>Fix C++ includability of crypto headers with static array sizes</title>
<updated>2016-10-18T23:20:49Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2016-10-18T23:20:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=8254c3c5d310873f9cb5a08089801f50ca5e04c0'/>
<id>urn:sha1:8254c3c5d310873f9cb5a08089801f50ca5e04c0</id>
<content type='text'>
C99 allows array function parameters to use the static keyword for their
sizes. This tells the compiler that the parameter will have at least the
specified size, and calling code will fail to compile if that guarantee is
not met. However, this syntax is not legal in C++.

This commit reverts r300824, which worked around the problem for
sys/sys/md5.h only, and introduces a new macro: min_size(). min_size(x) can
be used in headers as a static array size, but will still compile in C++
mode.

Reviewed by:	cem, ed
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D8277
</content>
</entry>
<entry>
<title>libmd: introduce functions that operate on an fd instead of filename</title>
<updated>2016-10-17T13:47:22Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2016-10-17T13:47:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=de13c2427d6c36e498f075cc9f895d4484d2a702'/>
<id>urn:sha1:de13c2427d6c36e498f075cc9f895d4484d2a702</id>
<content type='text'>
Reviewed by:	allanjude, cem
MFC after:	2 months
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8264
</content>
</entry>
<entry>
<title>Retune SHA2 code for improved performance on CPUs with more ILP and</title>
<updated>2016-05-29T17:26:40Z</updated>
<author>
<name>Colin Percival</name>
<email>cperciva@FreeBSD.org</email>
</author>
<published>2016-05-29T17:26:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=696c3895ae137cb2c6151d120b4c6f3e6bfc8a1e'/>
<id>urn:sha1:696c3895ae137cb2c6151d120b4c6f3e6bfc8a1e</id>
<content type='text'>
a preference for memory load instructions over large code footprints
with embedded immediate variables.

On amd64 CPUs from 2007-2008 there is not a significant change, but
amd64 CPUs from 2009-2010 get roughly 10% more throughput with this
code; amd64 CPUs from 2011-2012 get roughly 15% more throughput; and
AMD64 CPUs from 2013-2015 get 20-25% more throughput.  The Raspberry
Pi 2 increases its throughput by 6-8%.

Sponsored by:	Tarsnap Backup Inc.
Performance tested by:	allanjude
MFC after:	3 weeks
</content>
</entry>
<entry>
<title>Implement SHA-512 truncated (224 and 256 bits)</title>
<updated>2016-05-28T16:06:07Z</updated>
<author>
<name>Allan Jude</name>
<email>allanjude@FreeBSD.org</email>
</author>
<published>2016-05-28T16:06:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=1780e407158ada85e454b24960b83a4f8e35cc25'/>
<id>urn:sha1:1780e407158ada85e454b24960b83a4f8e35cc25</id>
<content type='text'>
This implements SHA-512/256, which generates a 256 bit hash by
calculating the SHA-512 then truncating the result. A different initial
value is used, making the result different from the first 256 bits of
the SHA-512 of the same input. SHA-512 is ~50% faster than SHA-256 on
64bit platforms, so the result is a faster 256 bit hash.

The main goal of this implementation is to enable support for this
faster hashing algorithm in ZFS. The feature was introduced into ZFS
in r289422, but is disconnected because SHA-512/256 support was missing.
A further commit will enable it in ZFS.

This is the follow on to r292782

Reviewed by:	cem
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D6061
</content>
</entry>
<entry>
<title>crypto routines: Hint minimum buffer sizes to the compiler</title>
<updated>2016-05-26T19:29:29Z</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2016-05-26T19:29:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=571ebf7685f6f4c14d29d3efba04a558def65bd4'/>
<id>urn:sha1:571ebf7685f6f4c14d29d3efba04a558def65bd4</id>
<content type='text'>
Use the C99 'static' keyword to hint to the compiler IVs and output digest
sizes.  The keyword informs the compiler of the minimum valid size for a given
array.  Obviously not every pointer can be validated (i.e., the compiler can
produce false negative but not false positive reports).

No functional change.  No ABI change.

Sponsored by:	EMC / Isilon Storage Division
</content>
</entry>
<entry>
<title>Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c</title>
<updated>2015-12-27T17:33:59Z</updated>
<author>
<name>Allan Jude</name>
<email>allanjude@FreeBSD.org</email>
</author>
<published>2015-12-27T17:33:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=7a3f5d11fb3873674a1f7e27bcc9a5f7ce279390'/>
<id>urn:sha1:7a3f5d11fb3873674a1f7e27bcc9a5f7ce279390</id>
<content type='text'>
cperciva's libmd implementation is 5-30% faster

The same was done for SHA256 previously in r263218

cperciva's implementation was lacking SHA-384 which I implemented, validated against OpenSSL and the NIST documentation

Extend sbin/md5 to create sha384(1)

Chase dependancies on sys/crypto/sha2/sha2.{c,h} and replace them with sha512{c.c,.h}

Reviewed by:	cperciva, des, delphij
Approved by:	secteam, bapt (mentor)
MFC after:	2 weeks
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3929
</content>
</entry>
<entry>
<title>Complete the move that was started w/ r263218..  For some reason I</title>
<updated>2015-07-11T03:12:34Z</updated>
<author>
<name>John-Mark Gurney</name>
<email>jmg@FreeBSD.org</email>
</author>
<published>2015-07-11T03:12:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=2ff9c4f915f0bf0cc3ff557aa64976b83c038e53'/>
<id>urn:sha1:2ff9c4f915f0bf0cc3ff557aa64976b83c038e53</id>
<content type='text'>
didn't delete the files, so that means we need to bring the changes in
r282726 to the correct files..

make tinderbox completed with this patch...
</content>
</entry>
<entry>
<title>replace the kernel's version w/ cperciva's implementation...  In all</title>
<updated>2014-03-16T01:43:23Z</updated>
<author>
<name>John-Mark Gurney</name>
<email>jmg@FreeBSD.org</email>
</author>
<published>2014-03-16T01:43:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=8083f14fc2267ab70ecd34b28e670378e100ce96'/>
<id>urn:sha1:8083f14fc2267ab70ecd34b28e670378e100ce96</id>
<content type='text'>
my tests, it is faster ~20%, even on an old IXP425 533MHz it is ~45%
faster...  This is partly due to loop unrolling, so the code size does
significantly increase...  I do plan on committing a version that
rolls up the loops again for smaller code size for embedded systems
where size is more important than absolute performance (it'll save ~6k
code)...

The kernel implementation is now shared w/ userland's libcrypt and
libmd...

We drop support for sha256 from sha2.c, so now sha2.c only contains
sha384 and sha512...

Reviewed by:	secteam@
</content>
</entry>
</feed>
