crypto: af_alg - User-space interface for Crypto API
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 19 Oct 2010 13:12:39 +0000 (21:12 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 19 Nov 2010 09:47:57 +0000 (17:47 +0800)
commit03c8efc1ffeb6b82a22c1af8dd908af349563314
treea2538f6c5151ca92aadac3d52d9703d39d254584
parentc2f9bff5ace07fbea03a53c6c3253f6c3a81e9f9
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 <herbert@gondor.apana.org.au>
Acked-by: David S. Miller <davem@davemloft.net>
Tested-by: Martin Willi <martin@strongswan.org>
crypto/Kconfig
crypto/Makefile
crypto/af_alg.c [new file with mode: 0644]
include/crypto/if_alg.h [new file with mode: 0644]
include/linux/if_alg.h [new file with mode: 0644]