Thread (41 messages) 41 messages, 3 authors, 2014-11-21

Re: [PATCH v2 02/10] crypto: AF_ALG: user space interface for cipher info

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2014-11-18 14:08:34
Also in: linux-crypto, lkml

On Sun, Nov 16, 2014 at 03:24:25AM +0100, Stephan Mueller wrote:
The AF_ALG interface allows normal cipher (hash, encrypt, decrypt).
However, it does not allow user space to obtain the following generic
information about the currently active cipher:

	* block size of the cipher

	* IV size of the cipher

	* for AEAD, the maximum authentication tag size

The patch adds a getsockopt interface for the symmetric ciphers to
answer such information requests from user space.

The kernel crypto API function calls are used to obtain the real data.
As all data are simple integer values, the getsockopt handler function
uses put_user() to return the integer value to user space in the
*optval parameter of getsockopt.

Signed-off-by: Stephan Mueller <redacted>
We already have crypto_user so you should be extending that to
cover what's missing.

PS These paramters should not vary depending on the implementation,
if they do then one of the implementations must be buggy.

Cheers,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help