summaryrefslogtreecommitdiffstats
path: root/net/lapb/lapb_iface.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.hengli.com.au>2010-11-26 20:58:24 +0800
committerMiloslav Trmač <mitr@redhat.com>2010-11-28 04:54:31 +0100
commitc99d5ffce2f479f442482c4f212a0efa210ba140 (patch)
treebdf5222d5f91e5b2fe37124fee47b0b39eefcf2f /net/lapb/lapb_iface.c
parent99b062afec65c2cb9b06b5f9257fbdd45f763cd1 (diff)
downloadkernel-crypto-c99d5ffce2f479f442482c4f212a0efa210ba140.tar.gz
kernel-crypto-c99d5ffce2f479f442482c4f212a0efa210ba140.tar.xz
kernel-crypto-c99d5ffce2f479f442482c4f212a0efa210ba140.zip
crypto: algif_hash - User-space interface for hash operations
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>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions