From 7c604d30f77ff4634497c027922e55a8e9752142 Mon Sep 17 00:00:00 2001 From: Stephan Mueller Date: Thu, 28 Sep 2017 16:28:46 +0200 Subject: [PATCH v9 0/3] crypto: add algif_akcipher user space API Hi, This patch set adds the AF_ALG user space API to externalize the asymmetric cipher API recently added to the kernel crypto API. The patch set is tested with the user space library of libkcapi [1]. Use [1] test/test.sh for a full test run. The test covers the following scenarios: * sendmsg of one IOVEC * sendmsg of 16 IOVECs with non-linear buffer * vmsplice of one IOVEC * vmsplice of 15 IOVECs with non-linear buffer * invoking multiple separate cipher operations with one open cipher handle * encryption with private key (using vector from testmgr.h) * encryption with public key (using vector from testmgr.h) * decryption with private key (using vector from testmgr.h) Note, to enable the test, edit line [2] from "4 99" to "4 13". [1] http://www.chronox.de/libkcapi.html [2] https://github.com/smuellerDD/libkcapi/blob/master/test/test.sh#L1452 Changes v9: * port to kernel 4.14-rc1 * integrate comments from Tudor Ambarus Stephan Mueller (3): crypto: AF_ALG -- add sign/verify API crypto: AF_ALG -- add setpubkey setsockopt call crypto: AF_ALG -- add asymmetric cipher crypto/Kconfig | 9 + crypto/Makefile | 1 + crypto/af_alg.c | 28 ++- crypto/algif_aead.c | 36 ++-- crypto/algif_akcipher.c | 470 ++++++++++++++++++++++++++++++++++++++++++++ crypto/algif_skcipher.c | 26 ++- include/crypto/if_alg.h | 7 +- include/uapi/linux/if_alg.h | 3 + 8 files changed, 547 insertions(+), 33 deletions(-) create mode 100644 crypto/algif_akcipher.c -- 2.13.5