alistair23-linux/crypto
Herbert Xu fe869cdb89 crypto: algif_hash - User-space interface for hash operations
This patch adds the af_alg plugin for hash, corresponding to
the ahash kernel operation type.

Keys can optionally be set through the setsockopt interface.

Each sendmsg call will finalise the hash unless sent with a MSG_MORE
flag.

Partial hash states can be cloned using accept(2).

The interface is completely synchronous, all operations will
complete prior to the system call returning.

Both sendmsg(2) and splice(2) support reading the user-space
data directly without copying (except that the Crypto API itself
may copy the data if alignment is off).

For now only the splice(2) interface supports performing digest
instead of init/update/final.  In future the sendmsg(2) interface
will also be modified to use digest/finup where possible so that
hardware that cannot return a partial hash state can still benefit
from this interface.

Thakns to Miloslav Trmac for reviewing this and contributing
fixes and improvements.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: David S. Miller <davem@davemloft.net>
Tested-by: Martin Willi <martin@strongswan.org>
2010-11-19 17:47:58 +08:00
..
async_tx Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2010-10-27 19:04:36 -07:00
ablkcipher.c crypto: skcipher - avoid NULL dereference 2010-06-23 20:01:45 +10:00
aead.c crypto: aead - Fix checkpatch errors 2010-02-16 20:24:07 +08:00
aes_generic.c crypto: aes_generic - Fix checkpatch errors 2010-02-16 20:34:59 +08:00
af_alg.c crypto: af_alg - User-space interface for Crypto API 2010-11-19 17:47:57 +08:00
ahash.c crypto: hash - Fix handling of small unaligned buffers 2010-08-06 09:26:38 +08:00
algapi.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-03 11:28:58 +08:00
algboss.c crypto: testmgr - Fix test disabling option 2010-08-06 09:40:28 +08:00
algif_hash.c crypto: algif_hash - User-space interface for hash operations 2010-11-19 17:47:58 +08:00
ansi_cprng.c crypto: ansi_cprng - Move FIPS functions under CONFIG_CRYPTO_FIPS 2009-11-23 20:25:50 +08:00
anubis.c crypto: anubis - Fix checkpatch errors 2010-02-16 20:25:39 +08:00
api.c crypto: api - Fix checkpatch errors 2010-02-16 20:26:46 +08:00
arc4.c
authenc.c crypto: Use ERR_CAST 2010-05-26 10:36:51 +10:00
blkcipher.c mm: strictly nested kmap_atomic() 2010-10-26 16:52:08 -07:00
blowfish.c crypto: blowfish - Fix checkpatch errors 2010-02-16 20:24:30 +08:00
camellia.c crypto: camellia - Fix checkpatch errors 2010-02-16 20:27:57 +08:00
cast5.c crypto: cast5 - simplify if-statements 2010-11-13 21:47:55 +09:00
cast6.c crypto: cast6 - Fix checkpatch errors 2010-02-16 20:29:45 +08:00
cbc.c
ccm.c crypto: ccm - Fix handling of null assoc data 2009-01-27 17:11:15 +11:00
chainiv.c crypto: chainiv - Use kcrypto_wq instead of keventd_wq 2009-02-19 14:44:02 +08:00
cipher.c crypto: cipher - Fix checkpatch errors 2010-02-16 20:31:37 +08:00
compress.c crypto: compress - Fix checkpatch errors 2010-02-16 20:31:04 +08:00
crc32c.c crypto: crc32 - Fix checkpatch errors 2010-02-16 20:31:19 +08:00
cryptd.c crypto: cryptd - Adding the AEAD interface type support to cryptd 2010-09-20 16:05:12 +08:00
crypto_null.c crypto: crypto_null - Fix checkpatch errors 2010-02-16 20:31:54 +08:00
crypto_wq.c crypto: api - Use dedicated workqueue for crypto subsystem 2009-02-19 14:33:40 +08:00
ctr.c crypto: Use ERR_CAST 2010-05-26 10:36:51 +10:00
cts.c
deflate.c crypto: deflate - Fix checkpatch errors 2010-02-16 20:32:13 +08:00
des_generic.c Blackfin: Rename DES PC2() symbol to avoid collision 2010-10-07 14:08:50 +01:00
ecb.c crypto: ecb - Fix checkpatch errors 2010-02-16 20:33:49 +08:00
eseqiv.c crypto: eseqiv - Fix IV generation for sync algorithms 2009-04-15 20:45:03 +08:00
fcrypt.c crypto: fcrypt - Fix checkpatch errors 2010-02-16 20:34:07 +08:00
fips.c
gcm.c crypto: gcm - Add RFC4543 wrapper for GCM 2010-01-17 21:52:11 +11:00
gf128mul.c crypto: Fix dead links 2009-03-04 14:43:52 +08:00
ghash-generic.c crypto: ghash - Add GHASH digest algorithm for GCM 2009-08-06 15:32:38 +10:00
hmac.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
internal.h crypto: internal - Fix checkpatch errors 2010-03-10 18:24:46 +08:00
Kconfig crypto: algif_hash - User-space interface for hash operations 2010-11-19 17:47:58 +08:00
khazad.c
krng.c
lrw.c crypto: lrw - Fix big endian support 2009-02-17 20:00:11 +08:00
lzo.c
Makefile crypto: algif_hash - User-space interface for hash operations 2010-11-19 17:47:58 +08:00
md4.c crypto: md4 - Switch to shash 2008-12-25 11:02:16 +11:00
md5.c crypto: md5 - Set statesize 2010-03-02 21:58:16 +08:00
michael_mic.c crypto: michael_mic - Switch to shash 2008-12-25 11:02:24 +11:00
pcbc.c
pcompress.c crypto: api - Remove frontend argument from extsize/init_tfm 2009-07-14 12:58:15 +08:00
pcrypt.c crypto: pcrypt - Update pcrypt cpumask according to the padata cpumask notifier 2010-07-31 19:53:06 +08:00
proc.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2009-12-08 15:55:13 -08:00
ripemd.h
rmd128.c crypto: rmd128 - Switch to shash 2008-12-25 11:02:09 +11:00
rmd160.c crypto: rmd160 - Switch to shash 2008-12-25 11:02:10 +11:00
rmd256.c crypto: rmd256 - Switch to shash 2008-12-25 11:02:12 +11:00
rmd320.c crypto: rmd320 - Switch to shash 2008-12-25 11:02:13 +11:00
rng.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
salsa20_generic.c crypto: salsa20 - Remove private wrappers around various operations 2008-12-25 11:02:30 +11:00
scatterwalk.c crypto: scatterwalk - Fix scatterwalk_done() test 2010-05-19 14:06:29 +10:00
seed.c
seqiv.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
serpent.c
sha1_generic.c crypto: sha1_generic - Add export/import support 2009-07-11 18:23:33 +08:00
sha256_generic.c crypto: sha256_generic - Add export/import support 2009-07-11 18:23:34 +08:00
sha512_generic.c crypto: sha512_generic - Use 64-bit counters 2009-07-22 14:38:13 +08:00
shash.c crypto: hash - Fix async import on shash algorithm 2010-11-04 14:48:37 -04:00
tcrypt.c crypto: rfc4106 - Extending the RC4106 AES-GCM test vectors 2010-11-13 21:47:56 +09:00
tcrypt.h crypto: tcrypt - Speed testing support for ghash 2010-03-10 18:30:32 +08:00
tea.c
testmgr.c crypto: rfc4106 - Extending the RC4106 AES-GCM test vectors 2010-11-13 21:47:56 +09:00
testmgr.h crypto: rfc4106 - Extending the RC4106 AES-GCM test vectors 2010-11-13 21:47:56 +09:00
tgr192.c crypto: tgr192 - Switch to shash 2008-12-25 11:02:21 +11:00
twofish_common.c
twofish_generic.c crypto: twofish: Rename twofish to twofish_generic and add an alias 2010-06-03 21:02:51 +10:00
vmac.c crypto: vmac - Fix big-endian support 2010-03-18 20:22:55 +08:00
wp512.c crypto: wp512 - Switch to shash 2008-12-25 11:02:22 +11:00
xcbc.c crypto: xcbc - Fix alignment calculation of xcbc_tfm_ctx 2009-08-20 17:58:04 +10:00
xor.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
xts.c crypto: Use ERR_CAST 2010-05-26 10:36:51 +10:00
zlib.c crypto: compress - Return produced bytes in crypto_{,de}compress_{update,final} 2009-06-02 14:04:56 +10:00