diff options
Diffstat (limited to 'src/crypto/shen_ed25519_ref/include/sodium')
8 files changed, 128 insertions, 0 deletions
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 |