boringssl/crypto/bn
David Benjamin 6d9e5a7448 Re-apply 75b833cc81
I messed up and missed that we were carrying a diff on x86_64-mont5.pl. This
was accidentally dropped in https://boringssl-review.googlesource.com/6616.

To confirm the merge is good now, check out at this revision and run:

  git diff e701f16bd69b6f251ed537e40364c281e85a63b2^ crypto/bn/asm/x86_64-mont5.pl > /tmp/A

Then in OpenSSL's repository:

  git diff d73cc256c8e256c32ed959456101b73ba9842f72^ d73cc256c8e256c32ed959456101b73ba9842f72 crypto/bn/asm/x86_64-mont5.pl  > /tmp/B

And confirm the diffs vary in only metadata:

  diff -u /tmp/A /tmp/B

--- /tmp/A	2015-12-03 11:53:23.127034998 -0500
+++ /tmp/B	2015-12-03 11:53:53.099314287 -0500
@@ -1,8 +1,8 @@
 diff --git a/crypto/bn/asm/x86_64-mont5.pl b/crypto/bn/asm/x86_64-mont5.pl
-index 38def07..3c5a8fc 100644
+index 388e3c6..64e668f 100755
 --- a/crypto/bn/asm/x86_64-mont5.pl
 +++ b/crypto/bn/asm/x86_64-mont5.pl
-@@ -1770,6 +1770,15 @@ sqr8x_reduction:
+@@ -1784,6 +1784,15 @@ sqr8x_reduction:
  .align	32
  .L8x_tail_done:
  	add	(%rdx),%r8		# can this overflow?
@@ -18,7 +18,7 @@
  	xor	%rax,%rax

  	neg	$carry
-@@ -3116,6 +3125,15 @@ sqrx8x_reduction:
+@@ -3130,6 +3139,15 @@ sqrx8x_reduction:
  .align	32
  .Lsqrx8x_tail_done:
  	add	24+8(%rsp),%r8		# can this overflow?
@@ -34,7 +34,7 @@
  	mov	$carry,%rax		# xor	%rax,%rax

  	sub	16+8(%rsp),$carry	# mov 16(%rsp),%cf
-@@ -3159,13 +3177,11 @@ my ($rptr,$nptr)=("%rdx","%rbp");
+@@ -3173,13 +3191,11 @@ my ($rptr,$nptr)=("%rdx","%rbp");
  my @ri=map("%r$_",(10..13));
  my @ni=map("%r$_",(14..15));
  $code.=<<___;

Change-Id: I3fb5253783ed82e4831f5bffde75273bd9609c23
Reviewed-on: https://boringssl-review.googlesource.com/6618
Reviewed-by: Adam Langley <agl@google.com>
2015-12-03 17:25:12 +00:00
..
asm Re-apply 75b833cc81 2015-12-03 17:25:12 +00:00
add.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
bn_asn1.c Work around even more Estonian ID card misissuances. 2015-09-23 20:35:47 +00:00
bn_test.cc bn/asm/x86_64-mont5.pl: fix carry propagating bug (CVE-2015-3193). 2015-12-03 16:44:35 +00:00
bn.c Share common definitions of |TOBN| and |BIGNUM_STATIC|. 2015-11-19 01:38:52 +00:00
CMakeLists.txt Add AArch64 Montgomery assembly. 2015-11-10 19:13:46 +00:00
cmp.c Inital import. 2014-06-20 13:17:32 -07:00
convert.c Re-add |BN_bn2mpi| and |BN_mpi2bn| from OpenSSL at fd682e4c. 2015-08-18 23:49:31 +00:00
ctx.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
div.c Do away with BN_LLONG in favor of BN_ULLONG. 2015-11-20 19:59:07 +00:00
exponentiation.c Constify more BN_MONT_CTX parameters. 2015-11-06 20:04:36 +00:00
gcd.c s/BN_BITS/BN_BITS2/ in |BN_mod_inverse_ex|; remove |BN_BITS| & |BN_MASK|. 2015-11-19 01:39:32 +00:00
generic.c Do away with BN_LLONG in favor of BN_ULLONG. 2015-11-20 19:59:07 +00:00
internal.h Do away with BN_LLONG in favor of BN_ULLONG. 2015-11-20 19:59:07 +00:00
kronecker.c Inital import. 2014-06-20 13:17:32 -07:00
montgomery.c Remove the |ri| field of |BN_MONT_CTX|. 2015-11-19 01:40:13 +00:00
mul.c Check for BN_copy failures. 2015-06-15 17:52:40 +00:00
prime.c Avoid signed/unsigned comparison in crypto/bn's |probable_prime|. 2015-10-26 21:27:12 +00:00
random.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
rsaz_exp.c Support building with PNaCl. 2014-07-11 19:04:04 +00:00
rsaz_exp.h Fix license on rsaz_exp.h. 2015-07-27 22:21:11 +00:00
shift.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
sqrt.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00