summaryrefslogtreecommitdiffstats
path: root/bcprov/src/main/java/org/bouncycastle/math/ec/ZSignedDigitL2RMultiplier.java
diff options
context:
space:
mode:
authorSergio Giro <sgiro@google.com>2016-02-01 15:03:14 +0000
committerSergio Giro <sgiro@google.com>2016-02-01 18:54:07 +0000
commitc1040cb5656c3299f1c2d0fe0bd7c44b10466aaf (patch)
treeb5eb091b97b2aade28e5b45a15352125a4a776d7 /bcprov/src/main/java/org/bouncycastle/math/ec/ZSignedDigitL2RMultiplier.java
parent397d32894b89b506dc318e0f83446187c9b76ebe (diff)
downloadandroid_external_bouncycastle-c1040cb5656c3299f1c2d0fe0bd7c44b10466aaf.tar.gz
android_external_bouncycastle-c1040cb5656c3299f1c2d0fe0bd7c44b10466aaf.tar.bz2
android_external_bouncycastle-c1040cb5656c3299f1c2d0fe0bd7c44b10466aaf.zip
Restoring the contents of aosp after
https://android-review.git.corp.google.com/#/c/199871 git diff 9b30eb05e5be69d51881a0d1b31e503e97acd784 (ToT before submitting the patch above) doesn't show any differences Change-Id: I9f424a67094839f1893a23cd46ec7d6f0992ac26
Diffstat (limited to 'bcprov/src/main/java/org/bouncycastle/math/ec/ZSignedDigitL2RMultiplier.java')
-rw-r--r--bcprov/src/main/java/org/bouncycastle/math/ec/ZSignedDigitL2RMultiplier.java29
1 files changed, 0 insertions, 29 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/math/ec/ZSignedDigitL2RMultiplier.java b/bcprov/src/main/java/org/bouncycastle/math/ec/ZSignedDigitL2RMultiplier.java
deleted file mode 100644
index b478dc7..0000000
--- a/bcprov/src/main/java/org/bouncycastle/math/ec/ZSignedDigitL2RMultiplier.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.bouncycastle.math.ec;
-
-import java.math.BigInteger;
-
-public class ZSignedDigitL2RMultiplier extends AbstractECMultiplier
-{
- /**
- * 'Zeroless' Signed Digit Left-to-Right.
- */
- protected ECPoint multiplyPositive(ECPoint p, BigInteger k)
- {
- ECPoint addP = p.normalize(), subP = addP.negate();
-
- ECPoint R0 = addP;
-
- int n = k.bitLength();
- int s = k.getLowestSetBit();
-
- int i = n;
- while (--i > s)
- {
- R0 = R0.twicePlus(k.testBit(i) ? addP : subP);
- }
-
- R0 = R0.timesPow2(s);
-
- return R0;
- }
-}