<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/crypto, branch v3.13</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include/crypto?h=v3.13</id>
<link rel='self' href='https://git.amat.us/linux/atom/include/crypto?h=v3.13'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-12-09T11:58:52Z</updated>
<entry>
<title>crypto: scatterwalk - Use sg_chain_ptr on chain entries</title>
<updated>2013-12-09T11:58:52Z</updated>
<author>
<name>Tom Lendacky</name>
<email>thomas.lendacky@amd.com</email>
</author>
<published>2013-12-05T19:09:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=389a5390583a18e45bc4abd4439291abec5e7a63'/>
<id>urn:sha1:389a5390583a18e45bc4abd4439291abec5e7a63</id>
<content type='text'>
Now that scatterwalk_sg_chain sets the chain pointer bit the sg_page
call in scatterwalk_sg_next hits a BUG_ON when CONFIG_DEBUG_SG is
enabled. Use sg_chain_ptr instead of sg_page on a chain entry.

Cc: stable@vger.kernel.org
Signed-off-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: scatterwalk - Set the chain pointer indication bit</title>
<updated>2013-11-28T14:16:24Z</updated>
<author>
<name>Tom Lendacky</name>
<email>thomas.lendacky@amd.com</email>
</author>
<published>2013-11-12T17:46:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=41da8b5adba77e22584f8b45f9641504fa885308'/>
<id>urn:sha1:41da8b5adba77e22584f8b45f9641504fa885308</id>
<content type='text'>
The scatterwalk_crypto_chain function invokes the scatterwalk_sg_chain
function to chain two scatterlists, but the chain pointer indication
bit is not set.  When the resulting scatterlist is used, for example,
by sg_nents to count the number of scatterlist entries, a segfault occurs
because sg_nents does not follow the chain pointer to the chained scatterlist.

Update scatterwalk_sg_chain to set the chain pointer indication bit as is
done by the sg_chain function.

Cc: stable@vger.kernel.org
Signed-off-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2013-11-24T00:18:25Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-11-24T00:18:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=26b265cd29dde56bf0901c421eabc7ae815f38c4'/>
<id>urn:sha1:26b265cd29dde56bf0901c421eabc7ae815f38c4</id>
<content type='text'>
Pull crypto update from Herbert Xu:
 - Made x86 ablk_helper generic for ARM
 - Phase out chainiv in favour of eseqiv (affects IPsec)
 - Fixed aes-cbc IV corruption on s390
 - Added constant-time crypto_memneq which replaces memcmp
 - Fixed aes-ctr in omap-aes
 - Added OMAP3 ROM RNG support
 - Add PRNG support for MSM SoC's
 - Add and use Job Ring API in caam
 - Misc fixes

[ NOTE! This pull request was sent within the merge window, but Herbert
  has some questionable email sending setup that makes him public enemy
  #1 as far as gmail is concerned.  So most of his emails seem to be
  trapped by gmail as spam, resulting in me not seeing them.  - Linus ]

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (49 commits)
  crypto: s390 - Fix aes-cbc IV corruption
  crypto: omap-aes - Fix CTR mode counter length
  crypto: omap-sham - Add missing modalias
  padata: make the sequence counter an atomic_t
  crypto: caam - Modify the interface layers to use JR API's
  crypto: caam - Add API's to allocate/free Job Rings
  crypto: caam - Add Platform driver for Job Ring
  hwrng: msm - Add PRNG support for MSM SoC's
  ARM: DT: msm: Add Qualcomm's PRNG driver binding document
  crypto: skcipher - Use eseqiv even on UP machines
  crypto: talitos - Simplify key parsing
  crypto: picoxcell - Simplify and harden key parsing
  crypto: ixp4xx - Simplify and harden key parsing
  crypto: authencesn - Simplify key parsing
  crypto: authenc - Export key parsing helper function
  crypto: mv_cesa: remove deprecated IRQF_DISABLED
  hwrng: OMAP3 ROM Random Number Generator support
  crypto: sha256_ssse3 - also test for BMI2
  crypto: mv_cesa - Remove redundant of_match_ptr
  crypto: sahara - Remove redundant of_match_ptr
  ...
</content>
</entry>
<entry>
<title>keys: change asymmetric keys to use common hash definitions</title>
<updated>2013-10-25T21:15:18Z</updated>
<author>
<name>Dmitry Kasatkin</name>
<email>d.kasatkin@samsung.com</email>
</author>
<published>2013-05-06T12:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3fe78ca2fb1d61ea598e63fcbf38aec76b36b3a8'/>
<id>urn:sha1:3fe78ca2fb1d61ea598e63fcbf38aec76b36b3a8</id>
<content type='text'>
This patch makes use of the newly defined common hash algorithm info,
replacing, for example, PKEY_HASH with HASH_ALGO.

Changelog:
- Lindent fixes - Mimi

CC: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Dmitry Kasatkin &lt;d.kasatkin@samsung.com&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>crypto: provide single place for hash algo information</title>
<updated>2013-10-25T21:14:03Z</updated>
<author>
<name>Dmitry Kasatkin</name>
<email>d.kasatkin@samsung.com</email>
</author>
<published>2013-05-06T12:40:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ee08997fee16f10be23c9748d609dbdf3baab8e4'/>
<id>urn:sha1:ee08997fee16f10be23c9748d609dbdf3baab8e4</id>
<content type='text'>
This patch provides a single place for information about hash algorithms,
such as hash sizes and kernel driver names, which will be used by IMA
and the public key code.

Changelog:
- Fix sparse and checkpatch warnings
- Move hash algo enums to uapi for userspace signing functions.

Signed-off-by: Dmitry Kasatkin &lt;d.kasatkin@samsung.com&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: authenc - Export key parsing helper function</title>
<updated>2013-10-16T12:56:25Z</updated>
<author>
<name>Mathias Krause</name>
<email>mathias.krause@secunet.com</email>
</author>
<published>2013-10-15T11:49:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bc6e2bdb71056607141ada309a185f0a50b1aeaf'/>
<id>urn:sha1:bc6e2bdb71056607141ada309a185f0a50b1aeaf</id>
<content type='text'>
AEAD key parsing is duplicated to multiple places in the kernel. Add a
common helper function to consolidate that functionality.

Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: Mathias Krause &lt;mathias.krause@secunet.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: crypto_memneq - add equality testing of memory regions w/o timing leaks</title>
<updated>2013-10-07T06:17:06Z</updated>
<author>
<name>James Yonan</name>
<email>james@openvpn.net</email>
</author>
<published>2013-09-26T08:20:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6bf37e5aa90f18baf5acf4874bca505dd667c37f'/>
<id>urn:sha1:6bf37e5aa90f18baf5acf4874bca505dd667c37f</id>
<content type='text'>
When comparing MAC hashes, AEAD authentication tags, or other hash
values in the context of authentication or integrity checking, it
is important not to leak timing information to a potential attacker,
i.e. when communication happens over a network.

Bytewise memory comparisons (such as memcmp) are usually optimized so
that they return a nonzero value as soon as a mismatch is found. E.g,
on x86_64/i5 for 512 bytes this can be ~50 cyc for a full mismatch
and up to ~850 cyc for a full match (cold). This early-return behavior
can leak timing information as a side channel, allowing an attacker to
iteratively guess the correct result.

This patch adds a new method crypto_memneq ("memory not equal to each
other") to the crypto API that compares memory areas of the same length
in roughly "constant time" (cache misses could change the timing, but
since they don't reveal information about the content of the strings
being compared, they are effectively benign). Iow, best and worst case
behaviour take the same amount of time to complete (in contrast to
memcmp).

Note that crypto_memneq (unlike memcmp) can only be used to test for
equality or inequality, NOT for lexicographical order. This, however,
is not an issue for its use-cases within the crypto API.

We tried to locate all of the places in the crypto API where memcmp was
being used for authentication or integrity checking, and convert them
over to crypto_memneq.

crypto_memneq is declared noinline, placed in its own source file,
and compiled with optimizations that might increase code size disabled
("Os") because a smart compiler (or LTO) might notice that the return
value is always compared against zero/nonzero, and might then
reintroduce the same early-return optimization that we are trying to
avoid.

Using #pragma or __attribute__ optimization annotations of the code
for disabling optimization was avoided as it seems to be considered
broken or unmaintained for long time in GCC [1]. Therefore, we work
around that by specifying the compile flag for memneq.o directly in
the Makefile. We found that this seems to be most appropriate.

As we use ("Os"), this patch also provides a loop-free "fast-path" for
frequently used 16 byte digests. Similarly to kernel library string
functions, leave an option for future even further optimized architecture
specific assembler implementations.

This was a joint work of James Yonan and Daniel Borkmann. Also thanks
for feedback from Florian Weimer on this and earlier proposals [2].

  [1] http://gcc.gnu.org/ml/gcc/2012-07/msg00211.html
  [2] https://lkml.org/lkml/2013/2/10/131

Signed-off-by: James Yonan &lt;james@openvpn.net&gt;
Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Cc: Florian Weimer &lt;fw@deneb.enyo.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>KEYS: Store public key algo ID in public_key_signature struct</title>
<updated>2013-09-25T16:17:00Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2013-08-30T15:15:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1573801fa89d022b9f5bd1b189d23221335f9f56'/>
<id>urn:sha1:1573801fa89d022b9f5bd1b189d23221335f9f56</id>
<content type='text'>
Store public key algorithm ID in public_key_signature struct for reference
purposes.  This allows a public_key_signature struct to be embedded in
struct x509_certificate and other places more easily.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Josh Boyer &lt;jwboyer@redhat.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Store public key algo ID in public_key struct</title>
<updated>2013-09-25T16:17:00Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2013-08-30T15:15:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=67f7d60b3a08a3e3ec51c29c25767a9d9d0bd2b1'/>
<id>urn:sha1:67f7d60b3a08a3e3ec51c29c25767a9d9d0bd2b1</id>
<content type='text'>
Store public key algo ID in public_key struct for reference purposes.  This
allows it to be removed from the x509_certificate struct and used to find a
default in public_key_verify_signature().

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Josh Boyer &lt;jwboyer@redhat.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Move the algorithm pointer array from x509 to public_key.c</title>
<updated>2013-09-25T14:51:07Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2013-08-30T15:15:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=206ce59a109f3b4bb352845bcd04f3cf504ae592'/>
<id>urn:sha1:206ce59a109f3b4bb352845bcd04f3cf504ae592</id>
<content type='text'>
Move the public-key algorithm pointer array from x509_public_key.c to
public_key.c as it isn't X.509 specific.

Note that to make this configure correctly, the public key part must be
dependent on the RSA module rather than the other way round.  This needs a
further patch to make use of the crypto module loading stuff rather than using
a fixed table.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Josh Boyer &lt;jwboyer@redhat.com&gt;
</content>
</entry>
</feed>
