diff options
| author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-06-14 16:08:16 +0200 |
|---|---|---|
| committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-06-17 20:48:18 +0200 |
| commit | e9f738aa05a2dbf94fdf05de01d06d2ebf62529d (patch) | |
| tree | b07b75913153014c0019ed78cfdd3e7e2ccc5596 /ncr-cipher.h | |
| parent | 0b2ab77de147d60ca44de978a36e90e1138a5551 (diff) | |
| download | cryptodev-linux-e9f738aa05a2dbf94fdf05de01d06d2ebf62529d.tar.gz cryptodev-linux-e9f738aa05a2dbf94fdf05de01d06d2ebf62529d.tar.xz cryptodev-linux-e9f738aa05a2dbf94fdf05de01d06d2ebf62529d.zip | |
Added initial wrapping and unwrapping key API. Adds an implementation of the AES-WRAP (untested yet).
Diffstat (limited to 'ncr-cipher.h')
| -rw-r--r-- | ncr-cipher.h | 20 |
1 files changed, 20 insertions, 0 deletions
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 */ |
