From cce638a8adf4e045ca5505afea4bda57753c31dd Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Mon, 11 Aug 2014 16:33:29 -0400 Subject: initial import of debian package --- .../include_sodium/crypto_scalarmult_curve25519.h | 44 ++++++++++++++++++ buildutils/include_sodium/crypto_stream_salsa20.h | 54 ++++++++++++++++++++++ buildutils/include_sodium/version.h | 29 ++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 buildutils/include_sodium/crypto_scalarmult_curve25519.h create mode 100644 buildutils/include_sodium/crypto_stream_salsa20.h create mode 100644 buildutils/include_sodium/version.h (limited to 'buildutils/include_sodium') diff --git a/buildutils/include_sodium/crypto_scalarmult_curve25519.h b/buildutils/include_sodium/crypto_scalarmult_curve25519.h new file mode 100644 index 0000000..a4b4dd1 --- /dev/null +++ b/buildutils/include_sodium/crypto_scalarmult_curve25519.h @@ -0,0 +1,44 @@ +#ifndef crypto_scalarmult_curve25519_H +#define crypto_scalarmult_curve25519_H + +#if 0 +# ifndef SODIUM_HAVE_TI_MODE +# define SODIUM_HAVE_TI_MODE +# endif +#endif + +#include + +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_scalarmult_curve25519_BYTES 32 +SODIUM_EXPORT +size_t crypto_scalarmult_curve25519_bytes(void); + +#define crypto_scalarmult_curve25519_SCALARBYTES 32 +SODIUM_EXPORT +size_t crypto_scalarmult_curve25519_scalarbytes(void); + +SODIUM_EXPORT +int crypto_scalarmult_curve25519(unsigned char *,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT +int crypto_scalarmult_curve25519_base(unsigned char *,const unsigned char *); + +#ifdef SODIUM_HAVE_TI_MODE +# define crypto_scalarmult_curve25519_donna_c64 crypto_scalarmult_curve25519 +# define crypto_scalarmult_curve25519_donna_c64_base crypto_scalarmult_curve25519_base +#else +# define crypto_scalarmult_curve25519_ref crypto_scalarmult_curve25519 +# define crypto_scalarmult_curve25519_ref_base crypto_scalarmult_curve25519_base +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/buildutils/include_sodium/crypto_stream_salsa20.h b/buildutils/include_sodium/crypto_stream_salsa20.h new file mode 100644 index 0000000..8ce595e --- /dev/null +++ b/buildutils/include_sodium/crypto_stream_salsa20.h @@ -0,0 +1,54 @@ +#ifndef crypto_stream_salsa20_H +#define crypto_stream_salsa20_H + +/* + * WARNING: This is just a stream cipher. It is NOT authenticated encryption. + * While it provides some protection against eavesdropping, it does NOT + * provide any security against active attacks. + * Unless you know what you're doing, what you are looking for is probably + * the crypto_box functions. + */ + +#if 0 +# ifndef SODIUM_HAVE_AMD64_ASM +# define SODIUM_HAVE_AMD64_ASM +# endif +#endif + +#include +#include "export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define crypto_stream_salsa20_KEYBYTES 32U +SODIUM_EXPORT +size_t crypto_stream_salsa20_keybytes(void); + +#define crypto_stream_salsa20_NONCEBYTES 8U +SODIUM_EXPORT +size_t crypto_stream_salsa20_noncebytes(void); + +SODIUM_EXPORT +const char * crypto_stream_salsa20_primitive(void); + +SODIUM_EXPORT +int crypto_stream_salsa20(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT +int crypto_stream_salsa20_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +#ifdef SODIUM_HAVE_AMD64_ASM +# define crypto_stream_salsa20_amd64_xmm6 crypto_stream_salsa20 +# define crypto_stream_salsa20_amd64_xmm6_xor crypto_stream_salsa20_xor +#else +# define crypto_stream_salsa20_ref crypto_stream_salsa20 +# define crypto_stream_salsa20_ref_xor crypto_stream_salsa20_xor +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/buildutils/include_sodium/version.h b/buildutils/include_sodium/version.h new file mode 100644 index 0000000..56b03e2 --- /dev/null +++ b/buildutils/include_sodium/version.h @@ -0,0 +1,29 @@ + +#ifndef __SODIUM_VERSION_H__ +#define __SODIUM_VERSION_H__ + +#include "export.h" + +#define SODIUM_VERSION_STRING "0.4.5" + +#define SODIUM_LIBRARY_VERSION_MAJOR 4 +#define SODIUM_LIBRARY_VERSION_MINOR 4 + +#ifdef __cplusplus +extern "C" { +#endif + +SODIUM_EXPORT +const char *sodium_version_string(void); + +SODIUM_EXPORT +int sodium_library_version_major(void); + +SODIUM_EXPORT +int sodium_library_version_minor(void); + +#ifdef __cplusplus +} +#endif + +#endif -- cgit v1.2.3