aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mpi.h
diff options
context:
space:
mode:
authorTadeusz Struk <tadeusz.struk@intel.com>2015-10-08 09:26:50 -0700
committerMister Oyster <oysterized@gmail.com>2017-04-11 10:59:43 +0200
commit26f3896952973d4140d723a0e779f0f8ccef1caa (patch)
tree451415648705c6994b76245fa9bb0b1925d96c58 /include/linux/mpi.h
parent664d989619aaecf50c556f9ae612a5065cba42a3 (diff)
lib/mpi: Add mpi sgl helpers
Add mpi_read_raw_from_sgl and mpi_write_to_sgl helpers. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/mpi.h')
-rw-r--r--include/linux/mpi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mpi.h b/include/linux/mpi.h
index 641b7d6fd..8b8269fa8 100644
--- a/include/linux/mpi.h
+++ b/include/linux/mpi.h
@@ -31,6 +31,7 @@
#define G10_MPI_H
#include <linux/types.h>
+#include <linux/scatterlist.h>
/* DSI defines */
@@ -78,6 +79,7 @@ void mpi_swap(MPI a, MPI b);
MPI do_encode_md(const void *sha_buffer, unsigned nbits);
MPI mpi_read_raw_data(const void *xbuffer, size_t nbytes);
MPI mpi_read_from_buffer(const void *buffer, unsigned *ret_nread);
+MPI mpi_read_raw_from_sgl(struct scatterlist *sgl, unsigned int len);
int mpi_fromstr(MPI val, const char *str);
u32 mpi_get_keyid(MPI a, u32 *keyid);
void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign);
@@ -85,6 +87,8 @@ int mpi_read_buffer(MPI a, uint8_t *buf, unsigned buf_len, unsigned *nbytes,
int *sign);
void *mpi_get_secure_buffer(MPI a, unsigned *nbytes, int *sign);
int mpi_set_buffer(MPI a, const void *buffer, unsigned nbytes, int sign);
+int mpi_write_to_sgl(MPI a, struct scatterlist *sg, unsigned *nbytes,
+ int *sign);
#define log_mpidump g10_log_mpidump