diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-24 13:43:43 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-24 18:38:58 +0200 |
commit | ffb3e747f8b50ca18701530d1729a4ee3aa4ae69 (patch) | |
tree | efa9b3552566ce2891c1c105cd9fd5f4c3baa269 /ncr-pk.h | |
parent | 4b45720ea1dffc3514c81439c7f93928d05c5521 (diff) | |
download | cryptodev-linux-ffb3e747f8b50ca18701530d1729a4ee3aa4ae69.tar.gz cryptodev-linux-ffb3e747f8b50ca18701530d1729a4ee3aa4ae69.tar.xz cryptodev-linux-ffb3e747f8b50ca18701530d1729a4ee3aa4ae69.zip |
Added a support for reading session data directly from userspace.
Diffstat (limited to 'ncr-pk.h')
-rw-r--r-- | ncr-pk.h | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -34,15 +34,21 @@ int ncr_pk_cipher_init(const struct algo_properties_st *algo, struct ncr_pk_ctx* ctx, struct ncr_key_params_st* params, struct key_item_st *key, const struct algo_properties_st *sign_hash); void ncr_pk_cipher_deinit(struct ncr_pk_ctx* ctx); -int ncr_pk_cipher_encrypt(const struct ncr_pk_ctx* ctx, const void* input, - size_t input_size, void* output, size_t *output_size); -int ncr_pk_cipher_decrypt(const struct ncr_pk_ctx* ctx, const void* input, - size_t input_size, void* output, size_t *output_size); -int ncr_pk_cipher_sign(const struct ncr_pk_ctx* ctx, const void* input, - size_t input_size, void* output, size_t *output_size); +int ncr_pk_cipher_encrypt(const struct ncr_pk_ctx* ctx, + const struct scatterlist* isg, unsigned int isg_cnt, size_t isg_size, + struct scatterlist *osg, unsigned int osg_cnt, size_t* osg_size); + +int ncr_pk_cipher_decrypt(const struct ncr_pk_ctx* ctx, + const struct scatterlist* isg, unsigned int isg_cnt, size_t isg_size, + struct scatterlist *osg, unsigned int osg_cnt, size_t* osg_size); + +int ncr_pk_cipher_sign(const struct ncr_pk_ctx* ctx, + const struct scatterlist* isg, unsigned int isg_cnt, size_t isg_size, + struct scatterlist *osg, unsigned int osg_cnt, size_t* osg_size); + int ncr_pk_cipher_verify(const struct ncr_pk_ctx* ctx, - const void* signature, size_t signature_size, - const void* hash, size_t hash_size, ncr_error_t*); + const struct scatterlist* sign_sg, unsigned int sign_sg_cnt, size_t sign_sg_size, + const void* hash, size_t hash_size, ncr_error_t* err); #endif |