Re: [PATCH v1.5 3/5] key: add tpm_send command

2010-11-23 Thread Serge Hallyn
Quoting Mimi Zohar (zo...@linux.vnet.ibm.com): > Add internal kernel tpm_send() command used to seal/unseal keys. > > Changelog: > - replaced module_put in tpm_send() with new tpm_chip_put() wrapper > (suggested by David Howells) > - Make tpm_send() cmd argument a 'void *' (suggested by David Ho

Re: [PATCH v1.5 2/5] tpm: add module_put wrapper

2010-11-23 Thread Serge Hallyn
Quoting Mimi Zohar (zo...@linux.vnet.ibm.com): > For readability, define a tpm_chip_put() wrapper to call module_put(). > Replace existing module_put() calls with the wrapper. > > (Change based on trusted/encrypted patchset review by David Howells.) > > Signed-off-by: Mimi Zohar > Signed-off-by:

[PATCH v1.5 3/5] key: add tpm_send command

2010-11-23 Thread Mimi Zohar
Add internal kernel tpm_send() command used to seal/unseal keys. Changelog: - replaced module_put in tpm_send() with new tpm_chip_put() wrapper (suggested by David Howells) - Make tpm_send() cmd argument a 'void *' (suggested by David Howells) Signed-off-by: David Safford Signed-off-by: Mimi Z

[PATCH v1.5 1/5] lib: hex2bin converts ascii hexadecimal string to binary

2010-11-23 Thread Mimi Zohar
Similar to the kgdb_hex2mem() code, hex2bin converts a string to binary using the hex_to_bin() library call. Changelog: - Replace parameter names with src/dst (based on David Howell's comment) - Add 'const' where needed (based on David Howell's comment) - Replace int with size_t (based on David Ho

[PATCH v1.5 4/5] keys: add new trusted key-type

2010-11-23 Thread Mimi Zohar
Define a new kernel key-type called 'trusted'. Trusted keys are random number symmetric keys, generated and RSA-sealed by the TPM. The TPM only unseals the keys, if the boot PCRs and other criteria match. Userspace can only ever see encrypted blobs. Based on suggestions by Jason Gunthorpe, sever

[PATCH v1.5 0/5] keys: trusted and encrypted keys

2010-11-23 Thread Mimi Zohar
Changes in this patchset were again based on David Howell's comments, including an encrypted key locking bugfix. The remaining changes are listed in the individual patch changelogs. (This patchset applies to security-testing/#next.) Trusted and Encrypted Keys are two new key types added to the exi

[PATCH v1.5 2/5] tpm: add module_put wrapper

2010-11-23 Thread Mimi Zohar
For readability, define a tpm_chip_put() wrapper to call module_put(). Replace existing module_put() calls with the wrapper. (Change based on trusted/encrypted patchset review by David Howells.) Signed-off-by: Mimi Zohar Signed-off-by: David Safford Acked-by: David Howells --- drivers/char/tp

Re: [PATCH 1/5] Add general crypto auditing infrastructure

2010-11-23 Thread Eric Paris
On Tue, 2010-11-23 at 13:25 -0500, Miloslav Trmac wrote: > - "Eric Paris" wrote: > > On Tue, 2010-11-23 at 13:50 +0100, Miloslav Trmač wrote: > > > Collect audited crypto operations in a list, because a single _exit() > > > can cause several AF_ALG sockets to be closed, and each needs to be >

Re: [PATCH 1/5] Add general crypto auditing infrastructure

2010-11-23 Thread Miloslav Trmac
- "Eric Paris" wrote: > On Tue, 2010-11-23 at 13:50 +0100, Miloslav Trmač wrote: > > Collect audited crypto operations in a list, because a single _exit() > > can cause several AF_ALG sockets to be closed, and each needs to be > > audited. > > > > Add the AUDIT_CRYPTO_OP field so that crypto

Re: [PATCH 1/5] Add general crypto auditing infrastructure

2010-11-23 Thread Eric Paris
On Tue, 2010-11-23 at 13:50 +0100, Miloslav Trmač wrote: > Collect audited crypto operations in a list, because a single _exit() > can cause several AF_ALG sockets to be closed, and each needs to be > audited. > > Add the AUDIT_CRYPTO_OP field so that crypto operations are not audited > by default

Re: crypto_shash_digest API

2010-11-23 Thread Herbert Xu
On Tue, Nov 23, 2010 at 09:34:01AM -0500, Mimi Zohar wrote: > Hi! > > Am having problems finding any shash API documentation. Could someone > tell me if 'out' needs to be zeroed before calling crypto_shash_digest? > > int crypto_shash_digest(struct shash_desc *desc, const u8 *data, >

crypto_shash_digest API

2010-11-23 Thread Mimi Zohar
Hi! Am having problems finding any shash API documentation. Could someone tell me if 'out' needs to be zeroed before calling crypto_shash_digest? int crypto_shash_digest(struct shash_desc *desc, const u8 *data, unsigned int len, u8 *out) thanks, Mimi -- To unsubscribe

[PATCH 5/5] Audit type-specific crypto operations

2010-11-23 Thread Miloslav Trmač
Signed-off-by: Miloslav Trmač --- crypto/af_alg.c | 14 ++ crypto/algif_hash.c | 27 +++ crypto/algif_skcipher.c | 15 +++ include/crypto/if_alg.h |6 ++ 4 files changed, 58 insertions(+), 4 deletions(-) diff --git a/cryp

[PATCH 3/5] Add "alg_name" operation to af_alg_type.

2010-11-23 Thread Miloslav Trmač
Signed-off-by: Miloslav Trmač --- crypto/algif_hash.c |6 ++ crypto/algif_skcipher.c |6 ++ include/crypto/if_alg.h |1 + 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c index f08a42c..3a61e9d 100644 --- a/crypto/a

[PATCH 1/5] Add general crypto auditing infrastructure

2010-11-23 Thread Miloslav Trmač
Collect audited crypto operations in a list, because a single _exit() can cause several AF_ALG sockets to be closed, and each needs to be audited. Add the AUDIT_CRYPTO_OP field so that crypto operations are not audited by default, but auditing can be enabled using a rule (probably "-F crypto_op!=0

[PATCH 4/5] Audit type-independent events

2010-11-23 Thread Miloslav Trmač
Signed-off-by: Miloslav Trmač --- crypto/af_alg.c | 30 ++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 490ae43..fc1b0f7 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -14,6 +14,7 @@ #include #in

[PATCH 2/5] Add unique IDs to AF_ALG sockets

2010-11-23 Thread Miloslav Trmač
Ideally we should be able to use i_ino of the inode associated with the socket, but i_ino can have duplicate values if the static counter inside new_inode() wraps around. Signed-off-by: Miloslav Trmač --- crypto/af_alg.c | 66 +- crypto/algif

RFC: AF_ALG auditing

2010-11-23 Thread Miloslav Trmac
Hello, attached is an user-space patch that adds support for auditing uses of the AF_ALG protocol family developed by Herbert Xu to provide user-space access to kernel crypto accelerators. Kernel patches will follow. One new record is defined: AUDIT_CRYPTO_USERSPACE_OP. An audited event is al