Chromium Code Reviews| 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 |
| */ |