aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/Kconfig
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2010-10-19 09:23:00 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2010-11-19 04:47:58 -0500
commitfe869cdb89c95d060c77eea20204d6c91f233b53 (patch)
treefb665d1f162e8bdf978d264ca24d8a07d7380316 /crypto/Kconfig
parent03c8efc1ffeb6b82a22c1af8dd908af349563314 (diff)
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 'crypto/Kconfig')
-rw-r--r--crypto/Kconfig8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 357e3caf4cbe..6db27d7ff8b3 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -844,6 +844,14 @@ config CRYPTO_ANSI_CPRNG
844config CRYPTO_USER_API 844config CRYPTO_USER_API
845 tristate 845 tristate
846 846
847config CRYPTO_USER_API_HASH
848 tristate "User-space interface for hash algorithms"
849 select CRYPTO_HASH
850 select CRYPTO_USER_API
851 help
852 This option enables the user-spaces interface for hash
853 algorithms.
854
847source "drivers/crypto/Kconfig" 855source "drivers/crypto/Kconfig"
848 856
849endif # if CRYPTO 857endif # if CRYPTO