MixedNafR2LMultiplier.configureCurve
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.bouncycastle.math.ec.MixedNafR2LMultiplier.configureCurve(Showing top 2 results out of 315)

origin: org.bouncycastle/bcprov-debug-jdk15on

protected ECPoint multiplyPositive(ECPoint p, BigInteger k)
{
  ECCurve curveOrig = p.getCurve();
  ECCurve curveAdd = configureCurve(curveOrig, additionCoord);
  ECCurve curveDouble = configureCurve(curveOrig, doublingCoord);
  int[] naf = WNafUtil.generateCompactNaf(k);
  ECPoint Ra = curveAdd.getInfinity();
  ECPoint Td = curveDouble.importPoint(p);
  int zeroes = 0;
  for (int i = 0; i < naf.length; ++i)
  {
    int ni = naf[i];
    int digit = ni >> 16;
    zeroes += ni & 0xFFFF;
    Td = Td.timesPow2(zeroes);
    ECPoint Tj = curveAdd.importPoint(Td);
    if (digit < 0)
    {
      Tj = Tj.negate();
    }
    Ra = Ra.add(Tj);
    zeroes = 1;
  }
  return curveOrig.importPoint(Ra);
}
origin: org.bouncycastle/bcprov-debug-jdk15on

protected ECPoint multiplyPositive(ECPoint p, BigInteger k)
{
  ECCurve curveOrig = p.getCurve();
  ECCurve curveAdd = configureCurve(curveOrig, additionCoord);
  ECCurve curveDouble = configureCurve(curveOrig, doublingCoord);
  int[] naf = WNafUtil.generateCompactNaf(k);
  ECPoint Ra = curveAdd.getInfinity();
  ECPoint Td = curveDouble.importPoint(p);
  int zeroes = 0;
  for (int i = 0; i < naf.length; ++i)
  {
    int ni = naf[i];
    int digit = ni >> 16;
    zeroes += ni & 0xFFFF;
    Td = Td.timesPow2(zeroes);
    ECPoint Tj = curveAdd.importPoint(Td);
    if (digit < 0)
    {
      Tj = Tj.negate();
    }
    Ra = Ra.add(Tj);
    zeroes = 1;
  }
  return curveOrig.importPoint(Ra);
}
org.bouncycastle.math.ecMixedNafR2LMultiplierconfigureCurve

Popular methods of MixedNafR2LMultiplier

  • <init>

Popular classes and methods

  • setScale (BigDecimal)
    Returns a new BigDecimal instance with the specified scale. If the new scale is greater than the old
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Kernel (java.awt.image)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • JFileChooser (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)