<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/crypto/authenc.c, branch v2.6.26</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>[CRYPTO] authenc: Fix async crypto crash in crypto_authenc_genicv()</title>
<updated>2008-05-01T10:22:28+00:00</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2008-04-29T13:44:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=161613293fd4b7d5ceb1faab788f47e688e07a67'/>
<id>161613293fd4b7d5ceb1faab788f47e688e07a67</id>
<content type='text'>
crypto_authenc_givencrypt_done uses req-&gt;data as struct aead_givcrypt_request,
while it really points to a struct aead_request, causing this crash:

BUG: unable to handle kernel paging request at 6b6b6b6b
IP: [&lt;dc87517b&gt;] :authenc:crypto_authenc_genicv+0x23/0x109
*pde = 00000000
Oops: 0000 [#1] PREEMPT DEBUG_PAGEALLOC
Modules linked in: hifn_795x authenc esp4 aead xfrm4_mode_tunnel sha1_generic hmac crypto_hash]

Pid: 3074, comm: ping Not tainted (2.6.25 #4)
EIP: 0060:[&lt;dc87517b&gt;] EFLAGS: 00010296 CPU: 0
EIP is at crypto_authenc_genicv+0x23/0x109 [authenc]
EAX: daa04690 EBX: daa046e0 ECX: dab0a100 EDX: daa046b0
ESI: 6b6b6b6b EDI: dc872054 EBP: c033ff60 ESP: c033ff0c
 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process ping (pid: 3074, ti=c033f000 task=db883a80 task.ti=dab6c000)
Stack: 00000000 daa046b0 c0215a3e daa04690 dab0a100 00000000 ffffffff db9fd7f0
       dba208c0 dbbb1720 00000001 daa04720 00000001 c033ff54 c0119ca9 dc852a75
       c033ff60 c033ff60 daa046e0 00000000 00000001 c033ff6c dc87527b 00000001
Call Trace:
 [&lt;c0215a3e&gt;] ? dev_alloc_skb+0x14/0x29
 [&lt;c0119ca9&gt;] ? printk+0x15/0x17
 [&lt;dc87527b&gt;] ? crypto_authenc_givencrypt_done+0x1a/0x27 [authenc]
 [&lt;dc850cca&gt;] ? hifn_process_ready+0x34a/0x352 [hifn_795x]
 [&lt;dc8353c7&gt;] ? rhine_napipoll+0x3f2/0x3fd [via_rhine]
 [&lt;dc851a56&gt;] ? hifn_check_for_completion+0x4d/0xa6 [hifn_795x]
 [&lt;dc851ab9&gt;] ? hifn_tasklet_callback+0xa/0xc [hifn_795x]
 [&lt;c011d046&gt;] ? tasklet_action+0x3f/0x66
 [&lt;c011d230&gt;] ? __do_softirq+0x38/0x7a
 [&lt;c0105a5f&gt;] ? do_softirq+0x3e/0x71
 [&lt;c011d17c&gt;] ? irq_exit+0x2c/0x65
 [&lt;c010e0c0&gt;] ? smp_apic_timer_interrupt+0x5f/0x6a
 [&lt;c01042e4&gt;] ? apic_timer_interrupt+0x28/0x30
 [&lt;dc851640&gt;] ? hifn_handle_req+0x44a/0x50d [hifn_795x]
 ...

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
crypto_authenc_givencrypt_done uses req-&gt;data as struct aead_givcrypt_request,
while it really points to a struct aead_request, causing this crash:

BUG: unable to handle kernel paging request at 6b6b6b6b
IP: [&lt;dc87517b&gt;] :authenc:crypto_authenc_genicv+0x23/0x109
*pde = 00000000
Oops: 0000 [#1] PREEMPT DEBUG_PAGEALLOC
Modules linked in: hifn_795x authenc esp4 aead xfrm4_mode_tunnel sha1_generic hmac crypto_hash]

Pid: 3074, comm: ping Not tainted (2.6.25 #4)
EIP: 0060:[&lt;dc87517b&gt;] EFLAGS: 00010296 CPU: 0
EIP is at crypto_authenc_genicv+0x23/0x109 [authenc]
EAX: daa04690 EBX: daa046e0 ECX: dab0a100 EDX: daa046b0
ESI: 6b6b6b6b EDI: dc872054 EBP: c033ff60 ESP: c033ff0c
 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process ping (pid: 3074, ti=c033f000 task=db883a80 task.ti=dab6c000)
Stack: 00000000 daa046b0 c0215a3e daa04690 dab0a100 00000000 ffffffff db9fd7f0
       dba208c0 dbbb1720 00000001 daa04720 00000001 c033ff54 c0119ca9 dc852a75
       c033ff60 c033ff60 daa046e0 00000000 00000001 c033ff6c dc87527b 00000001
Call Trace:
 [&lt;c0215a3e&gt;] ? dev_alloc_skb+0x14/0x29
 [&lt;c0119ca9&gt;] ? printk+0x15/0x17
 [&lt;dc87527b&gt;] ? crypto_authenc_givencrypt_done+0x1a/0x27 [authenc]
 [&lt;dc850cca&gt;] ? hifn_process_ready+0x34a/0x352 [hifn_795x]
 [&lt;dc8353c7&gt;] ? rhine_napipoll+0x3f2/0x3fd [via_rhine]
 [&lt;dc851a56&gt;] ? hifn_check_for_completion+0x4d/0xa6 [hifn_795x]
 [&lt;dc851ab9&gt;] ? hifn_tasklet_callback+0xa/0xc [hifn_795x]
 [&lt;c011d046&gt;] ? tasklet_action+0x3f/0x66
 [&lt;c011d230&gt;] ? __do_softirq+0x38/0x7a
 [&lt;c0105a5f&gt;] ? do_softirq+0x3e/0x71
 [&lt;c011d17c&gt;] ? irq_exit+0x2c/0x65
 [&lt;c010e0c0&gt;] ? smp_apic_timer_interrupt+0x5f/0x6a
 [&lt;c01042e4&gt;] ? apic_timer_interrupt+0x28/0x30
 [&lt;dc851640&gt;] ? hifn_handle_req+0x44a/0x50d [hifn_795x]
 ...

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CRYPTO] authenc: Add givencrypt operation</title>
<updated>2008-01-10T21:16:50+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2007-12-10T08:20:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e56dd56418fcc024683d1638564a494d9e9aab85'/>
<id>e56dd56418fcc024683d1638564a494d9e9aab85</id>
<content type='text'>
This patch implements the givencrypt function for authenc.  It simply
calls the givencrypt operation on the underlying cipher instead of encrypt.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements the givencrypt function for authenc.  It simply
calls the givencrypt operation on the underlying cipher instead of encrypt.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CRYPTO] authenc: Use crypto_grab_skcipher</title>
<updated>2008-01-10T21:16:46+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2007-12-17T12:12:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9ffde35a8edd3486cd7c80af931c15cec99a1a0d'/>
<id>9ffde35a8edd3486cd7c80af931c15cec99a1a0d</id>
<content type='text'>
This patch converts the authenc algorithm over to crypto_grab_skcipher
which is a prerequisite for IV generation.

This patch also changes authenc to set its ASYNC status depending on
the ASYNC status of the underlying skcipher.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch converts the authenc algorithm over to crypto_grab_skcipher
which is a prerequisite for IV generation.

This patch also changes authenc to set its ASYNC status depending on
the ASYNC status of the underlying skcipher.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CRYPTO] authenc: Merge common hashing code</title>
<updated>2008-01-10T21:16:38+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2007-12-10T08:15:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7c3d703fa81db42f9766325cebd6bfc1c5eac838'/>
<id>7c3d703fa81db42f9766325cebd6bfc1c5eac838</id>
<content type='text'>
This patch merges the common hashing code between encryption and decryption.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch merges the common hashing code between encryption and decryption.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CRYPTO] authenc: Use RTA_OK to check length</title>
<updated>2008-01-10T21:16:38+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2007-12-10T02:55:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=12dc5e62b4f93f1d399fd81e35be3f9ea0027712'/>
<id>12dc5e62b4f93f1d399fd81e35be3f9ea0027712</id>
<content type='text'>
This patch changes setkey to use RTA_OK to check the validity of the
setkey request.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes setkey to use RTA_OK to check the validity of the
setkey request.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CRYPTO] authenc: Fix typo in ivsize</title>
<updated>2008-01-10T21:16:37+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2007-12-10T02:54:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c2c61f513db395ddd8d67690bf3301ebe1e8155a'/>
<id>c2c61f513db395ddd8d67690bf3301ebe1e8155a</id>
<content type='text'>
The ivsize should be fetched from ablkcipher, not blkcipher.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ivsize should be fetched from ablkcipher, not blkcipher.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CRYPTO] scatterwalk: Move scatterwalk.h to linux/crypto</title>
<updated>2008-01-10T21:16:32+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2007-12-07T10:52:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=42c271c6c538857cb13c5ead5184d264d745f675'/>
<id>42c271c6c538857cb13c5ead5184d264d745f675</id>
<content type='text'>
The scatterwalk infrastructure is used by algorithms so it needs to
move out of crypto for future users that may live in drivers/crypto
or asm/*/crypto.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The scatterwalk infrastructure is used by algorithms so it needs to
move out of crypto for future users that may live in drivers/crypto
or asm/*/crypto.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CRYPTO] aead: Return EBADMSG for ICV mismatch</title>
<updated>2008-01-10T21:16:32+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2007-12-04T09:07:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fe70f5dfe1a7b5caab96531089dac3d8728c0ebd'/>
<id>fe70f5dfe1a7b5caab96531089dac3d8728c0ebd</id>
<content type='text'>
This patch changes gcm/authenc to return EBADMSG instead of EINVAL for
ICV mismatches.  This convention has already been adopted by IPsec.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes gcm/authenc to return EBADMSG instead of EINVAL for
ICV mismatches.  This convention has already been adopted by IPsec.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CRYPTO] authenc: Fix hash verification</title>
<updated>2008-01-10T21:16:30+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2007-12-04T09:04:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=481f34ae752ac74c4cbd88a9954dd4ed10e84f81'/>
<id>481f34ae752ac74c4cbd88a9954dd4ed10e84f81</id>
<content type='text'>
The previous code incorrectly included the hash in the verification which
also meant that we'd crash and burn when it comes to actually verifying
the hash since we'd go past the end of the SG list.

This patch fixes that by subtracting authsize from cryptlen at the start.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous code incorrectly included the hash in the verification which
also meant that we'd crash and burn when it comes to actually verifying
the hash since we'd go past the end of the SG list.

This patch fixes that by subtracting authsize from cryptlen at the start.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CRYPTO] authenc: Move enckeylen into key itself</title>
<updated>2008-01-10T21:16:30+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2007-11-22T15:11:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e236d4a89a2ffbc8aa18064161f4f159c4d89b4a'/>
<id>e236d4a89a2ffbc8aa18064161f4f159c4d89b4a</id>
<content type='text'>
Having enckeylen as a template parameter makes it a pain for hardware
devices that implement ciphers with many key sizes since each one would
have to be registered separately.

Since the authenc algorithm is mainly used for legacy purposes where its
key is going to be constructed out of two separate keys, we can in fact
embed this value into the key itself.

This patch does this by prepending an rtnetlink header to the key that
contains the encryption key length.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Having enckeylen as a template parameter makes it a pain for hardware
devices that implement ciphers with many key sizes since each one would
have to be registered separately.

Since the authenc algorithm is mainly used for legacy purposes where its
key is going to be constructed out of two separate keys, we can in fact
embed this value into the key itself.

This patch does this by prepending an rtnetlink header to the key that
contains the encryption key length.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
</feed>
