<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/crypto/Makefile, branch linux-4.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-02-11T09:50:38Z</updated>
<entry>
<title>crypto: arm64/crc32 - merge CRC32 and PMULL instruction based drivers</title>
<updated>2017-02-11T09:50:38Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2017-02-01T15:35:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d3d9c8bda2c74b13185704e504cdf0aa5210723'/>
<id>urn:sha1:5d3d9c8bda2c74b13185704e504cdf0aa5210723</id>
<content type='text'>
The PMULL based CRC32 implementation already contains code based on the
separate, optional CRC32 instructions to fallback to when operating on
small quantities of data. We can expose these routines directly on systems
that lack the 64x64 PMULL instructions but do implement the CRC32 ones,
which makes the driver that is based solely on those CRC32 instructions
redundant. So remove it.

Note that this aligns arm64 with ARM, whose accelerated CRC32 driver
also combines the CRC32 extension based and the PMULL based versions.

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Tested-by: Matthias Brugger &lt;mbrugger@suse.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: arm64/aes - reimplement bit-sliced ARM/NEON implementation for arm64</title>
<updated>2017-01-12T16:26:51Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2017-01-11T16:41:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1abee99eafab67fb1c98f9ecfc43cd5735384a86'/>
<id>urn:sha1:1abee99eafab67fb1c98f9ecfc43cd5735384a86</id>
<content type='text'>
This is a reimplementation of the NEON version of the bit-sliced AES
algorithm. This code is heavily based on Andy Polyakov's OpenSSL version
for ARM, which is also available in the kernel. This is an alternative for
the existing NEON implementation for arm64 authored by me, which suffers
from poor performance due to its reliance on the pathologically slow four
register variant of the tbl/tbx NEON instruction.

This version is about ~30% (*) faster than the generic C code, but only in
cases where the input can be 8x interleaved (this is a fundamental property
of bit slicing). For this reason, only the chaining modes ECB, XTS and CTR
are implemented. (The significance of ECB is that it could potentially be
used by other chaining modes)

* Measured on Cortex-A57. Note that this is still an order of magnitude
  slower than the implementations that use the dedicated AES instructions
  introduced in ARMv8, but those are part of an optional extension, and so
  it is good to have a fallback.

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: arm64/aes - add scalar implementation</title>
<updated>2017-01-12T16:26:49Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2017-01-11T16:41:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bed593c0e852f5c1efd3ca4e984fd744c51cf6ee'/>
<id>urn:sha1:bed593c0e852f5c1efd3ca4e984fd744c51cf6ee</id>
<content type='text'>
This adds a scalar implementation of AES, based on the precomputed tables
that are exposed by the generic AES code. Since rotates are cheap on arm64,
this implementation only uses the 4 core tables (of 1 KB each), and avoids
the prerotated ones, reducing the D-cache footprint by 75%.

On Cortex-A57, this code manages 13.0 cycles per byte, which is ~34% faster
than the generic C code. (Note that this is still &gt;13x slower than the code
that uses the optional ARMv8 Crypto Extensions, which manages &lt;1 cycles per
byte.)

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: arm64/chacha20 - implement NEON version based on SSE3 code</title>
<updated>2017-01-12T16:26:48Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2017-01-11T16:41:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7171ce9eb523fd90e38f2d138d1b6ed2ff3eafd'/>
<id>urn:sha1:b7171ce9eb523fd90e38f2d138d1b6ed2ff3eafd</id>
<content type='text'>
This is a straight port to arm64/NEON of the x86 SSE3 implementation
of the ChaCha20 stream cipher. It uses the new skcipher walksize
attribute to process the input in strides of 4x the block size.

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>Revert "crypto: arm64/ARM: NEON accelerated ChaCha20"</title>
<updated>2016-12-28T09:39:26Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2016-12-28T09:39:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5386e5d1f8b7305e447b781f7ac02649f7a4d055'/>
<id>urn:sha1:5386e5d1f8b7305e447b781f7ac02649f7a4d055</id>
<content type='text'>
This patch reverts the following commits:

8621caa0d45e731f2e9f5889ff5bb384fcd6e059
8096667273477e735b0072b11a6d617ccee45e5f

I should not have applied them because they had already been
obsoleted by a subsequent patch series.  They also cause a build
failure because of the subsequent commit 9ae433bc79f9.

Fixes: 9ae433bc79f ("crypto: chacha20 - convert generic and...")
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: arm64/chacha20 - implement NEON version based on SSE3 code</title>
<updated>2016-12-27T09:47:28Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2016-12-08T14:28:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8621caa0d45e731f2e9f5889ff5bb384fcd6e059'/>
<id>urn:sha1:8621caa0d45e731f2e9f5889ff5bb384fcd6e059</id>
<content type='text'>
This is a straight port to arm64/NEON of the x86 SSE3 implementation
of the ChaCha20 stream cipher.

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: arm64/crc32 - accelerated support based on x86 SSE implementation</title>
<updated>2016-12-07T12:01:22Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2016-12-05T18:42:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8fefde90e90c9f5c2770e46ceb127813d3f20c34'/>
<id>urn:sha1:8fefde90e90c9f5c2770e46ceb127813d3f20c34</id>
<content type='text'>
This is a combination of the the Intel algorithm implemented using SSE
and PCLMULQDQ instructions from arch/x86/crypto/crc32-pclmul_asm.S, and
the new CRC32 extensions introduced for both 32-bit and 64-bit ARM in
version 8 of the architecture. Two versions of the above combo are
provided, one for CRC32 and one for CRC32C.

The PMULL/NEON algorithm is faster, but operates on blocks of at least
64 bytes, and on multiples of 16 bytes only. For the remaining input,
or for all input on systems that lack the PMULL 64x64-&gt;128 instructions,
the CRC32 instructions will be used.

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: arm64/crct10dif - port x86 SSE implementation to arm64</title>
<updated>2016-12-07T12:01:17Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2016-12-05T18:42:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ef5737f39314907704d68719b74fcca11f4f342'/>
<id>urn:sha1:6ef5737f39314907704d68719b74fcca11f4f342</id>
<content type='text'>
This is a transliteration of the Intel algorithm implemented
using SSE and PCLMULQDQ instructions that resides in the file
arch/x86/crypto/crct10dif-pcl-asm_64.S, but simplified to only
operate on buffers that are 16 byte aligned (but of any size)

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: arm64/sha2 - integrate OpenSSL implementations of SHA256/SHA512</title>
<updated>2016-11-28T11:58:05Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2016-11-20T11:42:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7918ecef073fe80eeb399a37d8d48561864eedf1'/>
<id>urn:sha1:7918ecef073fe80eeb399a37d8d48561864eedf1</id>
<content type='text'>
This integrates both the accelerated scalar and the NEON implementations
of SHA-224/256 as well as SHA-384/512 from the OpenSSL project.

Relative performance compared to the respective generic C versions:

                 |  SHA256-scalar  | SHA256-NEON* |  SHA512  |
     ------------+-----------------+--------------+----------+
     Cortex-A53  |      1.63x      |     1.63x    |   2.34x  |
     Cortex-A57  |      1.43x      |     1.59x    |   1.95x  |
     Cortex-A73  |      1.26x      |     1.56x    |     ?    |

The core crypto code was authored by Andy Polyakov of the OpenSSL
project, in collaboration with whom the upstream code was adapted so
that this module can be built from the same version of sha512-armv8.pl.

The version in this patch was taken from OpenSSL commit 32bbb62ea634
("sha/asm/sha512-armv8.pl: fix big-endian support in __KERNEL__ case.")

* The core SHA algorithm is fundamentally sequential, but there is a
  secondary transformation involved, called the schedule update, which
  can be performed independently. The NEON version of SHA-224/SHA-256
  only implements this part of the algorithm using NEON instructions,
  the sequential part is always done using scalar instructions.

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>arm64: crypto: increase AES interleave to 4x</title>
<updated>2015-02-26T18:31:46Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2015-02-19T17:25:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0eee0fbd41c7b57d01136df2519c92ec1506e333'/>
<id>urn:sha1:0eee0fbd41c7b57d01136df2519c92ec1506e333</id>
<content type='text'>
This patch increases the interleave factor for parallel AES modes
to 4x. This improves performance on Cortex-A57 by ~35%. This is
due to the 3-cycle latency of AES instructions on the A57's
relatively deep pipeline (compared to Cortex-A53 where the AES
instruction latency is only 2 cycles).

At the same time, disable inline expansion of the core AES functions,
as the performance benefit of this feature is negligible.

  Measured on AMD Seattle (using tcrypt.ko mode=500 sec=1):

  Baseline (2x interleave, inline expansion)
  ------------------------------------------
  testing speed of async cbc(aes) (cbc-aes-ce) decryption
  test 4 (128 bit key, 8192 byte blocks): 95545 operations in 1 seconds
  test 14 (256 bit key, 8192 byte blocks): 68496 operations in 1 seconds

  This patch (4x interleave, no inline expansion)
  -----------------------------------------------
  testing speed of async cbc(aes) (cbc-aes-ce) decryption
  test 4 (128 bit key, 8192 byte blocks): 124735 operations in 1 seconds
  test 14 (256 bit key, 8192 byte blocks): 92328 operations in 1 seconds

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
</feed>
