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

Side by Side Diff: nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c

Issue 1843333003: Update NSPR to 4.12 and NSS to 3.23 on iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 /* This implementation of poly1305 is by Andrew Moon 5 /* This implementation of poly1305 is by Andrew Moon
6 * (https://github.com/floodyberry/poly1305-donna) and released as public 6 * (https://github.com/floodyberry/poly1305-donna) and released as public
7 * domain. It implements SIMD vectorization based on the algorithm described in 7 * domain. It implements SIMD vectorization based on the algorithm described in
8 * http://cr.yp.to/papers.html#neoncrypto. Unrolled to 2 powers, i.e. 64 byte 8 * http://cr.yp.to/papers.html#neoncrypto. Unrolled to 2 powers, i.e. 64 byte
9 * block size. */ 9 * block size. */
10 10
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 /* pad */ 614 /* pad */
615 t0 = ((uint64_t)p->R23.d[3] << 32) | (uint64_t)p->R23.d[1]; 615 t0 = ((uint64_t)p->R23.d[3] << 32) | (uint64_t)p->R23.d[1];
616 t1 = ((uint64_t)p->R24.d[3] << 32) | (uint64_t)p->R24.d[1]; 616 t1 = ((uint64_t)p->R24.d[3] << 32) | (uint64_t)p->R24.d[1];
617 h0 += (t0 & 0xfffffffffff) ; c = (h0 >> 44); h0 &= 0xfffffffffff; t0 = shr128_pair(t1, t0, 44); 617 h0 += (t0 & 0xfffffffffff) ; c = (h0 >> 44); h0 &= 0xfffffffffff; t0 = shr128_pair(t1, t0, 44);
618 h1 += (t0 & 0xfffffffffff) + c; c = (h1 >> 44); h1 &= 0xfffffffffff; t1 = (t1 >> 24); 618 h1 += (t0 & 0xfffffffffff) + c; c = (h1 >> 44); h1 &= 0xfffffffffff; t1 = (t1 >> 24);
619 h2 += (t1 ) + c; 619 h2 += (t1 ) + c;
620 620
621 U64TO8_LE(mac + 0, ((h0 ) | (h1 << 44))); 621 U64TO8_LE(mac + 0, ((h0 ) | (h1 << 44)));
622 U64TO8_LE(mac + 8, ((h1 >> 20) | (h2 << 24))); 622 U64TO8_LE(mac + 8, ((h1 >> 20) | (h2 << 24)));
623 } 623 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698