From 8b3ac469f140b68274a68bf28077081aefed6637 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 20 Jan 2013 00:32:51 -0800 Subject: [PATCH] Install headers with high-level macros --- src/libnacl-ref/Makefile.am | 1 + src/libnacl-ref/include/Makefile.am | 6 ++++++ src/libnacl-ref/include/nacl/crypto_auth.h | 14 ++++++++++++++ src/libnacl-ref/include/nacl/crypto_hash.h | 12 ++++++++++++ .../include/nacl/crypto_onetimeauth.h | 14 ++++++++++++++ .../include/nacl/crypto_secretbox.h | 16 ++++++++++++++++ src/libnacl-ref/include/nacl/crypto_sign.h | 16 ++++++++++++++++ src/libnacl-ref/include/nacl/crypto_stream.h | 18 ++++++++++++++++++ 8 files changed, 97 insertions(+) create mode 100644 src/libnacl-ref/include/nacl/crypto_auth.h create mode 100644 src/libnacl-ref/include/nacl/crypto_hash.h create mode 100644 src/libnacl-ref/include/nacl/crypto_onetimeauth.h create mode 100644 src/libnacl-ref/include/nacl/crypto_secretbox.h create mode 100644 src/libnacl-ref/include/nacl/crypto_sign.h create mode 100644 src/libnacl-ref/include/nacl/crypto_stream.h diff --git a/src/libnacl-ref/Makefile.am b/src/libnacl-ref/Makefile.am index dc2b5849..43e12a45 100644 --- a/src/libnacl-ref/Makefile.am +++ b/src/libnacl-ref/Makefile.am @@ -74,6 +74,7 @@ libnacl_la_LDFLAGS = \ libnacl_la_CPPFLAGS = \ $(LTDLINCL) \ + -I. \ -Iinclude/nacl SUBDIRS = \ diff --git a/src/libnacl-ref/include/Makefile.am b/src/libnacl-ref/include/Makefile.am index 251e89d2..6e07ee0f 100644 --- a/src/libnacl-ref/include/Makefile.am +++ b/src/libnacl-ref/include/Makefile.am @@ -1,5 +1,6 @@ NACL_EXPORT = \ + nacl/crypto_auth.h \ nacl/crypto_auth_hmacsha256.h \ nacl/crypto_auth_hmacsha512256.h \ nacl/crypto_box.h \ @@ -8,15 +9,20 @@ NACL_EXPORT = \ nacl/crypto_core_salsa20.h \ nacl/crypto_core_salsa2012.h \ nacl/crypto_core_salsa208.h \ + nacl/crypto_hash.h \ nacl/crypto_hash_sha256.h \ nacl/crypto_hash_sha512.h \ nacl/crypto_hashblocks_sha256.h \ nacl/crypto_hashblocks_sha512.h \ + nacl/crypto_onetimeauth.h \ nacl/crypto_onetimeauth_poly1305.h \ nacl/crypto_scalarmult_curve25519.h \ + nacl/crypto_secretbox.h \ nacl/crypto_secretbox_xsalsa20poly1305.h \ + nacl/crypto_sign.h \ nacl/crypto_sign_ed25519.h \ nacl/crypto_sign_edwards25519sha512batch.h \ + nacl/crypto_stream.h \ nacl/crypto_stream_aes128ctr.h \ nacl/crypto_stream_salsa20.h \ nacl/crypto_stream_salsa2012.h \ diff --git a/src/libnacl-ref/include/nacl/crypto_auth.h b/src/libnacl-ref/include/nacl/crypto_auth.h new file mode 100644 index 00000000..32775575 --- /dev/null +++ b/src/libnacl-ref/include/nacl/crypto_auth.h @@ -0,0 +1,14 @@ +#ifndef crypto_auth_H +#define crypto_auth_H + +#include "crypto_auth_hmacsha512256.h" + +#define crypto_auth crypto_auth_hmacsha512256 +#define crypto_auth_verify crypto_auth_hmacsha512256_verify +#define crypto_auth_BYTES crypto_auth_hmacsha512256_BYTES +#define crypto_auth_KEYBYTES crypto_auth_hmacsha512256_KEYBYTES +#define crypto_auth_PRIMITIVE "hmacsha512256" +#define crypto_auth_IMPLEMENTATION crypto_auth_hmacsha512256_IMPLEMENTATION +#define crypto_auth_VERSION crypto_auth_hmacsha512256_VERSION + +#endif diff --git a/src/libnacl-ref/include/nacl/crypto_hash.h b/src/libnacl-ref/include/nacl/crypto_hash.h new file mode 100644 index 00000000..c24f367e --- /dev/null +++ b/src/libnacl-ref/include/nacl/crypto_hash.h @@ -0,0 +1,12 @@ +#ifndef crypto_hash_H +#define crypto_hash_H + +#include "crypto_hash_sha512.h" + +#define crypto_hash crypto_hash_sha512 +#define crypto_hash_BYTES crypto_hash_sha512_BYTES +#define crypto_hash_PRIMITIVE "sha512" +#define crypto_hash_IMPLEMENTATION crypto_hash_sha512_IMPLEMENTATION +#define crypto_hash_VERSION crypto_hash_sha512_VERSION + +#endif diff --git a/src/libnacl-ref/include/nacl/crypto_onetimeauth.h b/src/libnacl-ref/include/nacl/crypto_onetimeauth.h new file mode 100644 index 00000000..450e122d --- /dev/null +++ b/src/libnacl-ref/include/nacl/crypto_onetimeauth.h @@ -0,0 +1,14 @@ +#ifndef crypto_onetimeauth_H +#define crypto_onetimeauth_H + +#include "crypto_onetimeauth_poly1305.h" + +#define crypto_onetimeauth crypto_onetimeauth_poly1305 +#define crypto_onetimeauth_verify crypto_onetimeauth_poly1305_verify +#define crypto_onetimeauth_BYTES crypto_onetimeauth_poly1305_BYTES +#define crypto_onetimeauth_KEYBYTES crypto_onetimeauth_poly1305_KEYBYTES +#define crypto_onetimeauth_PRIMITIVE "poly1305" +#define crypto_onetimeauth_IMPLEMENTATION crypto_onetimeauth_poly1305_IMPLEMENTATION +#define crypto_onetimeauth_VERSION crypto_onetimeauth_poly1305_VERSION + +#endif diff --git a/src/libnacl-ref/include/nacl/crypto_secretbox.h b/src/libnacl-ref/include/nacl/crypto_secretbox.h new file mode 100644 index 00000000..7409dd04 --- /dev/null +++ b/src/libnacl-ref/include/nacl/crypto_secretbox.h @@ -0,0 +1,16 @@ +#ifndef crypto_secretbox_H +#define crypto_secretbox_H + +#include "crypto_secretbox_xsalsa20poly1305.h" + +#define crypto_secretbox crypto_secretbox_xsalsa20poly1305 +#define crypto_secretbox_open crypto_secretbox_xsalsa20poly1305_open +#define crypto_secretbox_KEYBYTES crypto_secretbox_xsalsa20poly1305_KEYBYTES +#define crypto_secretbox_NONCEBYTES crypto_secretbox_xsalsa20poly1305_NONCEBYTES +#define crypto_secretbox_ZEROBYTES crypto_secretbox_xsalsa20poly1305_ZEROBYTES +#define crypto_secretbox_BOXZEROBYTES crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES +#define crypto_secretbox_PRIMITIVE "xsalsa20poly1305" +#define crypto_secretbox_IMPLEMENTATION crypto_secretbox_xsalsa20poly1305_IMPLEMENTATION +#define crypto_secretbox_VERSION crypto_secretbox_xsalsa20poly1305_VERSION + +#endif diff --git a/src/libnacl-ref/include/nacl/crypto_sign.h b/src/libnacl-ref/include/nacl/crypto_sign.h new file mode 100644 index 00000000..8472603e --- /dev/null +++ b/src/libnacl-ref/include/nacl/crypto_sign.h @@ -0,0 +1,16 @@ +#ifndef crypto_sign_H +#define crypto_sign_H + +#include "crypto_sign_edwards25519sha512batch.h" + +#define crypto_sign crypto_sign_edwards25519sha512batch +#define crypto_sign_open crypto_sign_edwards25519sha512batch_open +#define crypto_sign_keypair crypto_sign_edwards25519sha512batch_keypair +#define crypto_sign_BYTES crypto_sign_edwards25519sha512batch_BYTES +#define crypto_sign_PUBLICKEYBYTES crypto_sign_edwards25519sha512batch_PUBLICKEYBYTES +#define crypto_sign_SECRETKEYBYTES crypto_sign_edwards25519sha512batch_SECRETKEYBYTES +#define crypto_sign_PRIMITIVE "edwards25519sha512batch" +#define crypto_sign_IMPLEMENTATION crypto_sign_edwards25519sha512batch_IMPLEMENTATION +#define crypto_sign_VERSION crypto_sign_edwards25519sha512batch_VERSION + +#endif diff --git a/src/libnacl-ref/include/nacl/crypto_stream.h b/src/libnacl-ref/include/nacl/crypto_stream.h new file mode 100644 index 00000000..02d2409c --- /dev/null +++ b/src/libnacl-ref/include/nacl/crypto_stream.h @@ -0,0 +1,18 @@ +#ifndef crypto_stream_H +#define crypto_stream_H + +#include "crypto_stream_xsalsa20.h" + +#define crypto_stream crypto_stream_xsalsa20 +#define crypto_stream_xor crypto_stream_xsalsa20_xor +#define crypto_stream_beforenm crypto_stream_xsalsa20_beforenm +#define crypto_stream_afternm crypto_stream_xsalsa20_afternm +#define crypto_stream_xor_afternm crypto_stream_xsalsa20_xor_afternm +#define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES +#define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES +#define crypto_stream_BEFORENMBYTES crypto_stream_xsalsa20_BEFORENMBYTES +#define crypto_stream_PRIMITIVE "xsalsa20" +#define crypto_stream_IMPLEMENTATION crypto_stream_xsalsa20_IMPLEMENTATION +#define crypto_stream_VERSION crypto_stream_xsalsa20_VERSION + +#endif