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

Unified Diff: nss/lib/softoken/pkcs11i.h

Issue 27510015: Support ChaCha20+Poly1305 cipher suites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Fold long lines Created 7 years, 2 months 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 | « nss/lib/softoken/pkcs11c.c ('k') | nss/lib/util/pkcs11n.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nss/lib/softoken/pkcs11i.h
===================================================================
--- nss/lib/softoken/pkcs11i.h (revision 228205)
+++ nss/lib/softoken/pkcs11i.h (working copy)
@@ -14,6 +14,7 @@
#include "pkcs11t.h"
#include "sftkdbt.h"
+#include "chacha20poly1305.h"
#include "hasht.h"
/*
@@ -104,6 +105,7 @@
typedef struct SFTKOAEPEncryptInfoStr SFTKOAEPEncryptInfo;
typedef struct SFTKOAEPDecryptInfoStr SFTKOAEPDecryptInfo;
typedef struct SFTKSSLMACInfoStr SFTKSSLMACInfo;
+typedef struct SFTKChaCha20Poly1305InfoStr SFTKChaCha20Poly1305Info;
typedef struct SFTKItemTemplateStr SFTKItemTemplate;
/* define function pointer typdefs for pointer tables */
@@ -399,6 +401,16 @@
unsigned int keySize;
};
+/* SFTKChaCha20Poly1305Info saves the key, tag length, nonce, and additional
+ * data for a ChaCha20+Poly1305 AEAD operation. */
+struct SFTKChaCha20Poly1305InfoStr {
+ ChaCha20Poly1305Context freeblCtx;
+ unsigned char nonce[8];
+ unsigned char ad[16];
+ unsigned char *adOverflow;
+ unsigned int adLen;
+};
+
/*
* Template based on SECItems, suitable for passing as arrays
*/
« no previous file with comments | « nss/lib/softoken/pkcs11c.c ('k') | nss/lib/util/pkcs11n.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698