Skip to content

Commit

Permalink
portability updates, updated version number
Browse files Browse the repository at this point in the history
  • Loading branch information
dghgit committed Jul 21, 2014
1 parent a10aa6b commit 262777b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions bc-build.properties
@@ -1,8 +1,8 @@

release.suffix: 151b18
release.name: 1.51b18
release.version: 1.51.0.18
release.debug: true
release.suffix: 151
release.name: 1.51
release.version: 1.51.0
release.debug: false

mail.jar.home: /opt/javamail/mail.jar
activation.jar.home: /opt/jaf/activation.jar
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/bouncycastle/math/ec/ECCurve.java
Expand Up @@ -844,7 +844,7 @@ public ECPoint createPoint(BigInteger x, BigInteger y, boolean withCompression)
{
if (X.isZero())
{
if (!Y.square().equals(getB()))
if (!Y.square().equals(this.getB()))
{
throw new IllegalArgumentException();
}
Expand Down
Expand Up @@ -222,7 +222,7 @@ public ECFieldElement invert()
*/
public ECFieldElement sqrt()
{
if (isZero() || isOne())
if (this.isZero() || this.isOne()) // earlier JDK compatibility
{
return this;
}
Expand Down
16 changes: 8 additions & 8 deletions core/src/main/java/org/bouncycastle/math/ec/ECPoint.java
Expand Up @@ -532,7 +532,7 @@ public Fp(ECCurve curve, ECFieldElement x, ECFieldElement y, boolean withCompres

protected ECPoint detach()
{
return new ECPoint.Fp(null, getAffineXCoord(), getAffineYCoord());
return new ECPoint.Fp(null, this.getAffineXCoord(), this.getAffineYCoord());
}

protected boolean getCompressionYTilde()
Expand Down Expand Up @@ -1311,7 +1311,7 @@ public F2m(ECCurve curve, ECFieldElement x, ECFieldElement y, boolean withCompre

protected ECPoint detach()
{
return new ECPoint.F2m(null, getAffineXCoord(), getAffineYCoord());
return new ECPoint.F2m(null, this.getAffineXCoord(), this.getAffineYCoord()); // earlier JDK
}

public ECFieldElement getYCoord()
Expand Down Expand Up @@ -1363,24 +1363,24 @@ public ECPoint scaleX(ECFieldElement scale)
case ECCurve.COORD_LAMBDA_AFFINE:
{
// Y is actually Lambda (X + Y/X) here
ECFieldElement X = getRawXCoord(), L = getRawYCoord();
ECFieldElement X = this.getRawXCoord(), L = this.getRawYCoord(); // earlier JDK

ECFieldElement X2 = X.multiply(scale);
ECFieldElement L2 = L.add(X).divide(scale).add(X2);

return getCurve().createRawPoint(X, L2, getRawZCoords(), this.withCompression);
return this.getCurve().createRawPoint(X, L2, this.getRawZCoords(), this.withCompression); // earlier JDK
}
case ECCurve.COORD_LAMBDA_PROJECTIVE:
{
// Y is actually Lambda (X + Y/X) here
ECFieldElement X = getRawXCoord(), L = getRawYCoord(), Z = getRawZCoords()[0];
ECFieldElement X = this.getRawXCoord(), L = this.getRawYCoord(), Z = this.getRawZCoords()[0]; // earlier JDK

// We scale the Z coordinate also, to avoid an inversion
ECFieldElement X2 = X.multiply(scale.square());
ECFieldElement L2 = L.add(X).add(X2);
ECFieldElement Z2 = Z.multiply(scale);

return getCurve().createRawPoint(X2, L2, new ECFieldElement[]{ Z2 }, this.withCompression);
return this.getCurve().createRawPoint(X2, L2, new ECFieldElement[]{ Z2 }, this.withCompression); // earlier JDK
}
default:
{
Expand All @@ -1403,12 +1403,12 @@ public ECPoint scaleY(ECFieldElement scale)
case ECCurve.COORD_LAMBDA_AFFINE:
case ECCurve.COORD_LAMBDA_PROJECTIVE:
{
ECFieldElement X = getRawXCoord(), L = getRawYCoord();
ECFieldElement X = this.getRawXCoord(), L = this.getRawYCoord(); // earlier JDK

// Y is actually Lambda (X + Y/X) here
ECFieldElement L2 = L.add(X).multiply(scale).add(X);

return getCurve().createRawPoint(X, L2, getRawZCoords(), this.withCompression);
return this.getCurve().createRawPoint(X, L2, this.getRawZCoords(), this.withCompression); // earlier JDK
}
default:
{
Expand Down
Expand Up @@ -44,7 +44,7 @@
public final class BouncyCastleProvider extends Provider
implements ConfigurableProvider
{
private static String info = "BouncyCastle Security Provider v1.51b";
private static String info = "BouncyCastle Security Provider v1.51";

public static final String PROVIDER_NAME = "BC";

Expand Down Expand Up @@ -117,7 +117,7 @@ public final class BouncyCastleProvider extends Provider
*/
public BouncyCastleProvider()
{
super(PROVIDER_NAME, 1.505, info);
super(PROVIDER_NAME, 1.51, info);

AccessController.doPrivileged(new PrivilegedAction()
{
Expand Down

0 comments on commit 262777b

Please sign in to comment.