summaryrefslogtreecommitdiff
path: root/ecp/src/crypto/crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'ecp/src/crypto/crypto.h')
-rw-r--r--ecp/src/crypto/crypto.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/ecp/src/crypto/crypto.h b/ecp/src/crypto/crypto.h
index 86b072c..378500c 100644
--- a/ecp/src/crypto/crypto.h
+++ b/ecp/src/crypto/crypto.h
@@ -9,6 +9,7 @@
#define ECP_AEAD_SIZE_NONCE 8
#define ECP_DSA_SIZE_KEY 32
+#define ECP_DSA_SIZE_SIGNATURE 32
typedef uint8_t ecp_dh_public_t[ECP_ECDH_SIZE_KEY];
typedef uint8_t ecp_dh_private_t[ECP_ECDH_SIZE_KEY];
@@ -17,15 +18,29 @@ typedef uint8_t ecp_dsa_public_t[ECP_DSA_SIZE_KEY];
typedef uint8_t ecp_dsa_private_t[ECP_DSA_SIZE_KEY];
int
-aead_chacha20_poly1305_seal(unsigned char *out, size_t *out_len,
- size_t max_out_len, unsigned char key[32], unsigned char tag_len,
+aead_chacha20_poly1305_seal(unsigned char key[32], unsigned char tag_len,
+ unsigned char *out, size_t *out_len, size_t max_out_len,
const unsigned char *nonce, size_t nonce_len,
const unsigned char *in, size_t in_len,
const unsigned char *ad, size_t ad_len);
int
-aead_chacha20_poly1305_open(unsigned char *out, size_t *out_len,
- size_t max_out_len, unsigned char key[32], unsigned char tag_len,
+aead_chacha20_poly1305_open(unsigned char key[32], unsigned char tag_len,
+ unsigned char *out, size_t *out_len, size_t max_out_len,
+ const unsigned char *nonce, size_t nonce_len,
+ const unsigned char *in, size_t in_len,
+ const unsigned char *ad, size_t ad_len);
+
+int
+aead_xchacha20_poly1305_seal(unsigned char key[32], unsigned char tag_len,
+ unsigned char *out, size_t *out_len, size_t max_out_len,
+ const unsigned char *nonce, size_t nonce_len,
+ const unsigned char *in, size_t in_len,
+ const unsigned char *ad, size_t ad_len);
+
+int
+aead_xchacha20_poly1305_open(unsigned char key[32], unsigned char tag_len,
+ unsigned char *out, size_t *out_len, size_t max_out_len,
const unsigned char *nonce, size_t nonce_len,
const unsigned char *in, size_t in_len,
const unsigned char *ad, size_t ad_len);