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

Side by Side Diff: nss/lib/freebl/blapi.h

Issue 27510015: Support ChaCha20+Poly1305 cipher suites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: After first review 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « nss.gyp ('k') | nss/lib/freebl/chacha20/chacha20.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * crypto.h - public data structures and prototypes for the crypto library 2 * crypto.h - public data structures and prototypes for the crypto library
3 * 3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public 4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 7
8 #ifndef _BLAPI_H_ 8 #ifndef _BLAPI_H_
9 #define _BLAPI_H_ 9 #define _BLAPI_H_
10 10
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 ** "maxOutputLen" the maximum amount of data that can ever be 811 ** "maxOutputLen" the maximum amount of data that can ever be
812 ** stored in "output" 812 ** stored in "output"
813 ** "input" the input data 813 ** "input" the input data
814 ** "inputLen" the amount of input data 814 ** "inputLen" the amount of input data
815 */ 815 */
816 extern SECStatus 816 extern SECStatus
817 Camellia_Decrypt(CamelliaContext *cx, unsigned char *output, 817 Camellia_Decrypt(CamelliaContext *cx, unsigned char *output,
818 unsigned int *outputLen, unsigned int maxOutputLen, 818 unsigned int *outputLen, unsigned int maxOutputLen,
819 const unsigned char *input, unsigned int inputLen); 819 const unsigned char *input, unsigned int inputLen);
820 820
821 /******************************************/
822 /*
823 ** ChaCha20+Poly1305 AEAD
824 */
825
826 extern SECStatus ChaCha20Poly1305_Seal(
827 unsigned char *out,
828 const unsigned char *ad, unsigned int adLen,
agl 2013/10/21 21:53:39 I think this is fine, but it limits the API to han
829 const unsigned char *plaintext, unsigned int plaintextLen,
830 unsigned int tagLen,
831 const unsigned char key[32],
832 const unsigned char nonce[8]);
833
834 extern SECStatus ChaCha20Poly1305_Open(
835 unsigned char *out,
836 const unsigned char *ad, unsigned int adLen,
837 const unsigned char *ciphertext, unsigned int ciphertextLen,
838 unsigned int tagLen,
839 const unsigned char key[32],
840 const unsigned char nonce[8]);
821 841
822 /******************************************/ 842 /******************************************/
823 /* 843 /*
824 ** MD5 secure hash function 844 ** MD5 secure hash function
825 */ 845 */
826 846
827 /* 847 /*
828 ** Hash a null terminated string "src" into "dest" using MD5 848 ** Hash a null terminated string "src" into "dest" using MD5
829 */ 849 */
830 extern SECStatus MD5_Hash(unsigned char *dest, const char *src); 850 extern SECStatus MD5_Hash(unsigned char *dest, const char *src);
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 PRBool BLAPI_VerifySelf(const char *name); 1424 PRBool BLAPI_VerifySelf(const char *name);
1405 1425
1406 /*********************************************************************/ 1426 /*********************************************************************/
1407 extern const SECHashObject * HASH_GetRawHashObject(HASH_HashType hashType); 1427 extern const SECHashObject * HASH_GetRawHashObject(HASH_HashType hashType);
1408 1428
1409 extern void BL_SetForkState(PRBool forked); 1429 extern void BL_SetForkState(PRBool forked);
1410 1430
1411 SEC_END_PROTOS 1431 SEC_END_PROTOS
1412 1432
1413 #endif /* _BLAPI_H_ */ 1433 #endif /* _BLAPI_H_ */
OLDNEW
« no previous file with comments | « nss.gyp ('k') | nss/lib/freebl/chacha20/chacha20.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698