summaryrefslogtreecommitdiffstats
path: root/module/icp
diff options
context:
space:
mode:
authorArvind Sankar <[email protected]>2020-06-11 16:38:25 -0400
committerBrian Behlendorf <[email protected]>2020-06-18 12:21:32 -0700
commit0ce2de637bf73e2c7e483e644aa09797439734ef (patch)
treec4d45fff310b523f8fe44d8a7887348aafc5d27a /module/icp
parent60356b1a211a0fcfe7dbd2e1dd280d6fc0170cf0 (diff)
Add prototypes
Add prototypes/move prototypes to header files. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Arvind Sankar <[email protected]> Closes #10470
Diffstat (limited to 'module/icp')
-rw-r--r--module/icp/algs/aes/aes_impl_x86-64.c12
-rw-r--r--module/icp/algs/skein/skein.c8
-rw-r--r--module/icp/algs/skein/skein_impl.h8
-rw-r--r--module/icp/include/aes/aes_impl.h10
4 files changed, 18 insertions, 20 deletions
diff --git a/module/icp/algs/aes/aes_impl_x86-64.c b/module/icp/algs/aes/aes_impl_x86-64.c
index 0ee7ee99c..19f8fd501 100644
--- a/module/icp/algs/aes/aes_impl_x86-64.c
+++ b/module/icp/algs/aes/aes_impl_x86-64.c
@@ -25,18 +25,6 @@
#if defined(__x86_64)
#include <sys/simd.h>
-
-/* These functions are used to execute amd64 instructions for AMD or Intel: */
-extern int rijndael_key_setup_enc_amd64(uint32_t rk[],
- const uint32_t cipherKey[], int keyBits);
-extern int rijndael_key_setup_dec_amd64(uint32_t rk[],
- const uint32_t cipherKey[], int keyBits);
-extern void aes_encrypt_amd64(const uint32_t rk[], int Nr,
- const uint32_t pt[4], uint32_t ct[4]);
-extern void aes_decrypt_amd64(const uint32_t rk[], int Nr,
- const uint32_t ct[4], uint32_t pt[4]);
-
-
#include <aes/aes_impl.h>
/*
diff --git a/module/icp/algs/skein/skein.c b/module/icp/algs/skein/skein.c
index 0187f7be6..39a0bff35 100644
--- a/module/icp/algs/skein/skein.c
+++ b/module/icp/algs/skein/skein.c
@@ -12,14 +12,6 @@
#include <sys/skein.h> /* get the Skein API definitions */
#include "skein_impl.h" /* get internal definitions */
-/* External function to process blkCnt (nonzero) full block(s) of data. */
-void Skein_256_Process_Block(Skein_256_Ctxt_t *ctx, const uint8_t *blkPtr,
- size_t blkCnt, size_t byteCntAdd);
-void Skein_512_Process_Block(Skein_512_Ctxt_t *ctx, const uint8_t *blkPtr,
- size_t blkCnt, size_t byteCntAdd);
-void Skein1024_Process_Block(Skein1024_Ctxt_t *ctx, const uint8_t *blkPtr,
- size_t blkCnt, size_t byteCntAdd);
-
/* 256-bit Skein */
/* init the context for a straight hashing operation */
int
diff --git a/module/icp/algs/skein/skein_impl.h b/module/icp/algs/skein/skein_impl.h
index ea834e619..205a517d6 100644
--- a/module/icp/algs/skein/skein_impl.h
+++ b/module/icp/algs/skein/skein_impl.h
@@ -281,4 +281,12 @@ extern const uint64_t SKEIN1024_IV_384[];
extern const uint64_t SKEIN1024_IV_512[];
extern const uint64_t SKEIN1024_IV_1024[];
+/* Functions to process blkCnt (nonzero) full block(s) of data. */
+void Skein_256_Process_Block(Skein_256_Ctxt_t *ctx, const uint8_t *blkPtr,
+ size_t blkCnt, size_t byteCntAdd);
+void Skein_512_Process_Block(Skein_512_Ctxt_t *ctx, const uint8_t *blkPtr,
+ size_t blkCnt, size_t byteCntAdd);
+void Skein1024_Process_Block(Skein1024_Ctxt_t *ctx, const uint8_t *blkPtr,
+ size_t blkCnt, size_t byteCntAdd);
+
#endif /* _SKEIN_IMPL_H_ */
diff --git a/module/icp/include/aes/aes_impl.h b/module/icp/include/aes/aes_impl.h
index 0484462ca..41dccaa38 100644
--- a/module/icp/include/aes/aes_impl.h
+++ b/module/icp/include/aes/aes_impl.h
@@ -195,6 +195,16 @@ struct aes_impl_ops {
extern const aes_impl_ops_t aes_generic_impl;
#if defined(__x86_64)
extern const aes_impl_ops_t aes_x86_64_impl;
+
+/* These functions are used to execute amd64 instructions for AMD or Intel: */
+extern int rijndael_key_setup_enc_amd64(uint32_t rk[],
+ const uint32_t cipherKey[], int keyBits);
+extern int rijndael_key_setup_dec_amd64(uint32_t rk[],
+ const uint32_t cipherKey[], int keyBits);
+extern void aes_encrypt_amd64(const uint32_t rk[], int Nr,
+ const uint32_t pt[4], uint32_t ct[4]);
+extern void aes_decrypt_amd64(const uint32_t rk[], int Nr,
+ const uint32_t ct[4], uint32_t pt[4]);
#endif
#if defined(__x86_64) && defined(HAVE_AES)
extern const aes_impl_ops_t aes_aesni_impl;