Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227788
b: refs/heads/master
c: 7e70cb4
h: refs/heads/master
v: v3
  • Loading branch information
Mimi Zohar authored and James Morris committed Nov 28, 2010
1 parent 9fc07c9 commit eeeb0e0
Show file tree
Hide file tree
Showing 6 changed files with 1,010 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d00a1c72f7f4661212299e6cb132dfa58030bcdb
refs/heads/master: 7e70cb4978507cf31d76b90e4cfb4c28cad87f0c
29 changes: 29 additions & 0 deletions trunk/include/keys/encrypted-type.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright (C) 2010 IBM Corporation
* Author: Mimi Zohar <zohar@us.ibm.com>
*
* 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, version 2 of the License.
*/

#ifndef _KEYS_ENCRYPTED_TYPE_H
#define _KEYS_ENCRYPTED_TYPE_H

#include <linux/key.h>
#include <linux/rcupdate.h>

struct encrypted_key_payload {
struct rcu_head rcu;
char *master_desc; /* datablob: master key name */
char *datalen; /* datablob: decrypted key length */
u8 *iv; /* datablob: iv */
u8 *encrypted_data; /* datablob: encrypted data */
unsigned short datablob_len; /* length of datablob */
unsigned short decrypted_datalen; /* decrypted data length */
u8 decrypted_data[0]; /* decrypted data + datablob + hmac */
};

extern struct key_type key_type_encrypted;

#endif /* _KEYS_ENCRYPTED_TYPE_H */
16 changes: 16 additions & 0 deletions trunk/security/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ config TRUSTED_KEYS

If you are unsure as to whether this is required, answer N.

config ENCRYPTED_KEYS
tristate "ENCRYPTED KEYS"
depends on KEYS && TRUSTED_KEYS
select CRYPTO_AES
select CRYPTO_CBC
select CRYPTO_SHA256
select CRYPTO_RNG
help
This option provides support for create/encrypting/decrypting keys
in the kernel. Encrypted keys are kernel generated random numbers,
which are encrypted/decrypted with a 'master' symmetric key. The
'master' key can be either a trusted-key or user-key type.
Userspace only ever sees/stores encrypted blobs.

If you are unsure as to whether this is required, answer N.

config KEYS_DEBUG_PROC_KEYS
bool "Enable the /proc/keys file by which keys may be viewed"
depends on KEYS
Expand Down
1 change: 1 addition & 0 deletions trunk/security/keys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ obj-y := \
user_defined.o

obj-$(CONFIG_TRUSTED_KEYS) += trusted_defined.o
obj-$(CONFIG_ENCRYPTED_KEYS) += encrypted_defined.o
obj-$(CONFIG_KEYS_COMPAT) += compat.o
obj-$(CONFIG_PROC_FS) += proc.o
obj-$(CONFIG_SYSCTL) += sysctl.o
Loading

0 comments on commit eeeb0e0

Please sign in to comment.