summaryrefslogtreecommitdiff
path: root/crypto/include
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2016-12-16 17:00:43 -0500
committerRichard Levitte <levitte@openssl.org>2017-01-24 15:40:37 +0100
commit52ad5b60e3a1fef12a1a5ea01527a90b8f92a34b (patch)
tree74ef6b469ac271f35b5573738ca00edf38cff89e /crypto/include
parent07afdf3c3ac97af4f2b4eec22a97f7230f8227e0 (diff)
downloadopenssl-new-52ad5b60e3a1fef12a1a5ea01527a90b8f92a34b.tar.gz
Add support for Poly1305 in EVP_PKEY
Add Poly1305 as a "signed" digest. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2128)
Diffstat (limited to 'crypto/include')
-rw-r--r--crypto/include/internal/asn1_int.h2
-rw-r--r--crypto/include/internal/evp_int.h1
-rw-r--r--crypto/include/internal/poly1305.h4
3 files changed, 6 insertions, 1 deletions
diff --git a/crypto/include/internal/asn1_int.h b/crypto/include/internal/asn1_int.h
index a5fdc0eb1d..554f067740 100644
--- a/crypto/include/internal/asn1_int.h
+++ b/crypto/include/internal/asn1_int.h
@@ -62,6 +62,8 @@ extern const EVP_PKEY_ASN1_METHOD dhx_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[5];
extern const EVP_PKEY_ASN1_METHOD eckey_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD ecx25519_asn1_meth;
+extern const EVP_PKEY_ASN1_METHOD poly1305_asn1_meth;
+
extern const EVP_PKEY_ASN1_METHOD hmac_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[2];
extern const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth;
diff --git a/crypto/include/internal/evp_int.h b/crypto/include/internal/evp_int.h
index 121523b64c..bb8a278ba7 100644
--- a/crypto/include/internal/evp_int.h
+++ b/crypto/include/internal/evp_int.h
@@ -87,6 +87,7 @@ extern const EVP_PKEY_METHOD rsa_pkey_meth;
extern const EVP_PKEY_METHOD rsa_pss_pkey_meth;
extern const EVP_PKEY_METHOD tls1_prf_pkey_meth;
extern const EVP_PKEY_METHOD hkdf_pkey_meth;
+extern const EVP_PKEY_METHOD poly1305_pkey_meth;
struct evp_md_st {
int type;
diff --git a/crypto/include/internal/poly1305.h b/crypto/include/internal/poly1305.h
index 1bc8716fca..5fef239d0f 100644
--- a/crypto/include/internal/poly1305.h
+++ b/crypto/include/internal/poly1305.h
@@ -9,7 +9,9 @@
#include <stddef.h>
-#define POLY1305_BLOCK_SIZE 16
+#define POLY1305_BLOCK_SIZE 16
+#define POLY1305_DIGEST_SIZE 16
+#define POLY1305_KEY_SIZE 32
typedef struct poly1305_context POLY1305;