aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/shen_ed25519_ref/include
diff options
context:
space:
mode:
authorShenNoether <Shen.Noether@gmx.com>2015-08-23 14:48:50 -0600
committerShenNoether <Shen.Noether@gmx.com>2015-08-23 14:48:50 -0600
commit0a4bc84b2f681dfd89b501648f65a951d876e2d8 (patch)
tree9f37622b56f26724b4c057dd28f4c9a0ee7ecd74 /src/crypto/shen_ed25519_ref/include
parentrevert to 776b4fc91a821be152f0f23e6873aabb78a72029 (diff)
downloadmonero-0a4bc84b2f681dfd89b501648f65a951d876e2d8.tar.xz
Added ref10 shen_ed25519_ref code, which includes code that can replace crypto-ops with a version straight from Bernstein's ref 10
Diffstat (limited to 'src/crypto/shen_ed25519_ref/include')
-rw-r--r--src/crypto/shen_ed25519_ref/include/Makefile.am62
-rw-r--r--src/crypto/shen_ed25519_ref/include/libsodium_LICENSE16
-rw-r--r--src/crypto/shen_ed25519_ref/include/sodium.h50
-rw-r--r--src/crypto/shen_ed25519_ref/include/sodium/crypto_int32.h8
-rw-r--r--src/crypto/shen_ed25519_ref/include/sodium/crypto_int64.h8
-rw-r--r--src/crypto/shen_ed25519_ref/include/sodium/crypto_uint16.h8
-rw-r--r--src/crypto/shen_ed25519_ref/include/sodium/crypto_uint32.h8
-rw-r--r--src/crypto/shen_ed25519_ref/include/sodium/crypto_uint64.h8
-rw-r--r--src/crypto/shen_ed25519_ref/include/sodium/crypto_uint8.h8
-rw-r--r--src/crypto/shen_ed25519_ref/include/sodium/crypto_verify_32.h22
-rw-r--r--src/crypto/shen_ed25519_ref/include/sodium/randombytes.h58
11 files changed, 256 insertions, 0 deletions
diff --git a/src/crypto/shen_ed25519_ref/include/Makefile.am b/src/crypto/shen_ed25519_ref/include/Makefile.am
new file mode 100644
index 000000000..894c371a3
--- /dev/null
+++ b/src/crypto/shen_ed25519_ref/include/Makefile.am
@@ -0,0 +1,62 @@
+
+SODIUM_EXPORT = \
+ sodium.h \
+ sodium/core.h \
+ sodium/crypto_aead_chacha20poly1305.h \
+ sodium/crypto_auth.h \
+ sodium/crypto_auth_hmacsha256.h \
+ sodium/crypto_auth_hmacsha512.h \
+ sodium/crypto_auth_hmacsha512256.h \
+ sodium/crypto_box.h \
+ sodium/crypto_box_curve25519xsalsa20poly1305.h \
+ sodium/crypto_core_hsalsa20.h \
+ sodium/crypto_core_salsa20.h \
+ sodium/crypto_core_salsa2012.h \
+ sodium/crypto_core_salsa208.h \
+ sodium/crypto_generichash.h \
+ sodium/crypto_generichash_blake2b.h \
+ sodium/crypto_hash.h \
+ sodium/crypto_hash_sha256.h \
+ sodium/crypto_hash_sha512.h \
+ sodium/crypto_onetimeauth.h \
+ sodium/crypto_onetimeauth_poly1305.h \
+ sodium/crypto_pwhash_scryptsalsa208sha256.h \
+ sodium/crypto_scalarmult.h \
+ sodium/crypto_scalarmult_curve25519.h \
+ sodium/crypto_secretbox.h \
+ sodium/crypto_secretbox_xsalsa20poly1305.h \
+ sodium/crypto_shorthash.h \
+ sodium/crypto_shorthash_siphash24.h \
+ sodium/crypto_sign.h \
+ sodium/crypto_sign_ed25519.h \
+ sodium/crypto_sign_edwards25519sha512batch.h \
+ sodium/crypto_stream.h \
+ sodium/crypto_stream_aes128ctr.h \
+ sodium/crypto_stream_chacha20.h \
+ sodium/crypto_stream_salsa20.h \
+ sodium/crypto_stream_salsa2012.h \
+ sodium/crypto_stream_salsa208.h \
+ sodium/crypto_stream_xsalsa20.h \
+ sodium/crypto_int32.h \
+ sodium/crypto_int64.h \
+ sodium/crypto_uint16.h \
+ sodium/crypto_uint32.h \
+ sodium/crypto_uint64.h \
+ sodium/crypto_uint8.h \
+ sodium/crypto_verify_16.h \
+ sodium/crypto_verify_32.h \
+ sodium/crypto_verify_64.h \
+ sodium/export.h \
+ sodium/randombytes.h \
+ sodium/randombytes_salsa20_random.h \
+ sodium/randombytes_sysrandom.h \
+ sodium/runtime.h \
+ sodium/utils.h
+
+EXTRA_SRC = $(SODIUM_EXPORT) \
+ sodium/version.h.in
+
+nobase_include_HEADERS = $(SODIUM_EXPORT)
+
+nobase_nodist_include_HEADERS = \
+ sodium/version.h
diff --git a/src/crypto/shen_ed25519_ref/include/libsodium_LICENSE b/src/crypto/shen_ed25519_ref/include/libsodium_LICENSE
new file mode 100644
index 000000000..3edb000f6
--- /dev/null
+++ b/src/crypto/shen_ed25519_ref/include/libsodium_LICENSE
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2013-2015
+ * Frank Denis <j at pureftpd dot org>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
diff --git a/src/crypto/shen_ed25519_ref/include/sodium.h b/src/crypto/shen_ed25519_ref/include/sodium.h
new file mode 100644
index 000000000..207bdedeb
--- /dev/null
+++ b/src/crypto/shen_ed25519_ref/include/sodium.h
@@ -0,0 +1,50 @@
+
+#ifndef sodium_H
+#define sodium_H
+
+#include "sodium/core.h"
+#include "sodium/crypto_aead_chacha20poly1305.h"
+#include "sodium/crypto_auth.h"
+#include "sodium/crypto_auth_hmacsha256.h"
+#include "sodium/crypto_auth_hmacsha512.h"
+#include "sodium/crypto_auth_hmacsha512256.h"
+#include "sodium/crypto_box.h"
+#include "sodium/crypto_box_curve25519xsalsa20poly1305.h"
+#include "sodium/crypto_core_hsalsa20.h"
+#include "sodium/crypto_core_salsa20.h"
+#include "sodium/crypto_core_salsa2012.h"
+#include "sodium/crypto_core_salsa208.h"
+#include "sodium/crypto_generichash.h"
+#include "sodium/crypto_generichash_blake2b.h"
+#include "sodium/crypto_hash.h"
+#include "sodium/crypto_hash_sha256.h"
+#include "sodium/crypto_hash_sha512.h"
+#include "sodium/crypto_onetimeauth.h"
+#include "sodium/crypto_onetimeauth_poly1305.h"
+#include "sodium/crypto_pwhash_scryptsalsa208sha256.h"
+#include "sodium/crypto_scalarmult.h"
+#include "sodium/crypto_scalarmult_curve25519.h"
+#include "sodium/crypto_secretbox.h"
+#include "sodium/crypto_secretbox_xsalsa20poly1305.h"
+#include "sodium/crypto_shorthash.h"
+#include "sodium/crypto_shorthash_siphash24.h"
+#include "sodium/crypto_sign.h"
+#include "sodium/crypto_sign_ed25519.h"
+#include "sodium/crypto_stream.h"
+#include "sodium/crypto_stream_aes128ctr.h"
+#include "sodium/crypto_stream_chacha20.h"
+#include "sodium/crypto_stream_salsa20.h"
+#include "sodium/crypto_stream_salsa2012.h"
+#include "sodium/crypto_stream_salsa208.h"
+#include "sodium/crypto_stream_xsalsa20.h"
+#include "sodium/crypto_verify_16.h"
+#include "sodium/crypto_verify_32.h"
+#include "sodium/crypto_verify_64.h"
+#include "sodium/randombytes.h"
+#include "sodium/randombytes_salsa20_random.h"
+#include "sodium/randombytes_sysrandom.h"
+#include "sodium/runtime.h"
+#include "sodium/utils.h"
+#include "sodium/version.h"
+
+#endif
diff --git a/src/crypto/shen_ed25519_ref/include/sodium/crypto_int32.h b/src/crypto/shen_ed25519_ref/include/sodium/crypto_int32.h
new file mode 100644
index 000000000..a22019d87
--- /dev/null
+++ b/src/crypto/shen_ed25519_ref/include/sodium/crypto_int32.h
@@ -0,0 +1,8 @@
+#ifndef crypto_int32_H
+#define crypto_int32_H
+
+#include <stdint.h>
+
+typedef int32_t crypto_int32;
+
+#endif
diff --git a/src/crypto/shen_ed25519_ref/include/sodium/crypto_int64.h b/src/crypto/shen_ed25519_ref/include/sodium/crypto_int64.h
new file mode 100644
index 000000000..f68a28361
--- /dev/null
+++ b/src/crypto/shen_ed25519_ref/include/sodium/crypto_int64.h
@@ -0,0 +1,8 @@
+#ifndef crypto_int64_H
+#define crypto_int64_H
+
+#include <stdint.h>
+
+typedef int64_t crypto_int64;
+
+#endif
diff --git a/src/crypto/shen_ed25519_ref/include/sodium/crypto_uint16.h b/src/crypto/shen_ed25519_ref/include/sodium/crypto_uint16.h
new file mode 100644
index 000000000..6be4e347c
--- /dev/null
+++ b/src/crypto/shen_ed25519_ref/include/sodium/crypto_uint16.h
@@ -0,0 +1,8 @@
+#ifndef crypto_uint16_H
+#define crypto_uint16_H
+
+#include <stdint.h>
+
+typedef uint16_t crypto_uint16;
+
+#endif
diff --git a/src/crypto/shen_ed25519_ref/include/sodium/crypto_uint32.h b/src/crypto/shen_ed25519_ref/include/sodium/crypto_uint32.h
new file mode 100644
index 000000000..ba66cecc6
--- /dev/null
+++ b/src/crypto/shen_ed25519_ref/include/sodium/crypto_uint32.h
@@ -0,0 +1,8 @@
+#ifndef crypto_uint32_H
+#define crypto_uint32_H
+
+#include <stdint.h>
+
+typedef uint32_t crypto_uint32;
+
+#endif
diff --git a/src/crypto/shen_ed25519_ref/include/sodium/crypto_uint64.h b/src/crypto/shen_ed25519_ref/include/sodium/crypto_uint64.h
new file mode 100644
index 000000000..98b3f6d34
--- /dev/null
+++ b/src/crypto/shen_ed25519_ref/include/sodium/crypto_uint64.h
@@ -0,0 +1,8 @@
+#ifndef crypto_uint64_H
+#define crypto_uint64_H
+
+#include <stdint.h>
+
+typedef uint64_t crypto_uint64;
+
+#endif
diff --git a/src/crypto/shen_ed25519_ref/include/sodium/crypto_uint8.h b/src/crypto/shen_ed25519_ref/include/sodium/crypto_uint8.h
new file mode 100644
index 000000000..789613ba5
--- /dev/null
+++ b/src/crypto/shen_ed25519_ref/include/sodium/crypto_uint8.h
@@ -0,0 +1,8 @@
+#ifndef crypto_uint8_H
+#define crypto_uint8_H
+
+#include <stdint.h>
+
+typedef uint8_t crypto_uint8;
+
+#endif
diff --git a/src/crypto/shen_ed25519_ref/include/sodium/crypto_verify_32.h b/src/crypto/shen_ed25519_ref/include/sodium/crypto_verify_32.h
new file mode 100644
index 000000000..58e4d0e82
--- /dev/null
+++ b/src/crypto/shen_ed25519_ref/include/sodium/crypto_verify_32.h
@@ -0,0 +1,22 @@
+#ifndef crypto_verify_32_H
+#define crypto_verify_32_H
+
+#include <stddef.h>
+#include "export.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define crypto_verify_32_BYTES 32U
+SODIUM_EXPORT
+size_t crypto_verify_32_bytes(void);
+
+SODIUM_EXPORT
+int crypto_verify_32(const unsigned char *x, const unsigned char *y);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/crypto/shen_ed25519_ref/include/sodium/randombytes.h b/src/crypto/shen_ed25519_ref/include/sodium/randombytes.h
new file mode 100644
index 000000000..08aff0525
--- /dev/null
+++ b/src/crypto/shen_ed25519_ref/include/sodium/randombytes.h
@@ -0,0 +1,58 @@
+
+#ifndef randombytes_H
+#define randombytes_H
+
+#include <sys/types.h>
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include "export.h"
+
+#ifdef __cplusplus
+# if __GNUC__
+# pragma GCC diagnostic ignored "-Wlong-long"
+# endif
+extern "C" {
+#endif
+
+typedef struct randombytes_implementation {
+ const char *(*implementation_name)(void); /* required */
+ uint32_t (*random)(void); /* required */
+ void (*stir)(void); /* optional */
+ uint32_t (*uniform)(const uint32_t upper_bound); /* optional, a default implementation will be used if NULL */
+ void (*buf)(void * const buf, const size_t size); /* required */
+ int (*close)(void); /* optional */
+} randombytes_implementation;
+
+SODIUM_EXPORT
+void randombytes_buf(void * const buf, const size_t size);
+
+SODIUM_EXPORT
+uint32_t randombytes_random(void);
+
+SODIUM_EXPORT
+uint32_t randombytes_uniform(const uint32_t upper_bound);
+
+SODIUM_EXPORT
+void randombytes_stir(void);
+
+SODIUM_EXPORT
+int randombytes_close(void);
+
+SODIUM_EXPORT
+int randombytes_set_implementation(randombytes_implementation *impl);
+
+SODIUM_EXPORT
+const char *randombytes_implementation_name(void);
+
+/* -- NaCl compatibility interface -- */
+
+SODIUM_EXPORT
+void randombytes(unsigned char * const buf, const unsigned long long buf_len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif