diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-05-19 06:59:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-19 06:59:12 -0400 |
commit | 4c9ca6b723b5ec5aab7eec720ad4d22598abe941 (patch) | |
tree | 58ddee7860612888b43175d9d33cbdc936d044aa /sha256_armv4.h | |
parent | 8c99b1cd7592818072bc0882e9498e7c29402c5c (diff) | |
download | cryptopp-git-4c9ca6b723b5ec5aab7eec720ad4d22598abe941.tar.gz |
Add ARM SHA256 asm implementation from Cryptogams (GH #840, PR #840)
Cryptogams is Andy Polyakov's project used to create high speed crypto algorithms and share them with other developers. Cryptogams has a dual license. First is the OpenSSL license because Andy contributes to OpenSSL. Second is a BSD license for those who want a more permissive license.
Andy's implementation runs about 45% faster than C/C++ code. Testing on a 1 GHz Cortex-A7 shows Cryptograms at 17 cpb, and C++ at 30 cpb.
The integration instructions are documented at [Cryptogams SHA](https://wiki.openssl.org/index.php/Cryptogams_SHA) on the OpenSSL wiki.
Diffstat (limited to 'sha256_armv4.h')
-rw-r--r-- | sha256_armv4.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sha256_armv4.h b/sha256_armv4.h new file mode 100644 index 00000000..615333e7 --- /dev/null +++ b/sha256_armv4.h @@ -0,0 +1,21 @@ +/* Header file for use with Cryptogam's ARMv4 SHA1. */
+/* Also see http://www.openssl.org/~appro/cryptogams/ */
+/* https://wiki.openssl.org/index.php/Cryptogams_SHA. */
+
+#ifndef CRYPTOGAMS_SHA256_ARMV4_H
+#define CRYPTOGAMS_SHA256_ARMV4_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void sha256_block_data_order(void *state, const void *data, size_t blocks);
+
+/* Cryptogams arm caps */
+#define ARMV7_NEON (1<<0)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CRYPTOGAMS_SHA256_ARMV4_H */
|