aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/crypto
AgeCommit message (Collapse)Author
2016-08-30cryptodev: updatedNikos Mavrogiannopoulos
2016-08-30cryptodev: updatedNikos Mavrogiannopoulos
2016-08-30cryptodev: fixCristian Stoica
Calculate tag and destination buffer length in a single place to avoid code duplication. The TLS case is fixed by rounding the destination length to cipher block size. Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
2016-08-30cryptodev: documentedNikos Mavrogiannopoulos
2016-08-30cryptodev: addCristian Stoica
- block and stream ciphers have their keys copied from userspace just like before - for aead composite ciphers, the cipher and hmac keys are combined into a single key Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: refactoring:Cristian Stoica
The enclosing structure refers to both keys either as individuals or as a group. For block ciphers and hmacs, both keys are used independently. For composite ciphers the whole structure will be used as a single key. Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: useCristian Stoica
Composite ciphers (cipher + hmac) use both keys at the same time. This patch is the first in a series that adds support for composite ciphers keys. Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: WhenNikos Mavrogiannopoulos
That is because in AEAD modes we need to write more data than we read (the tag value). Reported and investigated by Dian Nguyen. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
2016-08-30cryptodev: clean-upCristian Stoica
If 'open /dev/crypto' fails, all allocated resources must be freed before "open" returns; "close" can't be called to clean-up since there is no file descriptor after a failed "open". Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: tests/hmac_comp:Phil Sutter
This makes the test complain if the output fields were not altered at all. Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: tests/hmac_comp:Phil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: allowPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: allowPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: dropPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: introducePhil Sutter
Use them instead of directly calling dprintk. Also, line continuations are to be indented with two tabs, unless there is good reason not to. Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: checkpatchPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: checkpatchPhil Sutter
Normally we use dprintk which respects the module's own log level, but at this early stage (driver registration), being noisy should be fine. Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: checkpatchPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: checkpatchPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: checkpatchPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: checkpatchPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: checkpatchPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: checkpatchPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: checkpatchPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: authencPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: checkpatchPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: checkpatchPhil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: Makefile:Phil Sutter
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: In with an inline function, reinit_completion [1][2]. We are ↵Cosmin Paraschiv
currently using the 3.13-rc3 Linux kernel, which leads to the following error: cryptlib.c:279:2: error: implicit declaration of function 'INIT_COMPLETION' [-Werror=implicit-function-declaration] INIT_COMPLETION(cdata->async.result->completion); [1] https://github.com/torvalds/linux/commit/c32f74ab2872994bc8336ed367313da3139350ca [2] https://github.com/torvalds/linux/commit/62026aedaacedbe1ffe94a3599ad4acd8ecdf587 Signed-off-by: Cosmin Paraschiv <cosmin.paraschiv@freescale.com> Reviewed-by: Cristian Stoica <cristian.stoica@freescale.com> Tested-by: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Horia Geanta <horia.geanta@freescale.com> Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-30cryptodev: docNikos Mavrogiannopoulos
2016-08-30cryptodev: DisableNikos Mavrogiannopoulos
This slows down processing but prevents failures due to the driver refusing to operate on unaligned data.
2016-08-30cryptodev: FixKarl Hiramoto
Add check for "atmel-" HW accelerator. Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
2016-08-30cryptodev: docNikos Mavrogiannopoulos
2016-08-30cryptodev: destroyCristian Stoica
- for completion destroy also &pcr->fcrypt_sem and session mutexes during shutdown Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
2016-08-30cryptodev: fixCristian Stoica
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
2016-08-30cryptodev: fixCristian Stoica
If one of kzalloc(todo_list_item) fail, filp->private_data remains garbage and cryptodev_release will fail during free. To fix that, filp->private_data is set early so that at release, there will be knowledge about allocated memory. Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
2016-08-30cryptodev: setCristian Stoica
The net result is the same and it makes more clear some problems with freeing this memory (addressed in a later patch) Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
2016-08-30cryptodev: fixCristian Stoica
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
2016-08-30cryptodev: initializeCristian Stoica
kmalloc + memset(0) can be replaced with a single call to kzalloc for the same results Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
2016-08-30cryptodev: removeCristian Stoica
struct cipher_data *out (sess_new->cdata) is already initiallized to zero as 'ses_new = kzalloc(...)' in the caller function crypto_create_session Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
2016-08-30cryptodev: fixCristian Stoica
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
2016-08-30cryptodev: AddNikos Mavrogiannopoulos
The attached patch contains the required modifications in order to get and set the cryptodev_verbosity variable using the following commands root@OCSME:~# sysctl ioctl.cryptodev_verbosity ioctl.cryptodev_verbosity = 0 root@OCSME:~# sysctl ioctl.cryptodev_verbosity=3 ioctl.cryptodev_verbosity = 3 Patch by Nikolaos Tsakalakis (nikolaos.tsakalakis@gmail.com).
2016-08-30cryptodev: fixCristian Stoica
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
2016-08-30cryptodev: AllowCristian Stoica
This is useful for cross-building for embedded systems Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
2016-08-30cryptodev: madeNikos Mavrogiannopoulos
2016-08-30cryptodev: updatedNikos Mavrogiannopoulos
2016-08-30cryptodev: addedNikos Mavrogiannopoulos
2016-08-30cryptodev: addedNikos Mavrogiannopoulos
2016-08-30cryptodev: AddedNikos Mavrogiannopoulos
2016-08-30cryptodev: textNikos Mavrogiannopoulos