From e9f738aa05a2dbf94fdf05de01d06d2ebf62529d Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 14 Jun 2010 16:08:16 +0200 Subject: Added initial wrapping and unwrapping key API. Adds an implementation of the AES-WRAP (untested yet). --- ncr-cipher.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ncr-cipher.h (limited to 'ncr-cipher.h') diff --git a/ncr-cipher.h b/ncr-cipher.h new file mode 100644 index 0000000..a582fc6 --- /dev/null +++ b/ncr-cipher.h @@ -0,0 +1,20 @@ +/* cipher stuff */ + +#ifndef NCR_CIPHER_H +# define NCR_CIPHER_H + +ncr_session_t ncr_cipher_init(struct list_sem_st* sess_lst, + ncr_algorithm_t algorithm, struct key_item_st *key, void* iv, size_t iv_size); +int ncr_cipher_encrypt(struct list_sem_st* sess_lst, ncr_session_t session, + const struct data_item_st * plaintext, struct data_item_st* ciphertext); +int ncr_cipher_decrypt(struct list_sem_st* sess_lst, ncr_session_t session, + const struct data_item_st * ciphertext, struct data_item_st* plaintext); +void ncr_cipher_deinit(struct list_sem_st* lst, ncr_session_t session); + +int _ncr_cipher_encrypt(struct list_sem_st* sess_lst, + ncr_session_t session, void* plaintext, size_t plaintext_size); + +int _ncr_cipher_decrypt(struct list_sem_st* sess_lst, + ncr_session_t session, void* plaintext, size_t plaintext_size); + +#endif /* NCR_CIPHER_H */ -- cgit