diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-06-16 12:11:01 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-06-17 20:49:05 +0200 |
commit | fac33709478cfbd1657aa502ea6ea1acb12ecc2d (patch) | |
tree | 429a26482407e34e4ac3e1873e63557cc048e21e /ncr_int.h | |
parent | a1e2f414b46deb9d746ba03fb337ef0c95d46f7a (diff) | |
download | cryptodev-linux-fac33709478cfbd1657aa502ea6ea1acb12ecc2d.tar.gz cryptodev-linux-fac33709478cfbd1657aa502ea6ea1acb12ecc2d.tar.xz cryptodev-linux-fac33709478cfbd1657aa502ea6ea1acb12ecc2d.zip |
Initial attempts to allow wrapping keys with out of band data such as flags, key ids etc.
Diffstat (limited to 'ncr_int.h')
-rw-r--r-- | ncr_int.h | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -36,8 +36,6 @@ struct data_item_st { ncr_data_t desc; }; -#define MAX_KEY_SIZE 32 /* in bytes */ - struct key_item_st { struct list_head list; /* This object is also not protected from concurrent access. @@ -50,7 +48,7 @@ struct key_item_st { union { struct { - uint8_t data[MAX_KEY_SIZE]; + uint8_t data[NCR_CIPHER_MAX_KEY_LEN]; size_t size; } secret; } key; @@ -122,6 +120,8 @@ ncr_key_type_t ncr_algorithm_to_key_type(ncr_algorithm_t algo); int ncr_key_wrap(struct list_sem_st* keys, struct list_sem_st* data, void __user* arg); int ncr_key_unwrap(struct list_sem_st*, struct list_sem_st* data, void __user* arg); +int ncr_key_storage_wrap(struct list_sem_st* key_lst, struct list_sem_st* data_lst, void __user* arg); +int ncr_key_storage_unwrap(struct list_sem_st*, struct list_sem_st* data, void __user* arg); /* sessions */ struct session_item_st* ncr_session_new(struct list_sem_st* lst); @@ -134,6 +134,11 @@ int ncr_session_update(struct ncr_lists* lists, void __user* arg); int ncr_session_final(struct ncr_lists* lists, void __user* arg); int ncr_session_once(struct ncr_lists* lists, void __user* arg); +/* master key */ +extern struct key_item_st master_key; + +void ncr_master_key_reset(void); + /* misc helper macros */ inline static unsigned int key_flags_to_data(unsigned int key_flags) { |