summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/bn/old/info
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/bn/old/info')
-rw-r--r--crypto/openssl/crypto/bn/old/info22
1 files changed, 22 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/bn/old/info b/crypto/openssl/crypto/bn/old/info
new file mode 100644
index 0000000..5ac99c3
--- /dev/null
+++ b/crypto/openssl/crypto/bn/old/info
@@ -0,0 +1,22 @@
+Given A1A0 * B1B0 == S3S2S1S0
+
+S0= low(A0*B0)
+S1= low( (A1-A0)*(B0-B1)) +low( A1*B1) +high(A0*B0)
+S2= high((A1-A0)*(B0-B1)) +high(A1*B1) +low( A1*B1)
+S3= high(A1*B1);
+
+Assume we know S1 and S0, and can calulate A1*B1 and high((A1-A0)*(B0-B1))
+
+k0= S0 == low(A0*B0)
+k1= S1
+k2= low( A1*B1)
+k3= high(A1*B1)
+k4= high((A1-A0)*(B0-B1))
+
+k1= low((A1-A0)*(B0-B1)) +k2 +high(A0*B0)
+S2= k4 +k3 +k2
+S3= k3
+
+S1-k2= low((A1-A0)*(B0-B1)) +high(A0*B0)
+
+We potentially have a carry or a borrow from S1
OpenPOWER on IntegriCloud