Debian Codegraph @

kernel-patches/4.15-rc3/kpp/v3-0000-cover-letter.patch

raw
1 From 70cd1d16d6f72ecc7f7d1578a050913db8df503d Mon Sep 17 00:00:00 2001
2 From: Stephan Mueller <[email protected]>
3 Date: Sun, 7 Jan 2018 19:29:54 +0100
4 Subject: [PATCH v3 0/8] crypto: AF_ALG support for KPP
5
6 Hi,
7
8 This is an RFC to discuss whether and how to support access to the
9 KPP kernel crypto API (Diffie-Hellman and EC Diffie-Hellman) by
10 user space.
11
12 The patch set is only meant for discussion and not for production use.
13 Testing is only performed for the DH part via [1]. The DH testing shows
14 that the DH operation shows the same results as OpenSSL.
15
16 The patch set includes:
17
18 - addition of PKCS#3 support for DH to allow domain parameters to be set
19
20 - extension of the setsockopt and cmsg API
21
22 - addition of AF_ALG KPP interface where the implementation follows the
23 exact same coding style as currently discussed for the memory management
24 fix patch set for algif_skcipher and algif_aead -- this shall allow
25 the immediate incorporation of patches that replace duplicated code with
26 common service functions.
27
28 The patch 8 describes the different operations that are supported by AF_ALG
29 KPP. This support includes generation and retaining of the private key
30 inside the kernel. This private key would never be sent to user space.
31
32 I am aware and in fact supported development of the DH support in the keys
33 subsystem. The question will be raised whether the AF_ALG KPP interface is
34 superfluous in light of the keys DH support. My answer is that AF_ALG KPP is
35 orthogonal to the keys DH support. The keys DH support use case is that
36 the keys are managed inside the kernel and thus has the focus on the
37 key management. Contrary, AF_ALG KPP does not really focus on key management
38 but simply externalizes the DH/ECDH support found in the kernel including
39 hardware acceleration. User space is in full control of the key life cycle.
40 This way, AF_ALG could be used to complement user-space network protocol
41 implementations like TLS or IKE to offload the resource intense DH
42 calculations to accelerators.
43
44 A full description of the DH testing and how to compare it to OpenSSL
45 is present in [1] with the test/kcapi-main.c tool, function "kpp".
46
47 Changes v3:
48 * port to 4.15-rc3
49 * incorporate changes applied to other AF_ALG implementations eliminating DoS
50 issues
51
52 Stephan Mueller (8):
53 crypto: AF_ALG -- add DH keygen / ssgen API
54 icrypto: AF_ALG -- add DH param / ECDH curve setsockopt call
55 crypto: AF_ALG - eliminate code duplication
56 crypto: KPP - add API crypto_kpp_set_params
57 crypto: DH - allow params and key to be set independently
58 crypto: DH - add PKCS#3 parameter handling
59 crypto: ecdh - constify key
60 crypto: AF_ALG - add KPP support
61
62 Documentation/crypto/api-kpp.rst | 2 +-
63 crypto/Kconfig | 10 +
64 crypto/Makefile | 8 +-
65 crypto/af_alg.c | 19 +-
66 crypto/algif_kpp.c | 612 +++++++++++++++++++++++++++++++++++++++
67 crypto/dh.c | 39 ++-
68 crypto/dh_helper.c | 53 +++-
69 crypto/dhparameter.asn1 | 4 +
70 include/crypto/dh.h | 21 +-
71 include/crypto/ecdh.h | 2 +-
72 include/crypto/if_alg.h | 4 +
73 include/crypto/kpp.h | 28 ++
74 include/uapi/linux/if_alg.h | 4 +
75 security/keys/dh.c | 2 +-
76 14 files changed, 786 insertions(+), 22 deletions(-)
77 create mode 100644 crypto/algif_kpp.c
78 create mode 100644 crypto/dhparameter.asn1
79
80 --
81 2.14.3
82