<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/crypto/inside-secure, branch v5.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-07-09T03:57:08Z</updated>
<entry>
<title>Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2019-07-09T03:57:08Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-07-09T03:57:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d2fa8b44b891f0da5ceda3e5a1402ccf0ab6f26'/>
<id>urn:sha1:4d2fa8b44b891f0da5ceda3e5a1402ccf0ab6f26</id>
<content type='text'>
Pull crypto updates from Herbert Xu:
 "Here is the crypto update for 5.3:

  API:
   - Test shash interface directly in testmgr
   - cra_driver_name is now mandatory

  Algorithms:
   - Replace arc4 crypto_cipher with library helper
   - Implement 5 way interleave for ECB, CBC and CTR on arm64
   - Add xxhash
   - Add continuous self-test on noise source to drbg
   - Update jitter RNG

  Drivers:
   - Add support for SHA204A random number generator
   - Add support for 7211 in iproc-rng200
   - Fix fuzz test failures in inside-secure
   - Fix fuzz test failures in talitos
   - Fix fuzz test failures in qat"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (143 commits)
  crypto: stm32/hash - remove interruptible condition for dma
  crypto: stm32/hash - Fix hmac issue more than 256 bytes
  crypto: stm32/crc32 - rename driver file
  crypto: amcc - remove memset after dma_alloc_coherent
  crypto: ccp - Switch to SPDX license identifiers
  crypto: ccp - Validate the the error value used to index error messages
  crypto: doc - Fix formatting of new crypto engine content
  crypto: doc - Add parameter documentation
  crypto: arm64/aes-ce - implement 5 way interleave for ECB, CBC and CTR
  crypto: arm64/aes-ce - add 5 way interleave routines
  crypto: talitos - drop icv_ool
  crypto: talitos - fix hash on SEC1.
  crypto: talitos - move struct talitos_edesc into talitos.h
  lib/scatterlist: Fix mapping iterator when sg-&gt;offset is greater than PAGE_SIZE
  crypto/NX: Set receive window credits to max number of CRBs in RxFIFO
  crypto: asymmetric_keys - select CRYPTO_HASH where needed
  crypto: serpent - mark __serpent_setkey_sbox noinline
  crypto: testmgr - dynamically allocate crypto_shash
  crypto: testmgr - dynamically allocate testvec_config
  crypto: talitos - eliminate unneeded 'done' functions at build time
  ...
</content>
</entry>
<entry>
<title>crypto: inside-secure - do not rely on the hardware last bit for result descriptors</title>
<updated>2019-06-06T06:38:56Z</updated>
<author>
<name>Antoine Tenart</name>
<email>antoine.tenart@bootlin.com</email>
</author>
<published>2019-05-27T14:51:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=89332590427235680236b9470e851afc49b3caa1'/>
<id>urn:sha1:89332590427235680236b9470e851afc49b3caa1</id>
<content type='text'>
When performing a transformation the hardware is given result
descriptors to save the result data. Those result descriptors are
batched using a 'first' and a 'last' bit. There are cases were more
descriptors than needed are given to the engine, leading to the engine
only using some of them, and not setting the last bit on the last
descriptor we gave. This causes issues were the driver and the hardware
aren't in sync anymore about the number of result descriptors given (as
the driver do not give a pool of descriptor to use for any
transformation, but a pool of descriptors to use *per* transformation).

This patch fixes it by attaching the number of given result descriptors
to the requests, and by using this number instead of the 'last' bit
found on the descriptors to process them.

Signed-off-by: Antoine Tenart &lt;antoine.tenart@bootlin.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: inside-secure - fix use of the SG list</title>
<updated>2019-06-06T06:38:56Z</updated>
<author>
<name>Antoine Tenart</name>
<email>antoine.tenart@bootlin.com</email>
</author>
<published>2019-05-27T14:51:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=583d7e195f48753c5da8cc75a8ed332cad7287b0'/>
<id>urn:sha1:583d7e195f48753c5da8cc75a8ed332cad7287b0</id>
<content type='text'>
Replace sg_nents_for_len by sg_nents when DMA mapping/unmapping buffers
and when looping over the SG entries. This fix cases where the SG
entries aren't used fully, which would in such cases led to using fewer
SG entries than needed (and thus the engine wouldn't have access to the
full input data and the result would be wrong).

Signed-off-by: Antoine Tenart &lt;antoine.tenart@bootlin.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: inside-secure - add support for HMAC updates</title>
<updated>2019-06-06T06:38:56Z</updated>
<author>
<name>Antoine Tenart</name>
<email>antoine.tenart@bootlin.com</email>
</author>
<published>2019-05-27T14:51:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=082ec2d48467b61aa89783e954645ec441714c4e'/>
<id>urn:sha1:082ec2d48467b61aa89783e954645ec441714c4e</id>
<content type='text'>
This patch adds support for HMAC updates in the Inside Secure SafeXcel
crypto engine driver. Updates were supported for hash algorithms, but
were never enabled for HMAC ones. This fixes boot time test issues.

Signed-off-by: Antoine Tenart &lt;antoine.tenart@bootlin.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: inside-secure - implement IV retrieval</title>
<updated>2019-06-06T06:38:56Z</updated>
<author>
<name>Antoine Tenart</name>
<email>antoine.tenart@bootlin.com</email>
</author>
<published>2019-05-27T14:51:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=57660b11d5adbb18182e9388b83b7fb214c4e1a1'/>
<id>urn:sha1:57660b11d5adbb18182e9388b83b7fb214c4e1a1</id>
<content type='text'>
This patch adds support for retrieving intermediate IV from the crypto
engine when using the CBC block mode with AES and (3)DES. The retrieved
IV is copied to the request IV buffer, as requested by the kernel crypto
API.

This fix boot tests added by
commit 8efd972ef96a ("crypto: testmgr - support checking skcipher output IV").

Signed-off-by: Antoine Tenart &lt;antoine.tenart@bootlin.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: inside-secure - fix queued len computation</title>
<updated>2019-06-06T06:38:56Z</updated>
<author>
<name>Antoine Tenart</name>
<email>antoine.tenart@bootlin.com</email>
</author>
<published>2019-05-27T14:51:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ccd65a206a5025cf953a2e4f37e894921b131a5c'/>
<id>urn:sha1:ccd65a206a5025cf953a2e4f37e894921b131a5c</id>
<content type='text'>
This patch fixes the queued len computation, which could theoretically
be wrong if req-&gt;len[1] - req-&gt;processed[1] &gt; 1. Be future-proof here,
and fix it.

Fixes: b460edb6230a ("crypto: inside-secure - sha512 support")
Signed-off-by: Antoine Tenart &lt;antoine.tenart@bootlin.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: inside-secure - fix zeroing of the request in ahash_exit_inv</title>
<updated>2019-06-06T06:38:56Z</updated>
<author>
<name>Antoine Tenart</name>
<email>antoine.tenart@bootlin.com</email>
</author>
<published>2019-05-27T14:51:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b926213d6fede9c9427d7c12eaf7d9f0895deb4e'/>
<id>urn:sha1:b926213d6fede9c9427d7c12eaf7d9f0895deb4e</id>
<content type='text'>
A request is zeroed in safexcel_ahash_exit_inv(). This request total
size is EIP197_AHASH_REQ_SIZE while the memset zeroing it uses
sizeof(struct ahash_request), which happens to be less than
EIP197_AHASH_REQ_SIZE. This patch fixes it.

Fixes: f6beaea30487 ("crypto: inside-secure - authenc(hmac(sha256), cbc(aes)) support")
Signed-off-by: Antoine Tenart &lt;antoine.tenart@bootlin.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: inside-secure - unify cache reset</title>
<updated>2019-06-06T06:38:56Z</updated>
<author>
<name>Antoine Tenart</name>
<email>antoine.tenart@bootlin.com</email>
</author>
<published>2019-05-27T14:51:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa52428698aeb1c1d4ebb7c3e9de3e7bdce25704'/>
<id>urn:sha1:aa52428698aeb1c1d4ebb7c3e9de3e7bdce25704</id>
<content type='text'>
This patch unify the way the cache related data is zeroed when the cache
buffer is DMA unmapped. It should not change the driver behaviour, but
improves the code safety and readability.

Signed-off-by: Antoine Tenart &lt;antoine.tenart@bootlin.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: inside-secure - enable context reuse</title>
<updated>2019-06-06T06:38:56Z</updated>
<author>
<name>Antoine Tenart</name>
<email>antoine.tenart@bootlin.com</email>
</author>
<published>2019-05-27T14:50:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=97a1440d12947293ff3f0eb9b649052927a55ed8'/>
<id>urn:sha1:97a1440d12947293ff3f0eb9b649052927a55ed8</id>
<content type='text'>
The context given to the crypto engine can be reused over time. While
the driver was designed to allow this, the feature wasn't enabled in the
hardware engine. This patch enables it.

Signed-off-by: Antoine Tenart &lt;antoine.tenart@bootlin.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: inside-secure - change returned error when a descriptor reports an error</title>
<updated>2019-06-06T06:38:56Z</updated>
<author>
<name>Antoine Tenart</name>
<email>antoine.tenart@bootlin.com</email>
</author>
<published>2019-05-27T14:50:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=082a9d0918d2aae48dc3b836a8e3ca6aa53d2495'/>
<id>urn:sha1:082a9d0918d2aae48dc3b836a8e3ca6aa53d2495</id>
<content type='text'>
This patch changes the error reported by the Inside Secure SafeXcel
driver when a result descriptor reports an error, from -EIO to -EINVAL,
as this is what the crypto framework expects. This was found while
running the crypto extra tests.

Signed-off-by: Antoine Tenart &lt;antoine.tenart@bootlin.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
