<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgcrypt.git/cipher/sha256.c, branch http-to-https</title>
<subtitle>dev.gnupg.org: source/libgcrypt.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgcrypt.git/'/>
<entry>
<title>use https instead of cleartext http where possible</title>
<updated>2019-05-14T20:26:02+00:00</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2019-05-14T17:53:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgcrypt.git/commit/?id=0df498e81fd36fb9af1916dcc5f05536fbc9e29f'/>
<id>0df498e81fd36fb9af1916dcc5f05536fbc9e29f</id>
<content type='text'>
The following domains all offer https, so use it:

 - creativecommons.org
 - cr.yp.to
 - cryptojedi.org
 - crypto.stanford.edu
 - csrc.nist.gov
 - donate.fsf.org
 - ed25519.cr.yp.to
 - eprint.iacr.org
 - git.savannah.gnu.org
 - gnu.org
 - graphics.stanford.edu
 - info.isl.ntt.co.jp
 - lists.gnu.org
 - lists.gnupg.org
 - people.csail.mit.edu
 - shiftleft.org
 - software.intel.com
 - tools.ietf.org
 - web.archive.org
 - web.cs.ucdavis.edu
 - www.calcurco.cat
 - www.columbia.edu
 - www.cs.tau.ac.il
 - www.cs.technion.ac.il
 - www.cs.ucdavis.edu
 - www.g10code.com
 - www.gnu.org
 - www.gnupg.org
 - www.ii.uib.no
 - www.intel.com
 - www.larc.usp.br

Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following domains all offer https, so use it:

 - creativecommons.org
 - cr.yp.to
 - cryptojedi.org
 - crypto.stanford.edu
 - csrc.nist.gov
 - donate.fsf.org
 - ed25519.cr.yp.to
 - eprint.iacr.org
 - git.savannah.gnu.org
 - gnu.org
 - graphics.stanford.edu
 - info.isl.ntt.co.jp
 - lists.gnu.org
 - lists.gnupg.org
 - people.csail.mit.edu
 - shiftleft.org
 - software.intel.com
 - tools.ietf.org
 - web.archive.org
 - web.cs.ucdavis.edu
 - www.calcurco.cat
 - www.columbia.edu
 - www.cs.tau.ac.il
 - www.cs.technion.ac.il
 - www.cs.ucdavis.edu
 - www.g10code.com
 - www.gnu.org
 - www.gnupg.org
 - www.ii.uib.no
 - www.intel.com
 - www.larc.usp.br

Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove extra buffer flush at begining of digest final functions</title>
<updated>2019-04-05T15:52:49+00:00</updated>
<author>
<name>Jussi Kivilinna</name>
<email>jussi.kivilinna@iki.fi</email>
</author>
<published>2019-04-05T15:48:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgcrypt.git/commit/?id=c6055aaccac86e1ca8a9d35c980d7abbacf2a9ff'/>
<id>c6055aaccac86e1ca8a9d35c980d7abbacf2a9ff</id>
<content type='text'>
* cipher/md2.c (md2_final): Remove _gcry_md_block_write flush call
from entry.
* cipher/md4.c (md4_final): Ditto.
* cipher/md5.c (md5_final): Ditto.
* cipher/rmd160.c (rmd160_final): Ditto.
* cipher/sha1.c (sha1_final): Ditto.
* cipher/sha256.c (sha256_final): Ditto.
* cipher/sha512.c (sha512_final): Ditto.
* cipher/sm3.c (sm3_final): Ditto.
* cipher/stribog.c (stribog_final): Ditto.
* cipher/tiger.c (tiger_final): Ditto.
--

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* cipher/md2.c (md2_final): Remove _gcry_md_block_write flush call
from entry.
* cipher/md4.c (md4_final): Ditto.
* cipher/md5.c (md5_final): Ditto.
* cipher/rmd160.c (rmd160_final): Ditto.
* cipher/sha1.c (sha1_final): Ditto.
* cipher/sha256.c (sha256_final): Ditto.
* cipher/sha512.c (sha512_final): Ditto.
* cipher/sm3.c (sm3_final): Ditto.
* cipher/stribog.c (stribog_final): Ditto.
* cipher/tiger.c (tiger_final): Ditto.
--

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimizations for digest final functions</title>
<updated>2019-04-05T15:52:47+00:00</updated>
<author>
<name>Jussi Kivilinna</name>
<email>jussi.kivilinna@iki.fi</email>
</author>
<published>2019-04-05T15:52:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgcrypt.git/commit/?id=e76cd0e2b1f6025c1319576a5848815d1d231aeb'/>
<id>e76cd0e2b1f6025c1319576a5848815d1d231aeb</id>
<content type='text'>
* cipher/md4.c (md4_final): Avoid byte-by-byte buffer setting when
padding; Merge extra and last block processing.
* cipher/md5.c (md5_final): Ditto.
* cipher/rmd160.c (rmd160_final): Ditto.
* cipher/sha1.c (sha1_final): Ditto.
* cipher/sha256.c (sha256_final): Ditto.
* cipher/sm3.c (sm3_final): Ditto.
* cipher/tiger.c (tiger_final): Ditto.
* cipher/sha512.c (sha512_final): Avoid byte-by-byte buffer setting
when padding.
* cipher/stribog.c (stribog_final): Ditto.
* cipher/whirlpool.c (whirlpool_final): Ditto.
--

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* cipher/md4.c (md4_final): Avoid byte-by-byte buffer setting when
padding; Merge extra and last block processing.
* cipher/md5.c (md5_final): Ditto.
* cipher/rmd160.c (rmd160_final): Ditto.
* cipher/sha1.c (sha1_final): Ditto.
* cipher/sha256.c (sha256_final): Ditto.
* cipher/sm3.c (sm3_final): Ditto.
* cipher/tiger.c (tiger_final): Ditto.
* cipher/sha512.c (sha512_final): Avoid byte-by-byte buffer setting
when padding.
* cipher/stribog.c (stribog_final): Ditto.
* cipher/whirlpool.c (whirlpool_final): Ditto.
--

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Clean-up implementation selection for SHA1 and SHA2</title>
<updated>2018-06-19T19:10:49+00:00</updated>
<author>
<name>Jussi Kivilinna</name>
<email>jussi.kivilinna@iki.fi</email>
</author>
<published>2018-06-19T19:10:49+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgcrypt.git/commit/?id=8a44c55d2fb758f726b8b436aa5c0b88a6c6f112'/>
<id>8a44c55d2fb758f726b8b436aa5c0b88a6c6f112</id>
<content type='text'>
* cipher/sha1.c (ASM_EXTRA_STACK): Increase by sizeof(void*)*4.
(do_sha1_transform_amd64_ssse3, do_sha1_transform_amd64_avx)
(do_sha1_transform_amd64_avx_bmi2, do_sha1_transform_intel_shaext)
(do_sha1_transform_armv7_neon, do_sha1_transform_armv8_ce): New.
(transform_blk, transform): Merge to ...
(do_transform_generic): ... this and remove calls to assembly
implementations.
(sha1_init): Select hd-&gt;bctx.bwrite based on HW features.
(_gcry_sha1_mixblock, sha1_final): Call hd-&gt;bctx.bwrite instead of
transform.
* cipher/sha1.h (SHA1_CONTEXT): Remove implementation selection bits.
* cipher/sha256.h (SHA256_CONTEXT): Remove implementation selection
bits.
(ASM_EXTRA_STACK): Increase by sizeof(void*)*4.
(do_sha256_transform_amd64_ssse3, do_sha256_transform_amd64_avx)
(do_sha256_transform_amd64_avx2, do_sha256_transform_intel_shaext)
(do_sha256_transform_armv8_ce): New.
(transform_blk, transform): Merge to ...
(do_transform_generic): ... this and remove calls to assembly
implementations.
(sha256_init, sha224_init): Select hd-&gt;bctx.bwrite based on HW
features.
(sha256_final): Call hd-&gt;bctx.bwrite instead of transform.
* cipher/sha512-armv7-neon.S
(_gcry_sha512_transform_armv7_neon): Return zero.
* cipher/sha512.h (SHA512_CONTEXT): Remove implementation selection
bits.
(ASM_EXTRA_STACK): Increase by sizeof(void*)*4.
(do_sha512_transform_armv7_neon, do_sha512_transform_amd64_ssse3)
(do_sha512_transform_amd64_avx, do_sha512_transform_amd64_avx2): New.
[USE_ARM_ASM] (do_transform_generic): New.
(transform_blk, transform): Merge to ...
[!USE_ARM_ASM] (do_transform_generic): ... this and remove calls to
assembly implementations.
(sha512_init, sha384_init): Select hd-&gt;bctx.bwrite based on HW
features.
(sha512_final): Call hd-&gt;bctx.bwrite instead of transform.
--

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* cipher/sha1.c (ASM_EXTRA_STACK): Increase by sizeof(void*)*4.
(do_sha1_transform_amd64_ssse3, do_sha1_transform_amd64_avx)
(do_sha1_transform_amd64_avx_bmi2, do_sha1_transform_intel_shaext)
(do_sha1_transform_armv7_neon, do_sha1_transform_armv8_ce): New.
(transform_blk, transform): Merge to ...
(do_transform_generic): ... this and remove calls to assembly
implementations.
(sha1_init): Select hd-&gt;bctx.bwrite based on HW features.
(_gcry_sha1_mixblock, sha1_final): Call hd-&gt;bctx.bwrite instead of
transform.
* cipher/sha1.h (SHA1_CONTEXT): Remove implementation selection bits.
* cipher/sha256.h (SHA256_CONTEXT): Remove implementation selection
bits.
(ASM_EXTRA_STACK): Increase by sizeof(void*)*4.
(do_sha256_transform_amd64_ssse3, do_sha256_transform_amd64_avx)
(do_sha256_transform_amd64_avx2, do_sha256_transform_intel_shaext)
(do_sha256_transform_armv8_ce): New.
(transform_blk, transform): Merge to ...
(do_transform_generic): ... this and remove calls to assembly
implementations.
(sha256_init, sha224_init): Select hd-&gt;bctx.bwrite based on HW
features.
(sha256_final): Call hd-&gt;bctx.bwrite instead of transform.
* cipher/sha512-armv7-neon.S
(_gcry_sha512_transform_armv7_neon): Return zero.
* cipher/sha512.h (SHA512_CONTEXT): Remove implementation selection
bits.
(ASM_EXTRA_STACK): Increase by sizeof(void*)*4.
(do_sha512_transform_armv7_neon, do_sha512_transform_amd64_ssse3)
(do_sha512_transform_amd64_avx, do_sha512_transform_amd64_avx2): New.
[USE_ARM_ASM] (do_transform_generic): New.
(transform_blk, transform): Merge to ...
[!USE_ARM_ASM] (do_transform_generic): ... this and remove calls to
assembly implementations.
(sha512_init, sha384_init): Select hd-&gt;bctx.bwrite based on HW
features.
(sha512_final): Call hd-&gt;bctx.bwrite instead of transform.
--

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add hash_buffer and hash_buffers for SHA-224, SHA-385, SHA3 and BLAKE2</title>
<updated>2018-06-19T16:29:25+00:00</updated>
<author>
<name>Jussi Kivilinna</name>
<email>jussi.kivilinna@iki.fi</email>
</author>
<published>2018-06-17T17:03:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgcrypt.git/commit/?id=59c4e344eec61cff45185e1caea6815b3266a0f8'/>
<id>59c4e344eec61cff45185e1caea6815b3266a0f8</id>
<content type='text'>
* cipher/blake2.c (DEFINE_BLAKE2_VARIANT): Add hash_buffer and
hash_buffers functions for BLAKE2 variants.
* cipher/keccak.c (_gcry_sha3_hash_buffer, _gcry_sha3_hash_buffers)
(_gcry_sha3_224_hash_buffer, _gcry_sha3_224_hash_buffers)
(_gcry_sha3_256_hash_buffer, _gcry_sha3_256_hash_buffers)
(_gcry_sha3_384_hash_buffer, _gcry_sha3_384_hash_buffers)
(_gcry_sha3_512_hash_buffer, _gcry_sha3_512_hash_buffers): New.
* cipher/sha256.c (_gcry_sha224_hash_buffer)
(_gcry_sha224_hash_buffers): New.
* cipher/sha512.c (_gcry_sha384_hash_buffer)
(_gcry_sha384_hash_buffers): New.
--

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* cipher/blake2.c (DEFINE_BLAKE2_VARIANT): Add hash_buffer and
hash_buffers functions for BLAKE2 variants.
* cipher/keccak.c (_gcry_sha3_hash_buffer, _gcry_sha3_hash_buffers)
(_gcry_sha3_224_hash_buffer, _gcry_sha3_224_hash_buffers)
(_gcry_sha3_256_hash_buffer, _gcry_sha3_256_hash_buffers)
(_gcry_sha3_384_hash_buffer, _gcry_sha3_384_hash_buffers)
(_gcry_sha3_512_hash_buffer, _gcry_sha3_512_hash_buffers): New.
* cipher/sha256.c (_gcry_sha224_hash_buffer)
(_gcry_sha224_hash_buffers): New.
* cipher/sha512.c (_gcry_sha384_hash_buffer)
(_gcry_sha384_hash_buffers): New.
--

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add hash_buffer and hash_buffers pointers to message digest spec</title>
<updated>2018-06-19T16:29:25+00:00</updated>
<author>
<name>Jussi Kivilinna</name>
<email>jussi.kivilinna@iki.fi</email>
</author>
<published>2018-06-19T15:34:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgcrypt.git/commit/?id=b136703ea0ddbd9fec6dfd1f8dfda8373653ba39'/>
<id>b136703ea0ddbd9fec6dfd1f8dfda8373653ba39</id>
<content type='text'>
* src/cipher-proto.h (gcry_md_hash_buffer_t)
(gcry_md_hash_buffers_t): New.
(gcry_md_spec): Add hash_buffer and hash_buffers.
* cipher/md.c (_gcry_md_hash_buffer, _gcry_md_hash_buffers): Use
hash_buffer/hash_buffers from MD spec instead of hard-coding supported
algorithms.
* cipher/blake2.c: Add NULL to MD spec hash_buffer and hash_buffers
pointers.
* cipher/crc.c: Ditto.
* cipher/gostr3411-94.c: Ditto.
* cipher/keccak.c: Ditto.
* cipher/md2.c: Ditto.
* cipher/md4.c: Ditto.
* cipher/md5.c: Ditto.
* cipher/stribog.c: Ditto.
* cipher/tiger.c: Ditto.
* cipher/whirlpool.c: Ditto.
* cipher/rmd160.c (_gcry_rmd160_hash_buffers): New.
(_gcry_digest_spec_rmd160): Add hash_buffer and hash_buffers functions.
* cipher/sha1.c (_gcry_digest_spec_sha1): Add hash_buffer and
hash_buffers functions.
* cipher/sha256.c (_gcry_digest_spec_sha256): Add hash_buffer and
hash_buffers functions.
(_gcry_digest_spec_sha224): Add NULL pointers for hash_buffer and
hash_buffers.
* cipher/sha512.c (_gcry_digest_spec_sha1): Add hash_buffer and
hash_buffers functions.
(_gcry_digest_spec_sha384): Add NULL pointers for hash_buffer and
hash_buffers.
* cipher/sm3.c (_gcry_digest_spec_sha1): Add hash_buffer and
hash_buffers functions.
--

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/cipher-proto.h (gcry_md_hash_buffer_t)
(gcry_md_hash_buffers_t): New.
(gcry_md_spec): Add hash_buffer and hash_buffers.
* cipher/md.c (_gcry_md_hash_buffer, _gcry_md_hash_buffers): Use
hash_buffer/hash_buffers from MD spec instead of hard-coding supported
algorithms.
* cipher/blake2.c: Add NULL to MD spec hash_buffer and hash_buffers
pointers.
* cipher/crc.c: Ditto.
* cipher/gostr3411-94.c: Ditto.
* cipher/keccak.c: Ditto.
* cipher/md2.c: Ditto.
* cipher/md4.c: Ditto.
* cipher/md5.c: Ditto.
* cipher/stribog.c: Ditto.
* cipher/tiger.c: Ditto.
* cipher/whirlpool.c: Ditto.
* cipher/rmd160.c (_gcry_rmd160_hash_buffers): New.
(_gcry_digest_spec_rmd160): Add hash_buffer and hash_buffers functions.
* cipher/sha1.c (_gcry_digest_spec_sha1): Add hash_buffer and
hash_buffers functions.
* cipher/sha256.c (_gcry_digest_spec_sha256): Add hash_buffer and
hash_buffers functions.
(_gcry_digest_spec_sha224): Add NULL pointers for hash_buffer and
hash_buffers.
* cipher/sha512.c (_gcry_digest_spec_sha1): Add hash_buffer and
hash_buffers functions.
(_gcry_digest_spec_sha384): Add NULL pointers for hash_buffer and
hash_buffers.
* cipher/sm3.c (_gcry_digest_spec_sha1): Add hash_buffer and
hash_buffers functions.
--

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Intel SHA Extensions accelerated SHA256 implementation</title>
<updated>2018-02-16T18:08:24+00:00</updated>
<author>
<name>Jussi Kivilinna</name>
<email>jussi.kivilinna@iki.fi</email>
</author>
<published>2018-02-15T20:13:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgcrypt.git/commit/?id=0b3ec359e2279c3b46b171372b1b7733bba20cd7'/>
<id>0b3ec359e2279c3b46b171372b1b7733bba20cd7</id>
<content type='text'>
* cipher/Makefile.am: Add 'sha256-intel-shaext.c'.
* cipher/sha256-intel-shaext.c: New.
* cipher/sha256.c (USE_SHAEXT)
(_gcry_sha256_transform_intel_shaext): New.
(SHA256_CONTEXT): Add 'use_shaext'.
(sha256_init, sha224_init) [USE_SHAEXT]: Use shaext if supported.
(transform) [USE_SHAEXT]: Use shaext if enabled.
(transform): Only add ASM_EXTRA_STACK if returned burn length is not
zero.
* configure.ac: Add 'sha256-intel-shaext.lo'.
--

Benchmark on Intel Celeron J3455 (1500 Mhz, no turbo):

Before:
                |  nanosecs/byte   mebibytes/sec   cycles/byte
 SHA256         |     10.07 ns/B     94.72 MiB/s     15.10 c/B

After (3.7x faster):
                |  nanosecs/byte   mebibytes/sec   cycles/byte
 SHA256         |      2.70 ns/B     353.8 MiB/s      4.04 c/B

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* cipher/Makefile.am: Add 'sha256-intel-shaext.c'.
* cipher/sha256-intel-shaext.c: New.
* cipher/sha256.c (USE_SHAEXT)
(_gcry_sha256_transform_intel_shaext): New.
(SHA256_CONTEXT): Add 'use_shaext'.
(sha256_init, sha224_init) [USE_SHAEXT]: Use shaext if supported.
(transform) [USE_SHAEXT]: Use shaext if enabled.
(transform): Only add ASM_EXTRA_STACK if returned burn length is not
zero.
* configure.ac: Add 'sha256-intel-shaext.lo'.
--

Benchmark on Intel Celeron J3455 (1500 Mhz, no turbo):

Before:
                |  nanosecs/byte   mebibytes/sec   cycles/byte
 SHA256         |     10.07 ns/B     94.72 MiB/s     15.10 c/B

After (3.7x faster):
                |  nanosecs/byte   mebibytes/sec   cycles/byte
 SHA256         |      2.70 ns/B     353.8 MiB/s      4.04 c/B

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>md: Optimize gcry_md_hash_buffers for SHA-256 and SHA-512.</title>
<updated>2017-06-16T14:53:33+00:00</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2017-06-16T14:53:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgcrypt.git/commit/?id=e6f90a392a1fd59b19b16f7a2bc7c439ae369d5f'/>
<id>e6f90a392a1fd59b19b16f7a2bc7c439ae369d5f</id>
<content type='text'>
* cipher/sha256.c (_gcry_sha256_hash_buffer): New.
(_gcry_sha256_hash_buffers): New.
* cipher/sha512.c (_gcry_sha512_hash_buffer): New.
(_gcry_sha512_hash_buffers): New.
* cipher/md.c (_gcry_md_hash_buffer): Optimize for SHA246 and SHA512.
(_gcry_md_hash_buffers): Ditto.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* cipher/sha256.c (_gcry_sha256_hash_buffer): New.
(_gcry_sha256_hash_buffers): New.
* cipher/sha512.c (_gcry_sha512_hash_buffer): New.
(_gcry_sha512_hash_buffers): New.
* cipher/md.c (_gcry_md_hash_buffer): Optimize for SHA246 and SHA512.
(_gcry_md_hash_buffers): Ditto.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ARMv8/AArch64 Crypto Extension implementation of SHA-256</title>
<updated>2016-09-05T17:08:48+00:00</updated>
<author>
<name>Jussi Kivilinna</name>
<email>jussi.kivilinna@iki.fi</email>
</author>
<published>2016-09-04T10:41:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgcrypt.git/commit/?id=2d4bbc0ad62c54bbdef77799f9db82d344b7219e'/>
<id>2d4bbc0ad62c54bbdef77799f9db82d344b7219e</id>
<content type='text'>
* cipher/Makefile.am: Add 'sha256-armv8-aarch64-ce.S'.
* cipher/sha256-armv8-aarch64-ce.S: New.
* cipher/sha256-armv8-aarch32-ce.S: Move round macros to correct
section.
* cipher/sha256.c (USE_ARM_CE): Enable on ARMv8/AArch64.
* configure.ac: Add 'sha256-armv8-aarch64-ce.lo'; Swap places for
'sha512-arm.lo' and 'sha256-armv8-aarch32-ce.lo'.
--

Benchmark on Cortex-A53 (1152 Mhz):

Before:
                |  nanosecs/byte   mebibytes/sec   cycles/byte
 SHA256         |     13.34 ns/B     71.51 MiB/s     15.36 c/B

After (7.2x faster):
                |  nanosecs/byte   mebibytes/sec   cycles/byte
 SHA256         |      1.85 ns/B     516.3 MiB/s      2.13 c/B

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* cipher/Makefile.am: Add 'sha256-armv8-aarch64-ce.S'.
* cipher/sha256-armv8-aarch64-ce.S: New.
* cipher/sha256-armv8-aarch32-ce.S: Move round macros to correct
section.
* cipher/sha256.c (USE_ARM_CE): Enable on ARMv8/AArch64.
* configure.ac: Add 'sha256-armv8-aarch64-ce.lo'; Swap places for
'sha512-arm.lo' and 'sha256-armv8-aarch32-ce.lo'.
--

Benchmark on Cortex-A53 (1152 Mhz):

Before:
                |  nanosecs/byte   mebibytes/sec   cycles/byte
 SHA256         |     13.34 ns/B     71.51 MiB/s     15.36 c/B

After (7.2x faster):
                |  nanosecs/byte   mebibytes/sec   cycles/byte
 SHA256         |      1.85 ns/B     516.3 MiB/s      2.13 c/B

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ARMv8/AArch32 Crypto Extension implemenation of SHA-256</title>
<updated>2016-07-14T14:55:28+00:00</updated>
<author>
<name>Jussi Kivilinna</name>
<email>jussi.kivilinna@iki.fi</email>
</author>
<published>2016-07-14T14:55:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgcrypt.git/commit/?id=34c64eb03178fbfd34190148fec5a189df2b8f83'/>
<id>34c64eb03178fbfd34190148fec5a189df2b8f83</id>
<content type='text'>
* cipher/Makefile.am: Add 'sha256-armv8-aarch32-ce.S'.
* cipher/sha256-armv8-aarch32-ce.S: New.
* cipher/sha256.c (USE_ARM_CE): New.
(sha256_init, sha224_init): Check features for HWF_ARM_SHA1.
[USE_ARM_CE] (_gcry_sha256_transform_armv8_ce): New.
(transform) [USE_ARM_CE]: Use ARMv8 CE implementation if HW supports.
(SHA256_CONTEXT): Add 'use_arm_ce'.
* configure.ac: Add 'sha256-armv8-aarch32-ce.lo'.
--

Benchmark on Cortex-A53 (1152 Mhz):

Before:

                 |  nanosecs/byte   mebibytes/sec   cycles/byte
  SHA256         |     17.38 ns/B     54.88 MiB/s     20.02 c/B

After (~9.3x faster):

                 |  nanosecs/byte   mebibytes/sec   cycles/byte
  SHA256         |      1.85 ns/B     515.7 MiB/s      2.13 c/B

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* cipher/Makefile.am: Add 'sha256-armv8-aarch32-ce.S'.
* cipher/sha256-armv8-aarch32-ce.S: New.
* cipher/sha256.c (USE_ARM_CE): New.
(sha256_init, sha224_init): Check features for HWF_ARM_SHA1.
[USE_ARM_CE] (_gcry_sha256_transform_armv8_ce): New.
(transform) [USE_ARM_CE]: Use ARMv8 CE implementation if HW supports.
(SHA256_CONTEXT): Add 'use_arm_ce'.
* configure.ac: Add 'sha256-armv8-aarch32-ce.lo'.
--

Benchmark on Cortex-A53 (1152 Mhz):

Before:

                 |  nanosecs/byte   mebibytes/sec   cycles/byte
  SHA256         |     17.38 ns/B     54.88 MiB/s     20.02 c/B

After (~9.3x faster):

                 |  nanosecs/byte   mebibytes/sec   cycles/byte
  SHA256         |      1.85 ns/B     515.7 MiB/s      2.13 c/B

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
</pre>
</div>
</content>
</entry>
</feed>
