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

Side by Side Diff: patches/nss-chacha20-poly1305.patch

Issue 53523002: Update the patch file for r231825 (https://codereview.chromium.org/51333008). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Index: nss/lib/softoken/pkcs11.c 1 Index: nss/lib/softoken/pkcs11.c
2 =================================================================== 2 ===================================================================
3 --- nss/lib/softoken/pkcs11.c (revision 228205) 3 --- nss/lib/softoken/pkcs11.c (revision 228205)
4 +++ nss/lib/softoken/pkcs11.c (working copy) 4 +++ nss/lib/softoken/pkcs11.c (working copy)
5 @@ -368,6 +368,9 @@ 5 @@ -368,6 +368,9 @@
6 {CKM_SEED_MAC, {16, 16, CKF_SN_VR}, PR_TRUE}, 6 {CKM_SEED_MAC, {16, 16, CKF_SN_VR}, PR_TRUE},
7 {CKM_SEED_MAC_GENERAL, {16, 16, CKF_SN_VR}, PR_TRUE}, 7 {CKM_SEED_MAC_GENERAL, {16, 16, CKF_SN_VR}, PR_TRUE},
8 {CKM_SEED_CBC_PAD, {16, 16, CKF_EN_DE_WR_UN}, PR_TRUE} , 8 {CKM_SEED_CBC_PAD, {16, 16, CKF_EN_DE_WR_UN}, PR_TRUE} ,
9 + /* ------------------------- ChaCha20 Operations ---------------------- */ 9 + /* ------------------------- ChaCha20 Operations ---------------------- */
10 + {CKM_NSS_CHACHA20_KEY_GEN, {32, 32, CKF_GENERATE}, PR_TRUE} , 10 + {CKM_NSS_CHACHA20_KEY_GEN, {32, 32, CKF_GENERATE}, PR_TRUE} ,
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 +static uint32_t U8TO32_LE(const unsigned char *m) { 969 +static uint32_t U8TO32_LE(const unsigned char *m) {
970 + uint32_t r; 970 + uint32_t r;
971 + memcpy(&r, m, sizeof(r)); 971 + memcpy(&r, m, sizeof(r));
972 + return r; 972 + return r;
973 +} 973 +}
974 + 974 +
975 +static void U32TO8_LE(unsigned char *m, uint32_t v) { 975 +static void U32TO8_LE(unsigned char *m, uint32_t v) {
976 + memcpy(m, &v, sizeof(v)); 976 + memcpy(m, &v, sizeof(v));
977 +} 977 +}
978 +#else 978 +#else
979 +static void U8TO32_LE(const unsigned char *m) { 979 +static uint32_t U8TO32_LE(const unsigned char *m) {
980 + return (uint32_t)m[0] | 980 + return (uint32_t)m[0] |
981 + (uint32_t)m[1] << 8 | 981 + (uint32_t)m[1] << 8 |
982 + (uint32_t)m[2] << 16 | 982 + (uint32_t)m[2] << 16 |
983 + (uint32_t)m[3] << 24; 983 + (uint32_t)m[3] << 24;
984 +} 984 +}
985 + 985 +
986 +static void U32TO8_LE(unsigned char *m, uint32_t v) { 986 +static void U32TO8_LE(unsigned char *m, uint32_t v) {
987 + m[0] = v; 987 + m[0] = v;
988 + m[1] = v >> 8; 988 + m[1] = v >> 8;
989 + m[2] = v >> 16; 989 + m[2] = v >> 16;
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1923 + CK_BYTE_PTR pIv; /* This is the nonce. */ 1923 + CK_BYTE_PTR pIv; /* This is the nonce. */
1924 + CK_ULONG ulIvLen; 1924 + CK_ULONG ulIvLen;
1925 + CK_BYTE_PTR pAAD; 1925 + CK_BYTE_PTR pAAD;
1926 + CK_ULONG ulAADLen; 1926 + CK_ULONG ulAADLen;
1927 + CK_ULONG ulTagLen; 1927 + CK_ULONG ulTagLen;
1928 +} CK_NSS_AEAD_PARAMS; 1928 +} CK_NSS_AEAD_PARAMS;
1929 + 1929 +
1930 /* 1930 /*
1931 * NSS-defined return values 1931 * NSS-defined return values
1932 * 1932 *
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698