Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1379)

Unified Diff: openssl/crypto/evp/evp_locl.h

Issue 59083010: third_party/openssl: add ChaCha20+Poly1305 support. Base URL: https://chromium.googlesource.com/chromium/deps/openssl.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « openssl/crypto/evp/evp_err.c ('k') | openssl/crypto/poly1305/Makefile » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: openssl/crypto/evp/evp_locl.h
diff --git a/openssl/crypto/evp/evp_locl.h b/openssl/crypto/evp/evp_locl.h
index 08c0a66d39c79c60107f0315d463841aeb59d1cc..c0f9fdf50b72089d6cb40b0d4acde26ab6d4eaf1 100644
--- a/openssl/crypto/evp/evp_locl.h
+++ b/openssl/crypto/evp/evp_locl.h
@@ -348,6 +348,30 @@ int PKCS5_v2_PBKDF2_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
ASN1_TYPE *param,
const EVP_CIPHER *c, const EVP_MD *md, int en_de);
+/* EVP_AEAD represents a specific AEAD algorithm. */
+struct evp_aead_st {
+ unsigned char key_len;
+ unsigned char nonce_len;
+ unsigned char overhead;
+ unsigned char max_tag_len;
+
+ int (*init) (struct evp_aead_ctx_st*, const unsigned char *key,
+ size_t key_len, size_t tag_len);
+ void (*cleanup) (struct evp_aead_ctx_st*);
+
+ ssize_t (*seal) (const struct evp_aead_ctx_st *ctx,
+ unsigned char *out, 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);
+
+ ssize_t (*open) (const struct evp_aead_ctx_st *ctx,
+ unsigned char *out, 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);
+};
+
#ifdef OPENSSL_FIPS
#ifdef OPENSSL_DOING_MAKEDEPEND
« no previous file with comments | « openssl/crypto/evp/evp_err.c ('k') | openssl/crypto/poly1305/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698