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

Re: [PATCH v2 01/10] crypto: AF_ALG: add user space interface for AEAD

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

On Sun, Nov 16, 2014 at 03:23:50AM +0100, Stephan Mueller wrote:
AEAD requires the following data in addition to normal symmetric
ciphers:

	* Associated authentication data of arbitrary length

	* Authentication tag for decryption

	* Length of authentication tag for encryption

The authentication tag data is communicated as part of the actual
ciphertext as mandated by the kernel crypto API. Therefore we only need
to provide a user space interface for the associated authentication data
as well as for the authentication tag length.

This patch adds both as a setsockopt interface that is identical to the
AF_ALG interface for setting an IV and for selecting the cipher
operation type (encrypt or decrypt).

Signed-off-by: Stephan Mueller <redacted>
I don't like the fact that we're putting arbitrary limits on
the AD, as well as the fact that the way you're doing it the
AD has to be copied.

How about simply saying that the first X bytes of the input
shall be the AD?

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