summaryrefslogtreecommitdiff
path: root/crypto/rng.c
diff options
context:
space:
mode:
authorStephan Mueller <smueller@chronox.de>2017-06-25 17:12:59 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2017-07-28 17:55:47 +0800
commit0c2a2d0aa6e4c7dcc72800db02f2a7b87b783905 (patch)
tree82eb8b950b27a61caddfaca58fb1620bc46e844a /crypto/rng.c
parent8a15a4bf19477d91df0ffc20ef66dfa9f793c150 (diff)
downloadlinux-crypto-0c2a2d0aa6e4c7dcc72800db02f2a7b87b783905.tar.gz
linux-crypto-0c2a2d0aa6e4c7dcc72800db02f2a7b87b783905.zip
crypto: algif_aead - overhaul memory management
The updated memory management is described in the top part of the code. As one benefit of the changed memory management, the AIO and synchronous operation is now implemented in one common function. The AF_ALG operation uses the async kernel crypto API interface for each cipher operation. Thus, the only difference between the AIO and sync operation types visible from user space is: 1. the callback function to be invoked when the asynchronous operation is completed 2. whether to wait for the completion of the kernel crypto API operation or not The change includes the overhaul of the TX and RX SGL handling. The TX SGL holding the data sent from user space to the kernel is now dynamic similar to algif_skcipher. This dynamic nature allows a continuous operation of a thread sending data and a second thread receiving the data. These threads do not need to synchronize as the kernel processes as much data from the TX SGL to fill the RX SGL. The caller reading the data from the kernel defines the amount of data to be processed. Considering that the interface covers AEAD authenticating ciphers, the reader must provide the buffer in the correct size. Thus the reader defines the encryption size. Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/rng.c')
0 files changed, 0 insertions, 0 deletions