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

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: Return SECFailure instead of NULL on failure 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
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
agl 2013/10/23 14:24:28 ditto about 80 chars.
wtc 2013/10/23 20:04:20 Done.
+ * 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
*/

Powered by Google App Engine
This is Rietveld 408576698