Skip to contentSkip to conversation

Add DSA key type

PATCH In review David Härdeman 12 participants 49 messages Jan 26, 2006 – Feb 6, 2006

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover Add DSA key type

The following four patches add support for DSA keys to the in-kernel key management system.

In-kernel dsa keys allows a process to use the request_key mechanism to request such keys on demand. One such example is a backup script that, when done, could issue a request for an appropriate ssh key. The request would then be forwarded by /sbin/request-key to the appropriate user who could supply the key which is in turn used by the backup script to transfer the results to a backup server. This allows for much more flexible and interesting solutions than passwordless ssh key files or shared ssh agents would ever be able to support. (I have a separate patch for openssh which allows ssh-add and ssh to work with in-kernel keys).

In addition, the in-kernel keys have the advantage of being non-ptraceable, will not be swapped out to disk, and does not run the risk of being included in coredumps. The functionality added by these patches should also be interesting to some other security features (such as signed modules, signed binaries and possibly some encrypted filesystems).

The patch is split into four sub-patches:

1) Adds a multi-precision-integer maths library

2) Adds dsa cryptographic operations. Since a dsa signature is always two 160-bit integer, I've modeled the dsa crypto as a hash algorithm.

3) Adds encryption as one of the supported ops for in-kernel keys.

4) Adds the dsa in-kernel key type.

This is the second version of these patches with the following changes from the first version:

* Make sure all functions have proper dsa_ prefixes
* Use kenter/kleave/kdebug in dsa_key.c instead of duplicated versions
* Let key type decide which locking to use for encrypt ops (semaphore or rcu)
* Add KERN_XXX levels for printk's
* Merge newer mpilib from Fedora kernel 2.6.15-1.1871_FC5
* Change some non-tab whitespace to tabs
* Change mpilib exports from EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
* Change crypto/dsa.c to copy key instead of referencing it
* Add documentation

Regards,
David Härdeman

--

 Documentation/keys.txt            |   77 +
 crypto/Kconfig                    |   15 
 crypto/Makefile                   |    2 
 crypto/dsa.c                      |  265 ++++++
 crypto/mpi/Makefile               |   31 
 crypto/mpi/generic_mpi-asm-defs.h |   10 
 crypto/mpi/generic_mpih-add1.c    |   64 +
 crypto/mpi/generic_mpih-lshift.c  |   66 +
 crypto/mpi/generic_mpih-mul1.c    |   60 +
 crypto/mpi/generic_mpih-mul2.c    |   63 +
 crypto/mpi/generic_mpih-mul3.c    |   64 +
 crypto/mpi/generic_mpih-rshift.c  |   66 +
 crypto/mpi/generic_mpih-sub1.c    |   63 +
 crypto/mpi/generic_udiv-w-sdiv.c  |  108 ++
 crypto/mpi/longlong.h             | 1502 ++++++++++++++++++++++++++++++++++++++
 crypto/mpi/mpi-add.c              |  241 ++++++
 crypto/mpi/mpi-bit.c              |  240 ++++++
 crypto/mpi/mpi-cmp.c              |   70 +
 crypto/mpi/mpi-div.c              |  342 ++++++++
 crypto/mpi/mpi-gcd.c              |   62 +
 crypto/mpi/mpi-inline.c           |   32 
 crypto/mpi/mpi-inline.h           |  128 +++
 crypto/mpi/mpi-internal.h         |  265 ++++++
 crypto/mpi/mpi-inv.c              |  189 ++++
 crypto/mpi/mpi-mpow.c             |  136 +++
 crypto/mpi/mpi-mul.c              |  199 +++++
 crypto/mpi/mpi-pow.c              |  324 ++++++++
 crypto/mpi/mpi-scan.c             |  127 +++
 crypto/mpi/mpicoder.c             |  388 +++++++++
 crypto/mpi/mpih-cmp.c             |   58 +
 crypto/mpi/mpih-div.c             |  545 +++++++++++++
 crypto/mpi/mpih-mul.c             |  537 +++++++++++++
 crypto/mpi/mpiutil.c              |  224 +++++
 include/linux/compat.h            |    4 
 include/linux/dsa.h               |   33 
 include/linux/key.h               |   10 
 include/linux/keyctl.h            |    1 
 include/linux/mpi.h               |  154 +++
 include/linux/syscalls.h          |    5 
 security/Kconfig                  |    8 
 security/keys/Makefile            |    1 
 security/keys/compat.c            |    9 
 security/keys/dsa_key.c           |  376 +++++++++
 security/keys/keyctl.c            |   67 +
 44 files changed, 7221 insertions(+), 10 deletions(-)
#43 lore raw

PATCH 3/4 Add encryption ops to the keyctl syscall

In reply to David Härdeman

Adds encryption as one of the supported ops for in-kernel keys.

--

include/linux/compat.h +2 -2
Index: dsa-kernel/include/linux/compat.h
===================================================================
@@ -132,8 +132,8 @@
 long compat_sys_shmctl(int first, int second, void __user *uptr);
 long compat_sys_semtimedop(int semid, struct sembuf __user *tsems,
 		unsigned nsems, const struct compat_timespec __user *timeout);
-asmlinkage long compat_sys_keyctl(u32 option,
-			      u32 arg2, u32 arg3, u32 arg4, u32 arg5);
+asmlinkage long compat_sys_keyctl(u32 option, u32 arg2, u32 arg3,
+                                  u32 arg4, u32 arg5, u32 arg6);
 
 asmlinkage ssize_t compat_sys_readv(unsigned long fd,
 		const struct compat_iovec __user *vec, unsigned long vlen);
include/linux/key.h +10 -0
Index: dsa-kernel/include/linux/key.h
===================================================================
@@ -220,6 +220,16 @@
 	 */
 	long (*read)(const struct key *key, char __user *buffer, size_t buflen);
 
+	/* encrypt/sign/etc data using a key (optional)
+	 * - permission checks will be done by the caller
+	 * - the key must be readlocked while encryption is performed
+	 * - should return the amount of data that would be returned from the
+	 *   encryption even if the buffer is too small or NULL
+	 */
+	long (*encrypt)(struct key *key,
+                        const char __user *inbuffer, size_t inbuflen,
+                        char __user *outbuffer, size_t outbuflen);
+
 	/* handle request_key() for this type instead of invoking
 	 * /sbin/request-key (optional)
 	 * - key is the key to instantiate
include/linux/keyctl.h +1 -0
Index: dsa-kernel/include/linux/keyctl.h
===================================================================
@@ -49,5 +49,6 @@
 #define KEYCTL_SET_REQKEY_KEYRING	14	/* set default request-key keyring */
 #define KEYCTL_SET_TIMEOUT		15	/* set key timeout */
 #define KEYCTL_ASSUME_AUTHORITY		16	/* assume request_key() authorisation */
+#define KEYCTL_ENCRYPT			17	/* encrypt a chunk of data using key */
 
 #endif /*  _LINUX_KEYCTL_H */
include/linux/syscalls.h +3 -2
Index: dsa-kernel/include/linux/syscalls.h
===================================================================
@@ -504,8 +504,9 @@
 				const char __user *_callout_info,
 				key_serial_t destringid);
 
-asmlinkage long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3,
-			   unsigned long arg4, unsigned long arg5);
+asmlinkage long sys_keyctl(int cmd, unsigned long arg2,
+                           unsigned long arg3, unsigned long arg4,
+                           unsigned long arg5, unsigned long arg6);
 
 asmlinkage long sys_ioprio_set(int which, int who, int ioprio);
 asmlinkage long sys_ioprio_get(int which, int who);
security/keys/compat.c +7 -2
Index: dsa-kernel/security/keys/compat.c
===================================================================
@@ -23,8 +23,8 @@
  *   registers on taking a 32-bit syscall are zero
  * - if you can, you should call sys_keyctl directly
  */
-asmlinkage long compat_sys_keyctl(u32 option,
-				  u32 arg2, u32 arg3, u32 arg4, u32 arg5)
+asmlinkage long compat_sys_keyctl(u32 option, u32 arg2, u32 arg3,
+				  u32 arg4, u32 arg5, u32 arg6)
 {
 	switch (option) {
 	case KEYCTL_GET_KEYRING_ID:
@@ -80,6 +80,11 @@
 	case KEYCTL_ASSUME_AUTHORITY:
 		return keyctl_assume_authority(arg2);
 
+	case KEYCTL_ENCRYPT:
+		return keyctl_encrypt_with_key(arg2,
+					       compat_ptr(arg3), arg4,
+					       compat_ptr(arg5), arg6);
+
 	default:
 		return -EOPNOTSUPP;
 	}
security/keys/keyctl.c +65 -2

81 lines not on this page · raw message

Documentation/keys.txt +76 -1

104 lines not on this page · raw message

#42 lore raw

PATCH 2/4 Add dsa crypto ops

In reply to David Härdeman

Adds dsa cryptographic operations. Since a dsa signature is always two 160-bit integer, the dsa crypto has been modeled as a hash algorithm.

--

crypto/Kconfig +7 -0
Index: dsa-kernel/crypto/Kconfig
===================================================================
@@ -342,6 +342,13 @@
 	  Multiprecision maths library from GnuPG. Used for some
 	  crypto algorithms.
 
+config CRYPTO_DSA
+	tristate "Digital Signature Algorithm (EXPERIMENTAL)"
+	depends on CRYPTO && CRYPTO_MPILIB && EXPERIMENTAL
+	help
+	  Digital Signature Algorithm is used in a number of applications
+	  such as ssh and gpg.
+
 config CRYPTO_TEST
 	tristate "Testing module"
 	depends on CRYPTO
crypto/Makefile +1 -0
Index: dsa-kernel/crypto/Makefile
===================================================================
@@ -30,6 +30,7 @@
 obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
 obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
 obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o
+obj-$(CONFIG_CRYPTO_DSA) += dsa.o
 obj-$(CONFIG_CRYPTO_MPILIB) += mpi/
 
 obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
crypto/dsa.c new file +265 -0

265 lines not on this page · raw message

include/linux/dsa.h new file +33 -0
Index: dsa-kernel/include/linux/dsa.h
===================================================================
@@ -0,0 +1,33 @@
+/* dsa.h: digital signature architecture
+ *
+ * Copyright (C) 2005 David Härdeman ([email protected]).
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#ifndef _LINUX_DSA_H
+#define _LINUX_DSA_H
+#ifdef __KERNEL__
+
+#include <linux/mpi.h>
+
+#define DSA_DIGEST_SIZE         44
+#define DSA_HMAC_BLOCK_SIZE     64
+#define DSA_PART_P              0
+#define DSA_PART_Q              1
+#define DSA_PART_G              2
+#define DSA_PART_Y              3
+#define DSA_PART_X              4
+#define DSA_PARTS               5
+#define DSA_PUBLIC_PARTS        4
+
+struct key_payload_dsa {
+    MPI part[DSA_PARTS]; /* p,q,g,y,x */
+};
+
+#endif
+#endif
#44 lore raw

PATCH 4/4 Add dsa key type

In reply to David Härdeman

Adds the dsa in-kernel key type.

--

security/Kconfig +8 -0
Index: dsa-kernel/security/Kconfig
===================================================================
@@ -21,6 +21,14 @@
 
 	  If you are unsure as to whether this is required, answer N.
 
+config KEYS_DSA_KEYS
+	tristate "Support DSA keys (EXPERIMENTAL)"
+	depends on KEYS && EXPERIMENTAL
+	select CRYPTO_MPILIB
+	select CRYPTO_DSA
+	help
+	  This option provides support for retaining DSA keys in the kernel.
+
 config KEYS_DEBUG_PROC_KEYS
 	bool "Enable the /proc/keys file by which all keys may be viewed"
 	depends on KEYS
security/keys/Makefile +1 -0
Index: dsa-kernel/security/keys/Makefile
===================================================================
@@ -13,4 +13,5 @@
 	user_defined.o
 
 obj-$(CONFIG_KEYS_COMPAT) += compat.o
+obj-$(CONFIG_KEYS_DSA_KEYS) += dsa_key.o
 obj-$(CONFIG_PROC_FS) += proc.o
security/keys/dsa_key.c new file +376 -0

376 lines not on this page · raw message

maintainer
#45 lore raw
In reply to David Härdeman
Quoted 2 lines · David H?rdeman

crypto/mpi/Makefile | 31

Wouldn't this make more sense under lib/mpi?

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#46 lore raw
Quoted 5 lines · Herbert Xu
Quoted 2 lines · David H?rdeman

crypto/mpi/Makefile | 31

Wouldn't this make more sense under lib/mpi?

I have no problems with moving it to lib/mpi unless someone feels its a bad idea (DHowells, do you agree?).

Re,
David

#2 lore raw

Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to David Härdeman
Quoted 4 lines · David H?rdeman

Adds the multi-precision-integer maths library which was originally taken from GnuPG and ported to the kernel by (among others) David Howells. This version is taken from Fedora kernel 2.6.15-1.1871_FC5.

This is ugly as hell. If we decided to add it it really needs a major cleanup, fitting into linux style and removal of unused functionality, the assembly bits needs to move to an asm/ header, etc.

But to be honest I'd say anything that requires bigints shouldn't go into the kernel at all. Could someone explain why they want dsa support in kernelspace?

maintainer
#3 lore raw

Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 3 lines · Christoph Hellwig

This is ugly as hell. If we decided to add it it really needs a major cleanup, fitting into linux style and removal of unused functionality, the assembly bits needs to move to an asm/ header, etc.

Which would make it harder to compare against the original, and so potentially harder to track bug fixes in the original was my thinking.

Quoted 3 lines

But to be honest I'd say anything that requires bigints shouldn't go into the kernel at all. Could someone explain why they want dsa support in kernelspace?

Well... I'd like to revisit module signing at some point, though I imagine it'll cause the LKML to melt again by those who think that I shouldn't have the right to sign my modules because they imagine it impinges on their rights:-) But I suspect the reason David wants this is so that he can encrypt something with keys that he's not actually permitted to retrieve directly. David?

David

maintainer
#47 lore raw
In reply to David Härdeman
Quoted 2 lines · David Härdeman

I have no problems with moving it to lib/mpi unless someone feels its a bad idea (DHowells, do you agree?).

I don't think that's the right place for it, except for the fact you can then use the archive library generated to only include as much of mpilib as you actually require. It seems to me that it should really belong with the crypto stuff.

David

#4 lore raw

Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to David Howells
Quoted 8 lines · David Howells
Quoted 3 lines · Christoph Hellwig

This is ugly as hell. If we decided to add it it really needs a major cleanup, fitting into linux style and removal of unused functionality, the assembly bits needs to move to an asm/ header, etc.

Which would make it harder to compare against the original, and so potentially harder to track bug fixes in the original was my thinking.

I think it might still work quite well with a subset since each function is quite self-contained and a bugfix in one function would still be quite easy to match to the corresponding function in the in-kernel code even if it has been refactored and moved around.

Quoted 10 lines
Quoted 3 lines

But to be honest I'd say anything that requires bigints shouldn't go into the kernel at all. Could someone explain why they want dsa support in kernelspace?

Well... I'd like to revisit module signing at some point, though I imagine it'll cause the LKML to melt again by those who think that I shouldn't have the right to sign my modules because they imagine it impinges on their rights:-) But I suspect the reason David wants this is so that he can encrypt something with keys that he's not actually permitted to retrieve directly. David?

The reason that I wanted DSA-keys supported by the in-kernel key stuff is that it allows for some cool stuff which is either impossible or very hard to do otherwise.

For example, a backup daemon which wishes to store the backup on another host using ssh. Usually this is solved by storing an unencrypted key in the fs or by providing a connection to a ssh-agent which has been preloaded with the proper key(s). Both are quite inelegant solutions. With the in-kernel support, the daemon can request the key using the request_key call, and (provided proper scripts are written), the user who controls the relevant key can supply it. This in turn means that the backup daemon can sign using the key and read its public parts but not the private key.

So yes, that is one example of doing "something" with keys that the process is not allowed to retrieve directly (the key itself could be supplied from removable storage or something and given a few minutes of time-to-live).

It also means that users would not have to run ssh-agent and would not have to bother with making sure that only one instance of ssh-agent is running even if they are logged in multiple times.

The in-kernel key management also protects the key against many of the different ways in which a user-space daemon could be attacked (ptrace, swap-out, coredump, etc).

In addition, the dsa key code can be used to implement signed binaries and signed modules.

For now I'll create a version of mpilib which has been stripped down to only the functions that are in use by the dsa-crypto stuff, hopefully this will substantially reduce the size and amount of code. I'll get back when I have some results.

Regards,
David

#5 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 9 lines · David Härdeman

For example, a backup daemon which wishes to store the backup on another host using ssh. Usually this is solved by storing an unencrypted key in the fs or by providing a connection to a ssh-agent which has been preloaded with the proper key(s). Both are quite inelegant solutions. With the in-kernel support, the daemon can request the key using the request_key call, and (provided proper scripts are written), the user who controls the relevant key can supply it. This in turn means that the backup daemon can sign using the key and read its public parts but not the private key.

...but why would you want such a daemon to live in the kernel in the first place? A backup application might perhaps need some kernel support in order to ensure filesystem consistency, but that does not mean that moving the entire daemon into the kernel is a good idea.

Cheers,
Trond

maintainer
#48 lore raw
In reply to David Howells
Quoted 9 lines · David Howells
Quoted 2 lines · David H?rdeman

I have no problems with moving it to lib/mpi unless someone feels its a bad idea (DHowells, do you agree?).

I don't think that's the right place for it, except for the fact you can then use the archive library generated to only include as much of mpilib as you actually require. It seems to me that it should really belong with the crypto stuff.

IMHO crypto/ should only contain things that are actually part of the crypto layer: API code and crypto_alg implementations.

We have precedents for this. We have the crypto_alg implementation of sha1 in crypto, but the actual algorithm lives in lib. Ditto for crc and zlib.

In this case, the MPI library is even further away from the crypto layer than any of these cases since it is not a crypto algorithm by itself. In fact, we can't be sure that there won't ever be another part of the kernel that requires direct access to the MPI library without going through the crypto layer.

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#6 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Trond Myklebust
Quoted 5 lines · Trond Myklebust
Quoted 1 line · David Härdeman

For example, a backup daemon which wishes to store the backup on another host using ssh. Usually this is solved by storing an unencrypted key in the fs or by providing a connection to a ssh-agent which has been preloaded with the proper key(s). Both are quite inelegant solutions. With the in-kernel support, the daemon can request the key using the request_key call, and (provided proper scripts are written), the user who controls the relevant key can supply it. This in turn means that the backup daemon can sign using the key and read its public parts but not the private key.

...but why would you want such a daemon to live in the kernel in the first place? A backup application might perhaps need some kernel support in order to ensure filesystem consistency, but that does not mean that moving the entire daemon into the kernel is a good idea.

No, the point is not to put the backup daemon into the kernel, but to provide a way for the backup daemon and my user process to communicate DSA key details without completely giving the backup daemon my key. I may not entirely trust the backup daemon not to get compromised, but with support for the kernel keyring system, compromising the backup daemon would only compromise the backed up files, not the private keys and other secure data.

Cheers,
Kyle Moffett

--
I lost interest in "blade servers" when I found they didn't throw knives at people who weren't supposed to be in your machine room.
-- Anthony de Boer

#11 lore raw

Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to David Härdeman
Quoted 14 lines · David Härdeman

On Fri, Jan 27, 2006 at 08:07:50PM +0000, David Howells wrote:
...

Quoted 7 lines

Well... I'd like to revisit module signing at some point, though I imagine it'll cause the LKML to melt again by those who think that I shouldn't have the right to sign my modules because they imagine it impinges on their rights:-) But I suspect the reason David wants this is so that he can encrypt
something with keys that he's not actually permitted to retrieve directly. David?

The reason that I wanted DSA-keys supported by the in-kernel key stuff is that it allows for some cool stuff which is either impossible or very hard to do otherwise.

Quoted 9 lines

For example, a backup daemon which wishes to store the backup on another host using ssh. Usually this is solved by storing an unencrypted key in the fs or by providing a connection to a ssh-agent which has been preloaded with the proper key(s). Both are quite inelegant solutions. With the in-kernel support, the daemon can request the key using the request_key call, and (provided proper scripts are written), the user who controls the relevant key can supply it. This in turn means that the backup daemon can sign using the key and read its public parts but not the private key.

What exactly is the unsolvable problem with doing this in userspace?

Quoted 5 lines

So yes, that is one example of doing "something" with keys that the process is not allowed to retrieve directly (the key itself could be supplied from removable storage or something and given a few minutes of time-to-live).

Quoted 7 lines

It also means that users would not have to run ssh-agent and would not have to bother with making sure that only one instance of ssh-agent is running even if they are logged in multiple times.

The in-kernel key management also protects the key against many of the different ways in which a user-space daemon could be attacked (ptrace, swap-out, coredump, etc).

If an attacker has enough privileges for attacking the daemon, he should usually also have enough privileges for attacking the kernel.

The number of different attacks might be lower, but you haven't completely solved any problem.

Quoted 3 lines

In addition, the dsa key code can be used to implement signed binaries and signed modules.
...

Checking signatures on modules sounds like a job for module-init-tools (if there's any real benefit in signing GPL'ed modules).

Quoted 2 lines

Regards,
David

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#7 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Kyle Moffett
Quoted 19 lines · Kyle Moffett
Quoted 12 lines · Trond Myklebust
Quoted 9 lines · David Härdeman

For example, a backup daemon which wishes to store the backup on another host using ssh. Usually this is solved by storing an unencrypted key in the fs or by providing a connection to a ssh- agent which has been preloaded with the proper key(s). Both are quite inelegant solutions. With the in-kernel support, the daemon can request the key using the request_key call, and (provided proper scripts are written), the user who controls the relevant key can supply it. This in turn means that the backup daemon can sign using the key and read its public parts but not the private key.

Quoted 5 lines

...but why would you want such a daemon to live in the kernel in the first place? A backup application might perhaps need some kernel support in order to ensure filesystem consistency, but that does not mean that moving the entire daemon into the kernel is a good idea.

Quoted 7 lines

No, the point is not to put the backup daemon into the kernel, but to provide a way for the backup daemon and my user process to communicate DSA key details without completely giving the backup daemon my key. I may not entirely trust the backup daemon not to get compromised, but with support for the kernel keyring system, compromising the backup daemon would only compromise the backed up files, not the private keys and other secure data.

And why exactly is this not solvable through a userspace daemon?

Quoted 2 lines

Cheers,
Kyle Moffett

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#8 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Kyle Moffett
Quoted 7 lines · Kyle Moffett

No, the point is not to put the backup daemon into the kernel, but to provide a way for the backup daemon and my user process to communicate DSA key details without completely giving the backup daemon my key. I may not entirely trust the backup daemon not to get compromised, but with support for the kernel keyring system, compromising the backup daemon would only compromise the backed up files, not the private keys and other secure data.

This sort of thing is implemented routinely in user space by means of proxy tickets/certificates/credentials. What makes them insufficient for this use?

Cheers,
Trond

#9 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 4 lines · Adrian Bunk
Quoted 1 line · David Härdeman

The in-kernel key management also protects the key against many of the different ways in which a user-space daemon could be attacked (ptrace, swap-out, coredump, etc).

If an attacker has enough privileges for attacking the daemon, he should usually also have enough privileges for attacking the kernel.

Not necessarily. If the daemon runs as the "backup" user or similar, access to it does not imply root. We want to make an efficient way to allow the _use_ of keys without implying access to the key data. For example, one item under consideration is a "key handle" that could be cloned, however if you revoke a given handle, all of its cloned handles (and their clones), will be automatically revoked as well. This would make it possible to pass a key to a program without risking the key to compromise of that program. Say I pass my SSL key to Mozilla. With this and some of the other new security features (One of the code-isolation ones I think?), you could allow Mozilla to use SSL websites without risking compromise of the SSL keys because of a browser security hole.

Quoted 5 lines · Trond Myklebust
Quoted 1 line · Kyle Moffett

No, the point is not to put the backup daemon into the kernel, but to provide a way for the backup daemon and my user process to communicate DSA key details without completely giving the backup daemon my key. I may not entirely trust the backup daemon not to get compromised, but with support for the kernel keyring system, compromising the backup daemon would only compromise the backed up files, not the private keys and other secure data.

This sort of thing is implemented routinely in user space by means of proxy tickets/certificates/credentials. What makes them insufficient for this use?

The problem is that there is no standard way to store/use the keys. I can put my key in an ssh-agent to handle SSH, but that doesn't let me securely auth mozilla. To do that, I need to explore how mozilla configs work. And there are similar problems with context for Kerberos, OpenAFS, encrypted filesystems, etc. You need to have a common standardized way to pass the secure information around. This provides that interface.

Cheers,
Kyle Moffett

--
Simple things should be simple and complex things should be possible
-- Alan Kay

#10 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 9 lines · Kyle Moffett
Quoted 7 lines · Adrian Bunk
Quoted 3 lines · David Härdeman

The in-kernel key management also protects the key against many of the different ways in which a user-space daemon could be attacked (ptrace, swap-out, coredump, etc).

If an attacker has enough privileges for attacking the daemon, he should usually also have enough privileges for attacking the kernel.

Quoted 12 lines

Not necessarily. If the daemon runs as the "backup" user or similar, access to it does not imply root. We want to make an efficient way to allow the _use_ of keys without implying access to the key data. For example, one item under consideration is a "key handle" that could be cloned, however if you revoke a given handle, all of its cloned handles (and their clones), will be automatically revoked as well. This would make it possible to pass a key to a program without risking the key to compromise of that program. Say I pass my SSL key to Mozilla. With this and some of the other new security features (One of the code-isolation ones I think?), you could allow Mozilla to use SSL websites without risking compromise of the SSL keys because of a browser security hole.

I still haven't gotten the point which part of this is technically impossible to implement in userspace.

Quoted 15 lines · Trond Myklebust
Quoted 10 lines · Kyle Moffett
Quoted 8 lines

No, the point is not to put the backup daemon into the kernel, but to provide a way for the backup daemon and my user process to communicate DSA key details without completely giving the backup daemon my key. I may not entirely trust the backup daemon not to get compromised, but with support for the kernel keyring system, compromising the backup daemon would only compromise the backed up files, not the private keys and other secure data.

Quoted 3 lines

This sort of thing is implemented routinely in user space by means of proxy tickets/certificates/credentials. What makes them insufficient for this use?

Quoted 7 lines

The problem is that there is no standard way to store/use the keys. I can put my key in an ssh-agent to handle SSH, but that doesn't let me securely auth mozilla. To do that, I need to explore how mozilla configs work. And there are similar problems with context for Kerberos, OpenAFS, encrypted filesystems, etc. You need to have a common standardized way to pass the secure information around. This provides that interface.

"There's currently no standard" doesn't sound like a compelling reason why a standard should be implemented in the kernel instead of userspace.

Quoted 2 lines

Cheers,
Kyle Moffett

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#12 lore raw

Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Adrian Bunk
Quoted 6 lines · Adrian Bunk
Quoted 3 lines · David Härdeman

The reason that I wanted DSA-keys supported by the in-kernel key stuff is that it allows for some cool stuff which is either impossible or very hard to do otherwise.

For example, a backup daemon which wishes to store the backup on another host using ssh. Usually this is solved by storing an unencrypted key in the fs or by providing a connection to a ssh-agent which has been preloaded with the proper key(s). Both are quite inelegant solutions. With the in-kernel support, the daemon can request the key using the request_key call, and (provided proper scripts are written), the user who controls the relevant key can supply it. This in turn means that the backup daemon can sign using the key and read its public parts but not the private key.

What exactly is the unsolvable problem with doing this in userspace?

See below

Quoted 7 lines
Quoted 5 lines

So yes, that is one example of doing "something" with keys that the process is not allowed to retrieve directly (the key itself could be supplied from removable storage or something and given a few minutes of time-to-live).

It also means that users would not have to run ssh-agent and would not have to bother with making sure that only one instance of ssh-agent is running even if they are logged in multiple times.

The in-kernel key management also protects the key against many of the different ways in which a user-space daemon could be attacked (ptrace, swap-out, coredump, etc).

If an attacker has enough privileges for attacking the daemon, he should usually also have enough privileges for attacking the kernel.

Not necessarily, if you have your ssh-keys in ssh-agent, a compromise of your account (forgot to lock the screen while going to the bathroom? did the OOM-condition occur which killed the program which locks the screen? remote compromise of the system? local compromise?) means that a large array of attacks are possible against the daemon.

In addition, as stated before, the "backup" account, or whatever user the daemon which wants to sign stuff with your key is running as, might be compromised.

Currently, if you want to give the daemon access to the keys via ssh-agent (or something similar), you have to change the permissions on the ssh-agent socket to be much less restricted (especially since it's unlikely that you have permission to change the uid or gid of the socket to that of the daemon). Alternatively you can provide the backup daemon with the key directly (via fs, or loaded somehow at startup...etc), but then a compromise of the daemon means that the attacker has the private key.

Finally, the in-kernel system also provides a mechanism for the daemon to request the key when it is needed should it realize that the proper key is missing/has changed/whatever.

Quoted 1 line

The number of different attacks might be lower, but you haven't completely solved any problem.

Many of the problems are unsolveable without having specialized hardware (i.e. a smartcard). The fact that the dsa patch is not a panacea does not mean that it can't, or that we shouldn't strive to, improve upon the current situation

Quoted 5 lines
Quoted 2 lines

In addition, the dsa key code can be used to implement signed binaries and signed modules.
...

Checking signatures on modules sounds like a job for module-init-tools (if there's any real benefit in signing GPL'ed modules).

No, not really, take a look at http://lwn.net/Articles/92617/ for details of how signed modules could work (public key is merged into kernel at build time, private key is used to build modules with embedded signature, kernel checks module sigs at load-time using the embedded public key, so checks can't be in module-init-tools).

Regards,
David

#13 lore raw

Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 24 lines · David Härdeman

On Sat, Jan 28, 2006 at 01:22:41AM +0100, Adrian Bunk wrote:
...

Quoted 2 lines

If an attacker has enough privileges for attacking the daemon, he should usually also have enough privileges for attacking the kernel.

Not necessarily, if you have your ssh-keys in ssh-agent, a compromise of your account (forgot to lock the screen while going to the bathroom? did the OOM-condition occur which killed the program which locks the screen? remote compromise of the system? local compromise?) means that a large array of attacks are possible against the daemon.

In addition, as stated before, the "backup" account, or whatever user the daemon which wants to sign stuff with your key is running as, might be compromised.

Currently, if you want to give the daemon access to the keys via ssh-agent (or something similar), you have to change the permissions on the ssh-agent socket to be much less restricted (especially since it's unlikely that you have permission to change the uid or gid of the socket to that of the daemon). Alternatively you can provide the backup daemon with the key directly (via fs, or loaded somehow at startup...etc), but then a compromise of the daemon means that the attacker has the private key.

Quoted 3 lines

Finally, the in-kernel system also provides a mechanism for the daemon to request the key when it is needed should it realize that the proper key is missing/has changed/whatever.

I'm sorry, but I'm still not getting the point:

Which part of this task is technically impossible to implement through a userspace daemon?

Quoted 7 lines
Quoted 2 lines

The number of different attacks might be lower, but you haven't completely solved any problem.

Many of the problems are unsolveable without having specialized hardware (i.e. a smartcard). The fact that the dsa patch is not a panacea does not mean that it can't, or that we shouldn't strive to, improve upon the current situation

I'm still not understanding the big improvements when doing it in the kernel instead of doing it in a userspace daemon.

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

In addition, the dsa key code can be used to implement signed binaries and signed modules.
...

Quoted 8 lines
Quoted 2 lines

Checking signatures on modules sounds like a job for module-init-tools (if there's any real benefit in signing GPL'ed modules).

No, not really, take a look at http://lwn.net/Articles/92617/ for details of how signed modules could work (public key is merged into kernel at build time, private key is used to build modules with embedded signature, kernel checks module sigs at load-time using the embedded public key, so checks can't be in module-init-tools).

The only point in this lwn article that is not solvable outside of the kernel is if distributions want to prevent loading of modules they haven't authorized.

The lwn article outlines how distributions can use this for demanding money from module vendors. Distributions can do this if they want to, but this is nothing we should add a single byte of code for.

Quoted 2 lines

Regards,
David

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#15 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to David Härdeman
Quoted 19 lines · David Härdeman

Not necessarily, if you have your ssh-keys in ssh-agent, a compromise of your account (forgot to lock the screen while going to the bathroom? did the OOM-condition occur which killed the program which locks the screen? remote compromise of the system? local compromise?) means that a large array of attacks are possible against the daemon.

In addition, as stated before, the "backup" account, or whatever user the daemon which wants to sign stuff with your key is running as, might be compromised.

Currently, if you want to give the daemon access to the keys via ssh-agent (or something similar), you have to change the permissions on the ssh-agent socket to be much less restricted (especially since it's unlikely that you have permission to change the uid or gid of the socket to that of the daemon). Alternatively you can provide the backup daemon with the key directly (via fs, or loaded somehow at startup...etc), but then a compromise of the daemon means that the attacker has the private key.

Quoted 3 lines

Finally, the in-kernel system also provides a mechanism for the daemon to request the key when it is needed should it realize that the proper key is missing/has changed/whatever.

Then fix ssh, not the kernel. As I said before, this is a problem that has been solved entirely in userspace by means of proxy certificates:
they allow the user to issue time-limited certificates that are signed by the original certificate (hence can be authenticated as such), and that authorise a service to do a specific thing.

Cheers,
Trond

#16 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 8 lines · Trond Myklebust
Quoted 7 lines · David Härdeman

Not necessarily, if you have your ssh-keys in ssh-agent, a compromise of your account (forgot to lock the screen while going to the bathroom? did the OOM-condition occur which killed the program which locks the screen? remote compromise of the system? local compromise?) means that a large array of attacks are possible against the daemon.

In addition, as stated before, the "backup" account, or whatever user the daemon which wants to sign stuff with your key is running as, might be compromised.

Currently, if you want to give the daemon access to the keys via ssh-agent (or something similar), you have to change the permissions on the ssh-agent socket to be much less restricted (especially since it's unlikely that you have permission to change the uid or gid of the socket to that of the daemon). Alternatively you can provide the backup daemon with the key directly (via fs, or loaded somehow at startup...etc), but then a compromise of the daemon means that the attacker has the private key.

Quoted 7 lines
Quoted 1 line

Finally, the in-kernel system also provides a mechanism for the daemon to request the key when it is needed should it realize that the proper key is missing/has changed/whatever.

Then fix ssh, not the kernel. As I said before, this is a problem that has been solved entirely in userspace by means of proxy certificates:
they allow the user to issue time-limited certificates that are signed by the original certificate (hence can be authenticated as such), and that authorise a service to do a specific thing.

What about the first paragraph of what I wrote? You are going to want to keep often-used keys around somehow, proxy certificates is not a solution for your own use of your personal keys and with the exception of hardware solutions such as smart cards, the keys will be safer in the kernel than in a user-space daemon...

Further, the mpi and dsa code can also be used for supporting signed modules and binaries...the "store dsa-keys in kernel" part adds 376 lines of code (counted with wc so comments and includes etc are also counted)...

Regards,
David

#14 lore raw

Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Adrian Bunk
Quoted 10 lines · Adrian Bunk
Quoted 9 lines · David Härdeman

On Sat, Jan 28, 2006 at 01:22:41AM +0100, Adrian Bunk wrote:
...

Quoted 1 line

If an attacker has enough privileges for attacking the daemon, he should usually also have enough privileges for attacking the kernel.

Not necessarily, if you have your ssh-keys in ssh-agent, a compromise of your account (forgot to lock the screen while going to the bathroom? did the OOM-condition occur which killed the program which locks the screen? remote compromise of the system? local compromise?) means that a large array of attacks are possible against the daemon.

In addition, as stated before, the "backup" account, or whatever user the daemon which wants to sign stuff with your key is running as, might be compromised.

Quoted 8 lines
Quoted 3 lines

Currently, if you want to give the daemon access to the keys via ssh-agent (or something similar), you have to change the permissions on the ssh-agent socket to be much less restricted (especially since it's unlikely that you have permission to change the uid or gid of the socket to that of the daemon). Alternatively you can provide the backup daemon with the key directly (via fs, or loaded somehow at startup...etc), but then a compromise of the daemon means that the attacker has the private key.

Finally, the in-kernel system also provides a mechanism for the daemon to request the key when it is needed should it realize that the proper key is missing/has changed/whatever.

I'm sorry, but I'm still not getting the point:

Which part of this task is technically impossible to implement through a userspace daemon?

See my latest reply to Trond...putting the keys in the kernel makes them as secure as they can be without having specialized hardware (e.g. smartcards).

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

The number of different attacks might be lower, but you haven't completely solved any problem.

Many of the problems are unsolveable without having specialized hardware (i.e. a smartcard). The fact that the dsa patch is not a panacea does not mean that it can't, or that we shouldn't strive to, improve upon the current situation

I'm still not understanding the big improvements when doing it in the kernel instead of doing it in a userspace daemon.

You said it yourself above...the number of different attacks is lower

Quoted 10 lines
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

In addition, the dsa key code can be used to implement signed binaries and signed modules.
...

Checking signatures on modules sounds like a job for module-init-tools (if there's any real benefit in signing GPL'ed modules).

No, not really, take a look at http://lwn.net/Articles/92617/ for details of how signed modules could work (public key is merged into kernel at build time, private key is used to build modules with embedded signature, kernel checks module sigs at load-time using the embedded public key, so checks can't be in module-init-tools).

The only point in this lwn article that is not solvable outside of the kernel is if distributions want to prevent loading of modules they haven't authorized.

Ehh...how do you provide the features of signed modules in user-space?

Quoted 1 line

The lwn article outlines how distributions can use this for demanding money from module vendors. Distributions can do this if they want to, but this is nothing we should add a single byte of code for.

There are already distributions with the patch in their kernel (Fedora), so why would they care if signed modules patches are added to the vanilla kernel or not?

On the other hand, it does add functionality which is useful to some users even if it is not useful to all.

Regards,
David

#17 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to David Härdeman
Quoted 5 lines · David Härdeman

What about the first paragraph of what I wrote? You are going to want to keep often-used keys around somehow, proxy certificates is not a solution for your own use of your personal keys and with the exception of hardware solutions such as smart cards, the keys will be safer in the kernel than in a user-space daemon...

I don't get this explanation at all.

Why would you want to use proxy certificates for you own use? Use your own certificate for your own processes, and issue one or more proxy certificates to any daemon that you want to authorise to do some limited task.

...and what does this statement about "keys being safer in the kernel" mean?

Quoted 4 lines

Further, the mpi and dsa code can also be used for supporting signed modules and binaries...the "store dsa-keys in kernel" part adds 376 lines of code (counted with wc so comments and includes etc are also counted)...

Signed modules sounds like a better motivation, but is a full dsa implementation in the kernel really necessary to achieve this?

Cheers,
Trond

#18 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 9 lines · Trond Myklebust
Quoted 1 line · David Härdeman

What about the first paragraph of what I wrote? You are going to want to keep often-used keys around somehow, proxy certificates is not a solution for your own use of your personal keys and with the exception of hardware solutions such as smart cards, the keys will be safer in the kernel than in a user-space daemon...

I don't get this explanation at all.

Why would you want to use proxy certificates for you own use? Use your own certificate for your own processes, and issue one or more proxy certificates to any daemon that you want to authorise to do some limited task.

I meant that you can't use proxy certs for your own use, so you still need to store your own cert/key somehow...and I still believe that the kernel keyring is the best place...

Quoted 2 lines

...and what does this statement about "keys being safer in the kernel" mean?

swap-out to disk, ptrace, coredump all become non-issues. And in combination with some other security features (such as disallowing modules, read/write of /dev/mem + /dev/kmem, limited permissions via SELinux, etc), it becomes pretty hard for the attacker to get your private key even if he/she manages to get access to the root account.

Quoted 4 lines
Quoted 1 line

Further, the mpi and dsa code can also be used for supporting signed modules and binaries...the "store dsa-keys in kernel" part adds 376 lines of code (counted with wc so comments and includes etc are also counted)...

Signed modules sounds like a better motivation, but is a full dsa implementation in the kernel really necessary to achieve this?

How would you do it otherwise?

Re,
David

#19 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 10 lines · David Härdeman
Quoted 9 lines · Trond Myklebust
Quoted 5 lines · David Härdeman

What about the first paragraph of what I wrote? You are going to want to keep often-used keys around somehow, proxy certificates is not a solution for your own use of your personal keys and with the exception of hardware solutions such as smart cards, the keys will be safer in the kernel than in a user-space daemon...

I don't get this explanation at all.

Quoted 8 lines
Quoted 4 lines

Why would you want to use proxy certificates for you own use? Use your own certificate for your own processes, and issue one or more proxy certificates to any daemon that you want to authorise to do some limited task.

I meant that you can't use proxy certs for your own use, so you still need to store your own cert/key somehow...and I still believe that the kernel keyring is the best place...

You are taking the wrong approach.

The _only_ question that matters is:
Why is it technically impossible to do the same in userspace?

If it's technically possible to do the same in userspace, it must not be done in the kernel.

That's exactly the reason why e.g. kernel 2.6 does not contain a webserver.

Quoted 9 lines
Quoted 2 lines

...and what does this statement about "keys being safer in the kernel" mean?

swap-out to disk, ptrace, coredump all become non-issues. And in combination with some other security features (such as disallowing modules, read/write of /dev/mem + /dev/kmem, limited permissions via SELinux, etc), it becomes pretty hard for the attacker to get your private key even if he/she manages to get access to the root account.
...

Which part of this is technically impossible when doing key management in usespace?

Quoted 2 lines

Re,
David

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#20 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 9 lines

You are taking the wrong approach.

The _only_ question that matters is:
Why is it technically impossible to do the same in userspace?

If it's technically possible to do the same in userspace, it must not be done in the kernel.

that is not a reasonable statement because...
1) you can do all of tcp/ip in userspace just fine
2) you can do the NFS server in userspace
3) ...
4) ...

there are reasons why things that can be done in userspace sometimes still make sense to do in kernel space, performance could be one of those reasons, being unreasonably complex in userspace is another.

Identity management to some degree belongs in the kernel, simply because identity *enforcing* is in the kernel. Some things related to security need to be in the kernel at least partially just to avoid a LOT of hairy issues and never ending series of security holes due to the exceptional complexity you get.

#26 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Adrian Bunk
Quoted 6 lines · Adrian Bunk

You are taking the wrong approach.

The _only_ question that matters is:
Why is it technically impossible to do the same in userspace?

If it's technically possible to do the same in userspace, it must not be done in the kernel.

It may not be impossible, but adding support for dsa key types to the in-kernel key management is something like 150 lines of code once the dsa crypto-ops are implemented. I think you get a lot of convenience for those 150 lines (and yes, I do believe that convenience is also a valid argument for adding functionality). Having to protect against all attack vectors is much harder in user-space than in kernel-space.

As for the addition of the dsa crypto-ops, you still haven't answered the question of how signed modules and/or binaries can be implemented in userspace...

Quoted 1 line

That's exactly the reason why e.g. kernel 2.6 does not contain a webserver.

Apples and oranges

Re,
David

#29 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to David Härdeman
Quoted 8 lines · David Härdeman
Quoted 4 lines

Why would you want to use proxy certificates for you own use? Use your own certificate for your own processes, and issue one or more proxy certificates to any daemon that you want to authorise to do some limited task.

I meant that you can't use proxy certs for your own use, so you still need to store your own cert/key somehow...and I still believe that the kernel keyring is the best place...

Agreed. Now, reread what I said above, and tell me why this is an argument for doing dsa in the kernel?

Quoted 8 lines
Quoted 2 lines

...and what does this statement about "keys being safer in the kernel" mean?

swap-out to disk, ptrace, coredump all become non-issues. And in combination with some other security features (such as disallowing modules, read/write of /dev/mem + /dev/kmem, limited permissions via SELinux, etc), it becomes pretty hard for the attacker to get your private key even if he/she manages to get access to the root account.

Turning off coredump is trivial. All the features that LSM provide apply to userland too (including security_ptrace()), so the SELinux policies are not an argument for putting stuff in the kernel.

Only the swap-out to disk is an issue, and that is less of a worry if you use a time-limited proxy in the daemon.

Quoted 9 lines
Quoted 7 lines
Quoted 4 lines

Further, the mpi and dsa code can also be used for supporting signed modules and binaries...the "store dsa-keys in kernel" part adds 376 lines of code (counted with wc so comments and includes etc are also counted)...

Signed modules sounds like a better motivation, but is a full dsa implementation in the kernel really necessary to achieve this?

How would you do it otherwise?

Has anyone tried to look for simpler signing mechanisms that make use of the crypto algorithms that are already in the kernel?

Cheers,
Trond

#30 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

..... Original Message .......

Quoted 23 lines · On Sun, 29 Jan 2006 11:38:22 -0500 "Trond Myklebust"…
Quoted 8 lines · David Härdeman
Quoted 4 lines

Why would you want to use proxy certificates for you own use? Use your own certificate for your own processes, and issue one or more proxy certificates to any daemon that you want to authorise to do some limited task.

I meant that you can't use proxy certs for your own use, so you still need to store your own cert/key somehow...and I still believe that the kernel keyring is the best place...

Agreed. Now, reread what I said above, and tell me why this is an argument for doing dsa in the kernel?

Quoted 8 lines
Quoted 2 lines

...and what does this statement about "keys being safer in the kernel" mean?

swap-out to disk, ptrace, coredump all become non-issues. And in combination with some other security features (such as disallowing modules, read/write of /dev/mem + /dev/kmem, limited permissions via SELinux, etc), it becomes pretty hard for the attacker to get your private key even if he/she manages to get access to the root account.

Quoted 6 lines

Turning off coredump is trivial. All the features that LSM provide apply to userland too (including security_ptrace()), so the SELinux policies are not an argument for putting stuff in the kernel.

Only the swap-out to disk is an issue, and that is less of a worry if you use a time-limited proxy in the daemon.

I seem to remember a feature in the kernel that allows each uid to mlock a small number of memory pages specifically intended to be used by daemons that cache keys. It is possible this was a Fedora kernel patch and not in the mainline kernel.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

Further, the mpi and dsa code can also be used for supporting signed modules and binaries...the "store dsa-keys in kernel" part adds 376 lines of code (counted with wc so comments and includes etc are also counted)...

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Signed modules sounds like a better motivation, but is a full dsa implementation in the kernel really necessary to achieve this?

How would you do it otherwise?

Has anyone tried to look for simpler signing mechanisms that make use of the crypto algorithms that are already in the kernel?

Maybe you meant something else, but history has shown that 'rolling your own' mechanism is a bad idea.

Are there even any suitable algorithms in the kernel??

___
Dax Kelson
Sent with my Treo

#31 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 6 lines · Dax Kelson
Quoted 2 lines

Has anyone tried to look for simpler signing mechanisms that make use of the crypto algorithms that are already in the kernel?

Maybe you meant something else, but history has shown that 'rolling your own' mechanism is a bad idea.

Are there even any suitable algorithms in the kernel??

I'm suggesting that if the only real problem that dsa in the kernel solves is module signing, then perhaps one can simplify the problem.

For instance, if instead of going for a general signing mechanism in the kernel that will take any old module and verify it, you define a particular binary as being trusted, and then devise a signature that the kernel can check (even the SHA-1 of the binary image might be sufficient).
The object would be to give the kernel a trusted program that can check module signatures on its behalf.

Cheers,
Trond

#21 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Arjan van de Ven
Quoted 20 lines · Arjan van de Ven
Quoted 8 lines

You are taking the wrong approach.

The _only_ question that matters is:
Why is it technically impossible to do the same in userspace?

If it's technically possible to do the same in userspace, it must not be done in the kernel.

that is not a reasonable statement because...
1) you can do all of tcp/ip in userspace just fine
2) you can do the NFS server in userspace
3) ...
4) ...

there are reasons why things that can be done in userspace sometimes still make sense to do in kernel space, performance could be one of those reasons, being unreasonably complex in userspace is another.

Quoted 9 lines

Identity management to some degree belongs in the kernel, simply because identity *enforcing* is in the kernel. Some things related to security need to be in the kernel at least partially just to avoid a LOT of hairy issues and never ending series of security holes due to the exceptional complexity you get.

Yes - nicely stated. There are a few cases in which code would be simpler in kernel, and there are even more cases where performance or security considerations argue for a mostly kernel implementation of a key piece of function. Although I don't know if the case has been reproven for web servers (userspace) or nfs server (kernel) recently, this case may be easier to work through if we understood the likely use scenarios better of this piece of code. I don't know the right answer for the particular math library question, but I have not seen the typical argument considered about whether a user space implementation of this paticular function could deadlock - ie would this code (proposed to move to userspace) ever be called in a path in which the:
1) kernel were out of memory and userspace is needed to resolve the
write out of dirty memory
2) hang due to code going up to userspace in path in which key
kernel semaphores must be held across the call.

#22 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 4 lines

I don't know the right answer
for the particular math library question, but I have not seen the typical argument considered about whether a user space implementation of this paticular function could deadlock

it's not that kind of thing. It's basically a public key encryption step. Putting it in the kernel can only serve one purpose: to be there to allow other parts to use this pke for encrypting/signing/verifying signatures.

The keyring stuff is in the kernel for three reasons:
1) to have a secure "vault" for keys, so that userspace doesn't need to store secret keys and manage them securely; this requires that certain operations on these keys also happen in the kernel
2) to make session management of keys easier. Yes you can do that in userspace too but it's a mess (ssh-agent, while it works, isn't really it)
3) to allow kernel pieces to do key things, like the secure nfs parts of nfsv4 or ipsec.

#41 lore raw

Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to David Härdeman

Hi!

Quoted 8 lines
Quoted 2 lines

If an attacker has enough privileges for attacking the daemon, he should usually also have enough privileges for attacking the kernel.

Not necessarily, if you have your ssh-keys in ssh-agent, a compromise of your account (forgot to lock the screen while going to the bathroom? did the OOM-condition occur which killed the program which locks the screen? remote compromise of the system? local compromise?) means that a large array of attacks are possible against the daemon.

Run your ssh-agent on root, then. That's as safe as kernel... And does not add potential security holes into kernel :-).
Pavel

Signature · 1 line
Thanks, Sharp!
#34 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Trond Myklebust
Quoted 10 lines · Trond Myklebust
Quoted 6 lines · David Härdeman
Quoted 4 lines

Why would you want to use proxy certificates for you own use? Use your own certificate for your own processes, and issue one or more proxy certificates to any daemon that you want to authorise to do some limited task.

I meant that you can't use proxy certs for your own use, so you still need to store your own cert/key somehow...and I still believe that the kernel keyring is the best place...

Agreed. Now, reread what I said above, and tell me why this is an argument for doing dsa in the kernel?

If you agree that the kernel keyring is the best place, it shouldn't be a big step to also agree that in-kernel signing is "good" since it allows you to use the key while it makes it possible for the kernel to refuse to divulge the private part...even to the user who added the key (i.e. yourself)...

Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

...and what does this statement about "keys being safer in the kernel" mean?

swap-out to disk, ptrace, coredump all become non-issues. And in combination with some other security features (such as disallowing modules, read/write of /dev/mem + /dev/kmem, limited permissions via SELinux, etc), it becomes pretty hard for the attacker to get your private key even if he/she manages to get access to the root account.

Quoted 6 lines

Turning off coredump is trivial. All the features that LSM provide apply to userland too (including security_ptrace()), so the SELinux policies are not an argument for putting stuff in the kernel.

Only the swap-out to disk is an issue, and that is less of a worry if you use a time-limited proxy in the daemon.

How do you use a "time-limited proxy in the daemon" for your own keys/cerificates (e.g. ssh keys)?

Re,
David

#35 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 5 lines · David Härdeman

If you agree that the kernel keyring is the best place, it shouldn't be a big step to also agree that in-kernel signing is "good" since it allows you to use the key while it makes it possible for the kernel to refuse to divulge the private part...even to the user who added the key (i.e. yourself)...

No! I agree that the kernel keyring is a good place to keep keys because it has been designed with the correct inheritance rules. I do not agree with the above logic that the kernel is inherently safer than userland.

By the above logic, we should put libpam, openssl, kerberos, all login programs, kdcs, etc all in the kernel. That will not happen!

Quoted 13 lines
Quoted 13 lines
Quoted 8 lines
Quoted 2 lines

...and what does this statement about "keys being safer in the kernel" mean?

swap-out to disk, ptrace, coredump all become non-issues. And in combination with some other security features (such as disallowing modules, read/write of /dev/mem + /dev/kmem, limited permissions via SELinux, etc), it becomes pretty hard for the attacker to get your private key even if he/she manages to get access to the root account.

Turning off coredump is trivial. All the features that LSM provide apply to userland too (including security_ptrace()), so the SELinux policies are not an argument for putting stuff in the kernel.

Quoted 5 lines
Quoted 2 lines

Only the swap-out to disk is an issue, and that is less of a worry if you use a time-limited proxy in the daemon.

How do you use a "time-limited proxy in the daemon" for your own keys/cerificates (e.g. ssh keys)?

I don't have to. Why are you apparently insisting on this weird fallacy that a keyring can only hold one certificate at a time?

However if you want an example of how I can do this, just look to kerberos. What is probably the world's most commonly used security mechanism is entirely based on the concept of time-limited tickets. When I log in, I get a TGT, which is a time-limited proxy ticket that allows me to obtain more tickets without having to re-enter my password. This again allows me to obtain "service tickets", i.e. time-limited proxies with limited capabilities for any service that requires it.

Cheers,
Trond

#32 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Trond Myklebust
Quoted 11 lines · Trond Myklebust
Quoted 6 lines · Dax Kelson
Quoted 2 lines

Has anyone tried to look for simpler signing mechanisms that make use of the crypto algorithms that are already in the kernel?

Maybe you meant something else, but history has shown that 'rolling your own' mechanism is a bad idea.

Are there even any suitable algorithms in the kernel??

I'm suggesting that if the only real problem that dsa in the kernel solves is module signing, then perhaps one can simplify the problem.

Quoted 7 lines

For instance, if instead of going for a general signing mechanism in the kernel that will take any old module and verify it, you define a particular binary as being trusted, and then devise a signature that the kernel can check (even the SHA-1 of the binary image might be sufficient).
The object would be to give the kernel a trusted program that can check module signatures on its behalf.

Today, if a security bug is found in the kernel, you have to compile and install a new kernel.

With your system, the signature of a "trusted" binary is embedded in the kernel. Now, if a bug is found in said binary, you also get to compile and install a new kernel along with a new binary.

Since the application is trusted, a security hole in the binary equals a security hole in the kernel. In addition, you are bound to a given kernel <-> userspace ABI, so if it has to be changed, you get to keep several different trusted binaries around for different kernel versions (/sbin/module-validate-v1 for ABI version 1, /sbin/module-validate-v2 for ABI version 2, etc).

Further, how is the module actually verified? If the trusted binary reads it and checks "something" (i.e. a signature), and then says it's ok, what is to say that the module is not changed on-disk between the time when the binary reads it and when the kernel does so (for instance by direct access to the disk). How do you expect the system to provide security if you are running with nfs-root?

In addition you must protect the user-space binary against a slew of attacks (you did statically link it to protect against LD_PRELOAD, right?).

What exactly is the advantage of user-space trusted binary signing?

Regards,
David

#23 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Arjan van de Ven
Quoted 6 lines · Arjan van de Ven

it's not that kind of thing. It's basically a public key encryption step. Putting it in the kernel can only serve one purpose: to be there to allow other parts to use this pke for encrypting/signing/verifying signatures.

...

Quoted 4 lines

3) to allow kernel pieces to do key things, like the secure nfs parts of nfsv4 or ipsec.

That can still deadlock. If write or writepage or writepages requires a network frame to be signed and
an upcall occurs in that path ... For example cifs has long had signature code in kernel (depends on MD5 code in kernel, which because it is so small has not been controversial presumably) and write requests (which can be necessary to flush inode data when the system is low on memory) are signed and of course of types of frames are signed in cases where various semaphores on the parent directory or inode are held by the vfs. This signing is done in kernel and at least when authenticated with NTLM
(and presumably NTLMv2 as well) has turned out to be fairly simple. Note that for many or most
cifs servers in modern day domains packet signatures are required by default (unlike four or five years
ago when it was less common). A key issue that I have not worked through is whether this would change
as SPNEGO authentication negotiates PKI or Kerberos like tickets - and whether any of this in kernel infrastructure being discussed would be needed for the common case of cifs (beyond what we already have with MD5 packet signatures) or helpful for the case when Kerberos/SPNEGO authentication is negotiated (code that is not yet complete in cifs, but will probably be 90% done in userspace) because CIFS packet signing when Kerberos is authenticated (or when an alternative some x509/SPNEGO pki variant is more commonly seem from e.g. Windows servers or NAS appliances) different signing code may be required - and since the SMB WriteX frame would have to be signed ... it would be very risky to upcall if we find out that packet signing for the very, very common case (more than 2/3 of enterprises today) of Kerberized cifs sessions requires an encrypting/signing/verifying mechanism that is not in kernel.

Beyond the issue of how to handle the newer version of packet signing, my main interest in the calling the keyring code from kernel (from cifs vfs) is using it to determining more precisely what the "kerberos identity" of the current process is (ie what is the "user@realm" for the current process and do I have an authenticated session for him - so I can map the right smb_uid (in effect a handle to the network security context for the smb session) for the header of the SMB/CIFS network file requests coming from any particular process).

A secondary benefit of the keyring infrastructure, an issue that I hear frequently from advanced users, an issue that the kernel keyring may eventually solve is allowing me to automatically authenticate without all local users having to resupply the password for every local mount (in particular when /proc/fs/cifs/MultiuserMount
is enabled). Currently each unique user logged on to a system typically authenticates through pam but
kernel code has no access to the password that was supplied earlier at logon time, unless it is passed again
explicitly on mount. There are common cases in which users would logon locally with the same userid/password
as they would supply to mount to a remote server (especially when users authenticate to a central security server through pam_winbind or pam_ldap, pam_kerberos) - in those cases I hope someday that an optional pam module is available which saves the password (or in my case there is also a one way hash of the password which would be fine) in the kernel key ring so cifs does not have to upcall in the middle of an operation (from what to cifs is a new user for this mount) to prompt the user at runtime for a password (which
would be awful). Currently users have to mount to the same server (and export) multiple times, once with
each uid/user/password combination - and the keyring would solve this if there were an optional pam module that could save passwords (and eventually kerberos tickets too) securely in kernel in the keyring.

#33 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to David Härdeman
Quoted 3 lines · David Härdeman

With your system, the signature of a "trusted" binary is embedded in the kernel. Now, if a bug is found in said binary, you also get to compile and install a new kernel along with a new binary.

If you compile a SHA-1 signature directly into the kernel, yes. Alternatively, you could for instance allow it to be set once and only once upon boot.

Quoted 6 lines

Since the application is trusted, a security hole in the binary equals a security hole in the kernel. In addition, you are bound to a given kernel <-> userspace ABI, so if it has to be changed, you get to keep several different trusted binaries around for different kernel versions (/sbin/module-validate-v1 for ABI version 1, /sbin/module-validate-v2 for ABI version 2, etc).

See modprobe. We already have that sort of dependency.

Quoted 6 lines

Further, how is the module actually verified? If the trusted binary reads it and checks "something" (i.e. a signature), and then says it's ok, what is to say that the module is not changed on-disk between the time when the binary reads it and when the kernel does so (for instance by direct access to the disk). How do you expect the system to provide security if you are running with nfs-root?

You have to verify the module _after_ it has been loaded into the kernel, but before any code has been run. No difference there between a userspace and a kernel space solution.

Quoted 2 lines

In addition you must protect the user-space binary against a slew of attacks (you did statically link it to protect against LD_PRELOAD, right?).

I assume so.

Quoted 1 line

What exactly is the advantage of user-space trusted binary signing?

Umm... No unnecessary junk in the kernel when you are not loading in modules? Greater possible choice of signing mechanisms? Support for revoking signatures?

Cheers,
Trond

#36 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Trond Myklebust
Quoted 5 lines · Trond Myklebust
Quoted 1 line · David Härdeman

How do you use a "time-limited proxy in the daemon" for your own keys/cerificates (e.g. ssh keys)?

I don't have to. Why are you apparently insisting on this weird fallacy that a keyring can only hold one certificate at a time?

I'm talking about ssh keys, not kerberos tickets.

Re,
David

#37 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 9 lines · David Härdeman
Quoted 6 lines · Trond Myklebust
Quoted 2 lines · David Härdeman

How do you use a "time-limited proxy in the daemon" for your own keys/cerificates (e.g. ssh keys)?

I don't have to. Why are you apparently insisting on this weird fallacy that a keyring can only hold one certificate at a time?

I'm talking about ssh keys, not kerberos tickets.

As I said previously, the lack of support for proxies would appear to be a bug in ssh, not the kernel.

Cheers,
Trond

#38 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 10 lines · Trond Myklebust
Quoted 7 lines · David Härdeman
Quoted 4 lines · Trond Myklebust
Quoted 1 line · David Härdeman

How do you use a "time-limited proxy in the daemon" for your own keys/cerificates (e.g. ssh keys)?

I don't have to. Why are you apparently insisting on this weird fallacy that a keyring can only hold one certificate at a time?

I'm talking about ssh keys, not kerberos tickets.

As I said previously, the lack of support for proxies would appear to be a bug in ssh, not the kernel.

You keep mentioning proxy certificates. So you are saying that when I pass the key to some daemon to which I do not want it to have permanent access, I should create a proxy certificate to pass instead? This _vastly_ increases the amount of math that needs to be done. Instead of just using my private key to encrypt data, I would need to generate a new private key with the required encryption strength, generate a proxy certificate, sign the proxy certificate with the old private key, keep track of revocation lists somehow (how do I reliably expire a proxy certificate on-demand everywhere it might be without a web-server hosting the CRLs?), _then_ I can finally encrypt my data with the proxy certificate. I think this qualifies as a serious performance problem, especially if I'm opening and closing lots of SSH tunnels, like running remote commands on every system in a cluster.

If we use this proposed in-kernel system, then I can give my certificate/pubkey to the kernel code, and then my web browser, SSH, and anything else can automatically use it to decrypt and sign data without being able to directly access (and thus compromise) the key. If I later notice what I think might be a rogue process, I can instantly and globally revoke all access to that keypair.

Cheers,
Kyle Moffett

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/E/U d- s++: a18 C++++>$ ULBX*++++(+++)>$ P++++(+++)>$ L++++(+++)>$ !E- W+++(++) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+ PGP+ t+(+++) 5 X R? !tv-(--) b++++(++) DI+(++) D+++ G e>++++$ h*(+)>++$ r%(--) !y?-(--) ------END GEEK CODE BLOCK------

#39 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

Quoted 6 lines · Kyle Moffett

You keep mentioning proxy certificates. So you are saying that when I pass the key to some daemon to which I do not want it to have permanent access, I should create a proxy certificate to pass instead? This _vastly_ increases the amount of math that needs to be done. Instead of just using my private key to encrypt data, I would need to generate a new private key with the required encryption

Quoted 8 lines

strength, generate a proxy certificate, sign the proxy certificate with the old private key, keep track of revocation lists somehow (how do I reliably expire a proxy certificate on-demand everywhere it might be without a web-server hosting the CRLs?), _then_ I can finally encrypt my data with the proxy certificate. I think this qualifies as a serious performance problem, especially if I'm opening and closing lots of SSH tunnels, like running remote commands on every system in a cluster.

Feel free to profile it. I challenge you to find a real-life application where the above is actually a performance problem.

Quoted 6 lines

If we use this proposed in-kernel system, then I can give my certificate/pubkey to the kernel code, and then my web browser, SSH, and anything else can automatically use it to decrypt and sign data without being able to directly access (and thus compromise) the key. If I later notice what I think might be a rogue process, I can instantly and globally revoke all access to that keypair.

The latter is something you can do with keyrings anyway. As for the former, that too is completely solvable in userspace. For instance, CITI has a scheme for issuing X509 proxy certificates given a kerberos key. ssh can log you in automatically given the same kerberos key,...

This sort of problem is simply not a reason for sticking dsa into the kernel.

Cheers,
Trond

#40 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Kyle Moffett
Quoted 7 lines · Kyle Moffett

...
If we use this proposed in-kernel system, then I can give my certificate/pubkey to the kernel code, and then my web browser, SSH, and anything else can automatically use it to decrypt and sign data without being able to directly access (and thus compromise) the key. If I later notice what I think might be a rogue process, I can instantly and globally revoke all access to that keypair.

Why do you need this in the kernel?

A userspace daemon could do exactly the same.

Quoted 2 lines

Cheers,
Kyle Moffett

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#25 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Arjan van de Ven
Quoted 17 lines · Arjan van de Ven
Quoted 9 lines

You are taking the wrong approach.

The _only_ question that matters is:
Why is it technically impossible to do the same in userspace?

If it's technically possible to do the same in userspace, it must not be done in the kernel.

that is not a reasonable statement because...
1) you can do all of tcp/ip in userspace just fine
2) you can do the NFS server in userspace
3) ...
4) ...

Quoted 3 lines

there are reasons why things that can be done in userspace sometimes still make sense to do in kernel space, performance could be one of those reasons, being unreasonably complex in userspace is another.

Agreed, my sentence was too general.

Quoted 5 lines

Identity management to some degree belongs in the kernel, simply because identity *enforcing* is in the kernel. Some things related to security need to be in the kernel at least partially just to avoid a LOT of hairy issues and never ending series of security holes due to the exceptional complexity you get.

OK, this sounds reasonable in the cases where the enforcing is actually in the kernel (but not in the backup daemon example from this thread).

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#27 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to David Härdeman
Quoted 5 lines · David Härdeman

...
you still haven't answered
the question of how signed modules and/or binaries can be implemented in userspace...
...

It seems I'm slowly getting the point.

I was partially confused by your backup daemon deamon example that can be equally well implemented in userspace.

Signed modules and/or binaries seems to be the application this might be required for, so let's discuss exactly this application and not the others.

Quoted 2 lines

Re,
David

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#28 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

On 29 Jan 2006, Adrian Bunk uttered the following:

Quoted 3 lines

Signed modules and/or binaries seems to be the application this might be required for, so let's discuss exactly this application and not the others.

Indeed. See e.g. the digsig project at <http://disec.sf.net/> for a working implementation of signed binaries and shared libraries, with MPI in the module for exactly this purpose.

Signature · 2 lines
`I won't make a secret of the fact that your statement/question
 sent a wave of shock and horror through us.' --- David Anderson
maintainer
#24 lore raw

Re: [Keyrings] Re: [PATCH 01/04] Add multi-precision-integer maths library

In reply to Arjan van de Ven
Quoted 2 lines · Arjan van de Ven

3) to allow kernel pieces to do key things, like the secure nfs parts of nfsv4 or ipsec.

Also eCryptFS.

David