Skip to content

Commit 03c8efc

Browse files
committed
crypto: af_alg - User-space interface for Crypto API
This patch creates the backbone of the user-space interface for the Crypto API, through a new socket family AF_ALG. Each session corresponds to one or more connections obtained from that socket. The number depends on the number of inputs/outputs of that particular type of operation. For most types there will be a s ingle connection/file descriptor that is used for both input and output. AEAD is one of the few that require two inputs. Each algorithm type will provide its own implementation that plugs into af_alg. They're keyed using a string such as "skcipher" or "hash". IOW this patch only contains the boring bits that is required to hold everything together. Thakns to Miloslav Trmac for reviewing this and contributing fixes and improvements. Signed-off-by: Herbert Xu <[email protected]> Acked-by: David S. Miller <[email protected]> Tested-by: Martin Willi <[email protected]>
1 parent c2f9bff commit 03c8efc

File tree

5 files changed

+618
-0
lines changed

5 files changed

+618
-0
lines changed

crypto/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,9 @@ config CRYPTO_ANSI_CPRNG
841841
ANSI X9.31 A.2.4. Note that this option must be enabled if
842842
CRYPTO_FIPS is selected
843843

844+
config CRYPTO_USER_API
845+
tristate
846+
844847
source "drivers/crypto/Kconfig"
845848

846849
endif # if CRYPTO

crypto/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ obj-$(CONFIG_CRYPTO_RNG2) += krng.o
8585
obj-$(CONFIG_CRYPTO_ANSI_CPRNG) += ansi_cprng.o
8686
obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
8787
obj-$(CONFIG_CRYPTO_GHASH) += ghash-generic.o
88+
obj-$(CONFIG_CRYPTO_USER_API) += af_alg.o
8889

8990
#
9091
# generic algorithms and the async_tx api

0 commit comments

Comments
 (0)