diff options
author | Tadeusz Struk <tadeusz.struk@intel.com> | 2015-10-08 12:26:50 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-10-14 10:23:00 -0400 |
commit | 2d4d1eea540b27c72488fd1914674c42473d53df (patch) | |
tree | 104068ce8d5e084fcb2ed7eb0fd626c15b4311f0 /include/linux/mpi.h | |
parent | 9ad92bdff7062d9925754607f5a92b4f651fc7d3 (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.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mpi.h b/include/linux/mpi.h index 641b7d6fd096..8b8269fa8907 100644 --- a/include/linux/mpi.h +++ b/include/linux/mpi.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #define G10_MPI_H | 31 | #define G10_MPI_H |
32 | 32 | ||
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/scatterlist.h> | ||
34 | 35 | ||
35 | /* DSI defines */ | 36 | /* DSI defines */ |
36 | 37 | ||
@@ -78,6 +79,7 @@ void mpi_swap(MPI a, MPI b); | |||
78 | MPI do_encode_md(const void *sha_buffer, unsigned nbits); | 79 | MPI do_encode_md(const void *sha_buffer, unsigned nbits); |
79 | MPI mpi_read_raw_data(const void *xbuffer, size_t nbytes); | 80 | MPI mpi_read_raw_data(const void *xbuffer, size_t nbytes); |
80 | MPI mpi_read_from_buffer(const void *buffer, unsigned *ret_nread); | 81 | MPI mpi_read_from_buffer(const void *buffer, unsigned *ret_nread); |
82 | MPI mpi_read_raw_from_sgl(struct scatterlist *sgl, unsigned int len); | ||
81 | int mpi_fromstr(MPI val, const char *str); | 83 | int mpi_fromstr(MPI val, const char *str); |
82 | u32 mpi_get_keyid(MPI a, u32 *keyid); | 84 | u32 mpi_get_keyid(MPI a, u32 *keyid); |
83 | void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign); | 85 | 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, | |||
85 | int *sign); | 87 | int *sign); |
86 | void *mpi_get_secure_buffer(MPI a, unsigned *nbytes, int *sign); | 88 | void *mpi_get_secure_buffer(MPI a, unsigned *nbytes, int *sign); |
87 | int mpi_set_buffer(MPI a, const void *buffer, unsigned nbytes, int sign); | 89 | int mpi_set_buffer(MPI a, const void *buffer, unsigned nbytes, int sign); |
90 | int mpi_write_to_sgl(MPI a, struct scatterlist *sg, unsigned *nbytes, | ||
91 | int *sign); | ||
88 | 92 | ||
89 | #define log_mpidump g10_log_mpidump | 93 | #define log_mpidump g10_log_mpidump |
90 | 94 | ||