ECPoint.smali
.class public abstract Lorg/spongycastle/math/ec/ECPoint;
.super Ljava/lang/Object;
.source "ECPoint.java"
# static fields
.field protected static EMPTY_ZS:[Lorg/spongycastle/math/ec/ECFieldElement;
# instance fields
.field protected curve:Lorg/spongycastle/math/ec/ECCurve;
.field protected preCompTable:Ljava/util/Hashtable;
.field protected withCompression:Z
.field protected x:Lorg/spongycastle/math/ec/ECFieldElement;
.field protected y:Lorg/spongycastle/math/ec/ECFieldElement;
.field protected zs:[Lorg/spongycastle/math/ec/ECFieldElement;
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 11
const/4 v0, 0x0
new-array v0, v0, [Lorg/spongycastle/math/ec/ECFieldElement;
sput-object v0, Lorg/spongycastle/math/ec/ECPoint;->EMPTY_ZS:[Lorg/spongycastle/math/ec/ECFieldElement;
return-void
.end method
.method protected constructor <init>(Lorg/spongycastle/math/ec/ECCurve;Lorg/spongycastle/math/ec/ECFieldElement;Lorg/spongycastle/math/ec/ECFieldElement;)V
.registers 5
.prologue
.line 56
invoke-static {p1}, Lorg/spongycastle/math/ec/ECPoint;->getInitialZCoords(Lorg/spongycastle/math/ec/ECCurve;)[Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
invoke-direct {p0, p1, p2, p3, v0}, Lorg/spongycastle/math/ec/ECPoint;-><init>(Lorg/spongycastle/math/ec/ECCurve;Lorg/spongycastle/math/ec/ECFieldElement;Lorg/spongycastle/math/ec/ECFieldElement;[Lorg/spongycastle/math/ec/ECFieldElement;)V
.line 57
return-void
.end method
.method protected constructor <init>(Lorg/spongycastle/math/ec/ECCurve;Lorg/spongycastle/math/ec/ECFieldElement;Lorg/spongycastle/math/ec/ECFieldElement;[Lorg/spongycastle/math/ec/ECFieldElement;)V
.registers 6
.prologue
.line 60
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 52
const/4 v0, 0x0
iput-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->preCompTable:Ljava/util/Hashtable;
.line 61
iput-object p1, p0, Lorg/spongycastle/math/ec/ECPoint;->curve:Lorg/spongycastle/math/ec/ECCurve;
.line 62
iput-object p2, p0, Lorg/spongycastle/math/ec/ECPoint;->x:Lorg/spongycastle/math/ec/ECFieldElement;
.line 63
iput-object p3, p0, Lorg/spongycastle/math/ec/ECPoint;->y:Lorg/spongycastle/math/ec/ECFieldElement;
.line 64
iput-object p4, p0, Lorg/spongycastle/math/ec/ECPoint;->zs:[Lorg/spongycastle/math/ec/ECFieldElement;
.line 65
return-void
.end method
.method protected static getInitialZCoords(Lorg/spongycastle/math/ec/ECCurve;)[Lorg/spongycastle/math/ec/ECFieldElement;
.registers 6
.prologue
const/4 v4, 0x2
const/4 v3, 0x1
const/4 v1, 0x0
.line 16
if-nez p0, :cond_1a
move v0, v1
.line 18
:goto_6
sparse-switch v0, :sswitch_data_3c
.line 27
sget-object v2, Lorg/spongycastle/math/ec/ECConstants;->ONE:Ljava/math/BigInteger;
invoke-virtual {p0, v2}, Lorg/spongycastle/math/ec/ECCurve;->fromBigInteger(Ljava/math/BigInteger;)Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v2
.line 29
packed-switch v0, :pswitch_data_46
.line 40
:pswitch_12
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "unknown coordinate system"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.line 16
:cond_1a
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECCurve;->getCoordinateSystem()I
move-result v0
goto :goto_6
.line 22
:sswitch_1f
sget-object v0, Lorg/spongycastle/math/ec/ECPoint;->EMPTY_ZS:[Lorg/spongycastle/math/ec/ECFieldElement;
.line 38
:goto_21
return-object v0
.line 34
:pswitch_22
new-array v0, v3, [Lorg/spongycastle/math/ec/ECFieldElement;
aput-object v2, v0, v1
goto :goto_21
.line 36
:pswitch_27
const/4 v0, 0x3
new-array v0, v0, [Lorg/spongycastle/math/ec/ECFieldElement;
aput-object v2, v0, v1
aput-object v2, v0, v3
aput-object v2, v0, v4
goto :goto_21
.line 38
:pswitch_31
new-array v0, v4, [Lorg/spongycastle/math/ec/ECFieldElement;
aput-object v2, v0, v1
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECCurve;->getA()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v1
aput-object v1, v0, v3
goto :goto_21
.line 18
:sswitch_data_3c
.sparse-switch
0x0 -> :sswitch_1f
0x5 -> :sswitch_1f
.end sparse-switch
.line 29
:pswitch_data_46
.packed-switch 0x1
:pswitch_22
:pswitch_22
:pswitch_27
:pswitch_31
:pswitch_12
:pswitch_22
.end packed-switch
.end method
# virtual methods
.method public abstract add(Lorg/spongycastle/math/ec/ECPoint;)Lorg/spongycastle/math/ec/ECPoint;
.end method
.method protected checkNormalized()V
.registers 3
.prologue
.line 208
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->isNormalized()Z
move-result v0
if-nez v0, :cond_e
.line 210
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "point not in normal form"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.line 212
:cond_e
return-void
.end method
.method protected createScaledPoint(Lorg/spongycastle/math/ec/ECFieldElement;Lorg/spongycastle/math/ec/ECFieldElement;)Lorg/spongycastle/math/ec/ECPoint;
.registers 7
.prologue
.line 282
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getCurve()Lorg/spongycastle/math/ec/ECCurve;
move-result-object v0
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getRawXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v1
invoke-virtual {v1, p1}, Lorg/spongycastle/math/ec/ECFieldElement;->multiply(Lorg/spongycastle/math/ec/ECFieldElement;)Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v1
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getRawYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v2
invoke-virtual {v2, p2}, Lorg/spongycastle/math/ec/ECFieldElement;->multiply(Lorg/spongycastle/math/ec/ECFieldElement;)Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v2
iget-boolean v3, p0, Lorg/spongycastle/math/ec/ECPoint;->withCompression:Z
invoke-virtual {v0, v1, v2, v3}, Lorg/spongycastle/math/ec/ECCurve;->createRawPoint(Lorg/spongycastle/math/ec/ECFieldElement;Lorg/spongycastle/math/ec/ECFieldElement;Z)Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
return-object v0
.end method
.method public abstract detach()Lorg/spongycastle/math/ec/ECPoint;
.end method
.method public equals(Ljava/lang/Object;)Z
.registers 3
.prologue
.line 389
if-ne p1, p0, :cond_4
.line 391
const/4 v0, 0x1
.line 399
:goto_3
return v0
.line 394
:cond_4
instance-of v0, p1, Lorg/spongycastle/math/ec/ECPoint;
if-nez v0, :cond_a
.line 396
const/4 v0, 0x0
goto :goto_3
.line 399
:cond_a
check-cast p1, Lorg/spongycastle/math/ec/ECPoint;
invoke-virtual {p0, p1}, Lorg/spongycastle/math/ec/ECPoint;->equals(Lorg/spongycastle/math/ec/ECPoint;)Z
move-result v0
goto :goto_3
.end method
.method public equals(Lorg/spongycastle/math/ec/ECPoint;)Z
.registers 10
.prologue
const/4 v1, 0x1
const/4 v2, 0x0
.line 340
if-nez p1, :cond_5
.line 384
:cond_4
:goto_4
return v2
.line 345
:cond_5
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getCurve()Lorg/spongycastle/math/ec/ECCurve;
move-result-object v4
invoke-virtual {p1}, Lorg/spongycastle/math/ec/ECPoint;->getCurve()Lorg/spongycastle/math/ec/ECCurve;
move-result-object v5
.line 346
if-nez v4, :cond_2f
move v3, v1
:goto_10
if-nez v5, :cond_31
move v0, v1
.line 347
:goto_13
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->isInfinity()Z
move-result v6
invoke-virtual {p1}, Lorg/spongycastle/math/ec/ECPoint;->isInfinity()Z
move-result v7
.line 349
if-nez v6, :cond_1f
if-eqz v7, :cond_33
.line 351
:cond_1f
if-eqz v6, :cond_4
if-eqz v7, :cond_4
if-nez v3, :cond_2d
if-nez v0, :cond_2d
invoke-virtual {v4, v5}, Lorg/spongycastle/math/ec/ECCurve;->equals(Lorg/spongycastle/math/ec/ECCurve;)Z
move-result v0
if-eqz v0, :cond_4
:cond_2d
move v2, v1
goto :goto_4
:cond_2f
move v3, v2
.line 346
goto :goto_10
:cond_31
move v0, v2
goto :goto_13
.line 355
:cond_33
if-eqz v3, :cond_37
if-nez v0, :cond_3d
.line 359
:cond_37
if-eqz v3, :cond_5b
.line 361
invoke-virtual {p1}, Lorg/spongycastle/math/ec/ECPoint;->normalize()Lorg/spongycastle/math/ec/ECPoint;
move-result-object p1
.line 384
:cond_3d
:goto_3d
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
invoke-virtual {p1}, Lorg/spongycastle/math/ec/ECPoint;->getXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v3
invoke-virtual {v0, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_4
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
invoke-virtual {p1}, Lorg/spongycastle/math/ec/ECPoint;->getYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v3
invoke-virtual {v0, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_4
move v2, v1
goto :goto_4
.line 363
:cond_5b
if-eqz v0, :cond_62
.line 365
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->normalize()Lorg/spongycastle/math/ec/ECPoint;
move-result-object p0
goto :goto_3d
.line 367
:cond_62
invoke-virtual {v4, v5}, Lorg/spongycastle/math/ec/ECCurve;->equals(Lorg/spongycastle/math/ec/ECCurve;)Z
move-result v0
if-eqz v0, :cond_4
.line 375
const/4 v0, 0x2
new-array v0, v0, [Lorg/spongycastle/math/ec/ECPoint;
aput-object p0, v0, v2
invoke-virtual {v4, p1}, Lorg/spongycastle/math/ec/ECCurve;->importPoint(Lorg/spongycastle/math/ec/ECPoint;)Lorg/spongycastle/math/ec/ECPoint;
move-result-object v3
aput-object v3, v0, v1
.line 378
invoke-virtual {v4, v0}, Lorg/spongycastle/math/ec/ECCurve;->normalizeAll([Lorg/spongycastle/math/ec/ECPoint;)V
.line 380
aget-object p0, v0, v2
.line 381
aget-object p1, v0, v1
goto :goto_3d
.end method
.method public getAffineXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
.registers 2
.prologue
.line 128
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->checkNormalized()V
.line 129
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
return-object v0
.end method
.method public getAffineYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
.registers 2
.prologue
.line 140
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->checkNormalized()V
.line 141
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
return-object v0
.end method
.method protected abstract getCompressionYTilde()Z
.end method
.method public getCurve()Lorg/spongycastle/math/ec/ECCurve;
.registers 2
.prologue
.line 82
iget-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->curve:Lorg/spongycastle/math/ec/ECCurve;
return-object v0
.end method
.method protected getCurveCoordinateSystem()I
.registers 2
.prologue
.line 90
iget-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->curve:Lorg/spongycastle/math/ec/ECCurve;
if-nez v0, :cond_6
const/4 v0, 0x0
:goto_5
return v0
:cond_6
iget-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->curve:Lorg/spongycastle/math/ec/ECCurve;
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECCurve;->getCoordinateSystem()I
move-result v0
goto :goto_5
.end method
.method public final getDetachedPoint()Lorg/spongycastle/math/ec/ECPoint;
.registers 2
.prologue
.line 77
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->normalize()Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECPoint;->detach()Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
return-object v0
.end method
.method public getEncoded()[B
.registers 2
.prologue
.line 446
iget-boolean v0, p0, Lorg/spongycastle/math/ec/ECPoint;->withCompression:Z
invoke-virtual {p0, v0}, Lorg/spongycastle/math/ec/ECPoint;->getEncoded(Z)[B
move-result-object v0
return-object v0
.end method
.method public getEncoded(Z)[B
.registers 8
.prologue
const/4 v5, 0x1
const/4 v4, 0x0
.line 457
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->isInfinity()Z
move-result v0
if-eqz v0, :cond_b
.line 459
new-array v0, v5, [B
.line 480
:goto_a
return-object v0
.line 462
:cond_b
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->normalize()Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
.line 464
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECPoint;->getXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v1
invoke-virtual {v1}, Lorg/spongycastle/math/ec/ECFieldElement;->getEncoded()[B
move-result-object v2
.line 466
if-eqz p1, :cond_30
.line 468
array-length v1, v2
add-int/lit8 v1, v1, 0x1
new-array v1, v1, [B
.line 469
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECPoint;->getCompressionYTilde()Z
move-result v0
if-eqz v0, :cond_2e
const/4 v0, 0x3
:goto_25
int-to-byte v0, v0
aput-byte v0, v1, v4
.line 470
array-length v0, v2
invoke-static {v2, v4, v1, v5, v0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
move-object v0, v1
.line 471
goto :goto_a
.line 469
:cond_2e
const/4 v0, 0x2
goto :goto_25
.line 474
:cond_30
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECPoint;->getYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECFieldElement;->getEncoded()[B
move-result-object v1
.line 476
array-length v0, v2
array-length v3, v1
add-int/2addr v0, v3
add-int/lit8 v0, v0, 0x1
new-array v0, v0, [B
.line 477
const/4 v3, 0x4
aput-byte v3, v0, v4
.line 478
array-length v3, v2
invoke-static {v2, v4, v0, v5, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 479
array-length v2, v2
add-int/lit8 v2, v2, 0x1
array-length v3, v1
invoke-static {v1, v4, v0, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
goto :goto_a
.end method
.method public final getRawXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
.registers 2
.prologue
.line 193
iget-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->x:Lorg/spongycastle/math/ec/ECFieldElement;
return-object v0
.end method
.method public final getRawYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
.registers 2
.prologue
.line 198
iget-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->y:Lorg/spongycastle/math/ec/ECFieldElement;
return-object v0
.end method
.method protected final getRawZCoords()[Lorg/spongycastle/math/ec/ECFieldElement;
.registers 2
.prologue
.line 203
iget-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->zs:[Lorg/spongycastle/math/ec/ECFieldElement;
return-object v0
.end method
.method public getX()Lorg/spongycastle/math/ec/ECFieldElement;
.registers 2
.prologue
.line 103
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->normalize()Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECPoint;->getXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
return-object v0
.end method
.method public getXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
.registers 2
.prologue
.line 156
iget-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->x:Lorg/spongycastle/math/ec/ECFieldElement;
return-object v0
.end method
.method public getY()Lorg/spongycastle/math/ec/ECFieldElement;
.registers 2
.prologue
.line 117
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->normalize()Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECPoint;->getYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
return-object v0
.end method
.method public getYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
.registers 2
.prologue
.line 171
iget-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->y:Lorg/spongycastle/math/ec/ECFieldElement;
return-object v0
.end method
.method public getZCoord(I)Lorg/spongycastle/math/ec/ECFieldElement;
.registers 3
.prologue
.line 176
if-ltz p1, :cond_7
iget-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->zs:[Lorg/spongycastle/math/ec/ECFieldElement;
array-length v0, v0
if-lt p1, v0, :cond_9
:cond_7
const/4 v0, 0x0
:goto_8
return-object v0
:cond_9
iget-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->zs:[Lorg/spongycastle/math/ec/ECFieldElement;
aget-object v0, v0, p1
goto :goto_8
.end method
.method public getZCoords()[Lorg/spongycastle/math/ec/ECFieldElement;
.registers 5
.prologue
const/4 v3, 0x0
.line 181
iget-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->zs:[Lorg/spongycastle/math/ec/ECFieldElement;
array-length v1, v0
.line 182
if-nez v1, :cond_9
.line 184
sget-object v0, Lorg/spongycastle/math/ec/ECPoint;->EMPTY_ZS:[Lorg/spongycastle/math/ec/ECFieldElement;
.line 188
:goto_8
return-object v0
.line 186
:cond_9
new-array v0, v1, [Lorg/spongycastle/math/ec/ECFieldElement;
.line 187
iget-object v2, p0, Lorg/spongycastle/math/ec/ECPoint;->zs:[Lorg/spongycastle/math/ec/ECFieldElement;
invoke-static {v2, v3, v0, v3, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
goto :goto_8
.end method
.method public hashCode()I
.registers 4
.prologue
.line 404
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getCurve()Lorg/spongycastle/math/ec/ECCurve;
move-result-object v0
.line 405
if-nez v0, :cond_28
const/4 v0, 0x0
.line 407
:goto_7
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->isInfinity()Z
move-result v1
if-nez v1, :cond_27
.line 411
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->normalize()Lorg/spongycastle/math/ec/ECPoint;
move-result-object v1
.line 413
invoke-virtual {v1}, Lorg/spongycastle/math/ec/ECPoint;->getXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/Object;->hashCode()I
move-result v2
mul-int/lit8 v2, v2, 0x11
xor-int/2addr v0, v2
.line 414
invoke-virtual {v1}, Lorg/spongycastle/math/ec/ECPoint;->getYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Object;->hashCode()I
move-result v1
mul-int/lit16 v1, v1, 0x101
xor-int/2addr v0, v1
.line 417
:cond_27
return v0
.line 405
:cond_28
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECCurve;->hashCode()I
move-result v0
xor-int/lit8 v0, v0, -0x1
goto :goto_7
.end method
.method public isCompressed()Z
.registers 2
.prologue
.line 295
iget-boolean v0, p0, Lorg/spongycastle/math/ec/ECPoint;->withCompression:Z
return v0
.end method
.method public isInfinity()Z
.registers 3
.prologue
const/4 v0, 0x0
.line 287
iget-object v1, p0, Lorg/spongycastle/math/ec/ECPoint;->x:Lorg/spongycastle/math/ec/ECFieldElement;
if-eqz v1, :cond_18
iget-object v1, p0, Lorg/spongycastle/math/ec/ECPoint;->y:Lorg/spongycastle/math/ec/ECFieldElement;
if-eqz v1, :cond_18
iget-object v1, p0, Lorg/spongycastle/math/ec/ECPoint;->zs:[Lorg/spongycastle/math/ec/ECFieldElement;
array-length v1, v1
if-lez v1, :cond_19
iget-object v1, p0, Lorg/spongycastle/math/ec/ECPoint;->zs:[Lorg/spongycastle/math/ec/ECFieldElement;
aget-object v1, v1, v0
invoke-virtual {v1}, Lorg/spongycastle/math/ec/ECFieldElement;->isZero()Z
move-result v1
if-eqz v1, :cond_19
:cond_18
const/4 v0, 0x1
:cond_19
return v0
.end method
.method public isNormalized()Z
.registers 4
.prologue
const/4 v0, 0x0
.line 216
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getCurveCoordinateSystem()I
move-result v1
.line 218
if-eqz v1, :cond_1a
const/4 v2, 0x5
if-eq v1, v2, :cond_1a
.line 220
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->isInfinity()Z
move-result v1
if-nez v1, :cond_1a
iget-object v1, p0, Lorg/spongycastle/math/ec/ECPoint;->zs:[Lorg/spongycastle/math/ec/ECFieldElement;
aget-object v1, v1, v0
.line 221
invoke-virtual {v1}, Lorg/spongycastle/math/ec/ECFieldElement;->isOne()Z
move-result v1
if-eqz v1, :cond_1b
:cond_1a
const/4 v0, 0x1
:cond_1b
return v0
.end method
.method public isValid()Z
.registers 4
.prologue
const/4 v0, 0x1
const/4 v1, 0x0
.line 300
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->isInfinity()Z
move-result v2
if-eqz v2, :cond_9
.line 321
:cond_8
:goto_8
return v0
.line 307
:cond_9
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getCurve()Lorg/spongycastle/math/ec/ECCurve;
move-result-object v2
.line 308
if-eqz v2, :cond_8
.line 310
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->satisfiesCurveEquation()Z
move-result v2
if-nez v2, :cond_17
move v0, v1
.line 312
goto :goto_8
.line 315
:cond_17
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->satisfiesCofactor()Z
move-result v2
if-nez v2, :cond_8
move v0, v1
.line 317
goto :goto_8
.end method
.method public multiply(Ljava/math/BigInteger;)Lorg/spongycastle/math/ec/ECPoint;
.registers 3
.prologue
.line 525
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getCurve()Lorg/spongycastle/math/ec/ECCurve;
move-result-object v0
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECCurve;->getMultiplier()Lorg/spongycastle/math/ec/ECMultiplier;
move-result-object v0
invoke-interface {v0, p0, p1}, Lorg/spongycastle/math/ec/ECMultiplier;->multiply(Lorg/spongycastle/math/ec/ECPoint;Ljava/math/BigInteger;)Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
return-object v0
.end method
.method public abstract negate()Lorg/spongycastle/math/ec/ECPoint;
.end method
.method public normalize()Lorg/spongycastle/math/ec/ECPoint;
.registers 3
.prologue
.line 232
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->isInfinity()Z
move-result v0
if-eqz v0, :cond_7
.line 252
:cond_6
:goto_6
:sswitch_6
return-object p0
.line 237
:cond_7
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getCurveCoordinateSystem()I
move-result v0
sparse-switch v0, :sswitch_data_22
.line 246
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lorg/spongycastle/math/ec/ECPoint;->getZCoord(I)Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
.line 247
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECFieldElement;->isOne()Z
move-result v1
if-nez v1, :cond_6
.line 252
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECFieldElement;->invert()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
invoke-virtual {p0, v0}, Lorg/spongycastle/math/ec/ECPoint;->normalize(Lorg/spongycastle/math/ec/ECFieldElement;)Lorg/spongycastle/math/ec/ECPoint;
move-result-object p0
goto :goto_6
.line 237
:sswitch_data_22
.sparse-switch
0x0 -> :sswitch_6
0x5 -> :sswitch_6
.end sparse-switch
.end method
.method normalize(Lorg/spongycastle/math/ec/ECFieldElement;)Lorg/spongycastle/math/ec/ECPoint;
.registers 4
.prologue
.line 259
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getCurveCoordinateSystem()I
move-result v0
packed-switch v0, :pswitch_data_22
.line 275
:pswitch_7
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "not a projective coordinate system"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.line 264
:pswitch_f
invoke-virtual {p0, p1, p1}, Lorg/spongycastle/math/ec/ECPoint;->createScaledPoint(Lorg/spongycastle/math/ec/ECFieldElement;Lorg/spongycastle/math/ec/ECFieldElement;)Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
.line 271
:goto_13
return-object v0
.line 270
:pswitch_14
invoke-virtual {p1}, Lorg/spongycastle/math/ec/ECFieldElement;->square()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
invoke-virtual {v0, p1}, Lorg/spongycastle/math/ec/ECFieldElement;->multiply(Lorg/spongycastle/math/ec/ECFieldElement;)Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v1
.line 271
invoke-virtual {p0, v0, v1}, Lorg/spongycastle/math/ec/ECPoint;->createScaledPoint(Lorg/spongycastle/math/ec/ECFieldElement;Lorg/spongycastle/math/ec/ECFieldElement;)Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
goto :goto_13
.line 259
nop
:pswitch_data_22
.packed-switch 0x1
:pswitch_f
:pswitch_14
:pswitch_14
:pswitch_14
:pswitch_7
:pswitch_f
.end packed-switch
.end method
.method protected satisfiesCofactor()Z
.registers 3
.prologue
.line 69
iget-object v0, p0, Lorg/spongycastle/math/ec/ECPoint;->curve:Lorg/spongycastle/math/ec/ECCurve;
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECCurve;->getCofactor()Ljava/math/BigInteger;
move-result-object v0
.line 70
if-eqz v0, :cond_1a
sget-object v1, Lorg/spongycastle/math/ec/ECConstants;->ONE:Ljava/math/BigInteger;
invoke-virtual {v0, v1}, Ljava/math/BigInteger;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_1a
invoke-static {p0, v0}, Lorg/spongycastle/math/ec/ECAlgorithms;->referenceMultiply(Lorg/spongycastle/math/ec/ECPoint;Ljava/math/BigInteger;)Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
invoke-virtual {v0}, Lorg/spongycastle/math/ec/ECPoint;->isInfinity()Z
move-result v0
if-nez v0, :cond_1c
:cond_1a
const/4 v0, 0x1
:goto_1b
return v0
:cond_1c
const/4 v0, 0x0
goto :goto_1b
.end method
.method protected abstract satisfiesCurveEquation()Z
.end method
.method public scaleX(Lorg/spongycastle/math/ec/ECFieldElement;)Lorg/spongycastle/math/ec/ECPoint;
.registers 7
.prologue
.line 326
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->isInfinity()Z
move-result v0
if-eqz v0, :cond_7
.line 328
:goto_6
return-object p0
:cond_7
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getCurve()Lorg/spongycastle/math/ec/ECCurve;
move-result-object v0
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getRawXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v1
invoke-virtual {v1, p1}, Lorg/spongycastle/math/ec/ECFieldElement;->multiply(Lorg/spongycastle/math/ec/ECFieldElement;)Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v1
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getRawYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v2
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getRawZCoords()[Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v3
iget-boolean v4, p0, Lorg/spongycastle/math/ec/ECPoint;->withCompression:Z
invoke-virtual {v0, v1, v2, v3, v4}, Lorg/spongycastle/math/ec/ECCurve;->createRawPoint(Lorg/spongycastle/math/ec/ECFieldElement;Lorg/spongycastle/math/ec/ECFieldElement;[Lorg/spongycastle/math/ec/ECFieldElement;Z)Lorg/spongycastle/math/ec/ECPoint;
move-result-object p0
goto :goto_6
.end method
.method public scaleY(Lorg/spongycastle/math/ec/ECFieldElement;)Lorg/spongycastle/math/ec/ECPoint;
.registers 7
.prologue
.line 333
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->isInfinity()Z
move-result v0
if-eqz v0, :cond_7
.line 335
:goto_6
return-object p0
:cond_7
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getCurve()Lorg/spongycastle/math/ec/ECCurve;
move-result-object v0
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getRawXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v1
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getRawYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v2
invoke-virtual {v2, p1}, Lorg/spongycastle/math/ec/ECFieldElement;->multiply(Lorg/spongycastle/math/ec/ECFieldElement;)Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v2
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getRawZCoords()[Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v3
iget-boolean v4, p0, Lorg/spongycastle/math/ec/ECPoint;->withCompression:Z
invoke-virtual {v0, v1, v2, v3, v4}, Lorg/spongycastle/math/ec/ECCurve;->createRawPoint(Lorg/spongycastle/math/ec/ECFieldElement;Lorg/spongycastle/math/ec/ECFieldElement;[Lorg/spongycastle/math/ec/ECFieldElement;Z)Lorg/spongycastle/math/ec/ECPoint;
move-result-object p0
goto :goto_6
.end method
.method public abstract subtract(Lorg/spongycastle/math/ec/ECPoint;)Lorg/spongycastle/math/ec/ECPoint;
.end method
.method public threeTimes()Lorg/spongycastle/math/ec/ECPoint;
.registers 2
.prologue
.line 515
invoke-virtual {p0, p0}, Lorg/spongycastle/math/ec/ECPoint;->twicePlus(Lorg/spongycastle/math/ec/ECPoint;)Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
return-object v0
.end method
.method public timesPow2(I)Lorg/spongycastle/math/ec/ECPoint;
.registers 4
.prologue
.line 493
if-gez p1, :cond_a
.line 495
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "\'e\' cannot be negative"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.line 499
:cond_a
:goto_a
add-int/lit8 p1, p1, -0x1
if-ltz p1, :cond_13
.line 501
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->twice()Lorg/spongycastle/math/ec/ECPoint;
move-result-object p0
goto :goto_a
.line 503
:cond_13
return-object p0
.end method
.method public toString()Ljava/lang/String;
.registers 5
.prologue
const/16 v3, 0x2c
.line 422
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->isInfinity()Z
move-result v0
if-eqz v0, :cond_b
.line 424
const-string v0, "INF"
.line 438
:goto_a
return-object v0
.line 427
:cond_b
new-instance v1, Ljava/lang/StringBuffer;
invoke-direct {v1}, Ljava/lang/StringBuffer;-><init>()V
.line 428
const/16 v0, 0x28
invoke-virtual {v1, v0}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;
.line 429
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getRawXCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
invoke-virtual {v1, v0}, Ljava/lang/StringBuffer;->append(Ljava/lang/Object;)Ljava/lang/StringBuffer;
.line 430
invoke-virtual {v1, v3}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;
.line 431
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->getRawYCoord()Lorg/spongycastle/math/ec/ECFieldElement;
move-result-object v0
invoke-virtual {v1, v0}, Ljava/lang/StringBuffer;->append(Ljava/lang/Object;)Ljava/lang/StringBuffer;
.line 432
const/4 v0, 0x0
:goto_27
iget-object v2, p0, Lorg/spongycastle/math/ec/ECPoint;->zs:[Lorg/spongycastle/math/ec/ECFieldElement;
array-length v2, v2
if-ge v0, v2, :cond_39
.line 434
invoke-virtual {v1, v3}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;
.line 435
iget-object v2, p0, Lorg/spongycastle/math/ec/ECPoint;->zs:[Lorg/spongycastle/math/ec/ECFieldElement;
aget-object v2, v2, v0
invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/Object;)Ljava/lang/StringBuffer;
.line 432
add-int/lit8 v0, v0, 0x1
goto :goto_27
.line 437
:cond_39
const/16 v0, 0x29
invoke-virtual {v1, v0}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;
.line 438
invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;
move-result-object v0
goto :goto_a
.end method
.method public abstract twice()Lorg/spongycastle/math/ec/ECPoint;
.end method
.method public twicePlus(Lorg/spongycastle/math/ec/ECPoint;)Lorg/spongycastle/math/ec/ECPoint;
.registers 3
.prologue
.line 510
invoke-virtual {p0}, Lorg/spongycastle/math/ec/ECPoint;->twice()Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
invoke-virtual {v0, p1}, Lorg/spongycastle/math/ec/ECPoint;->add(Lorg/spongycastle/math/ec/ECPoint;)Lorg/spongycastle/math/ec/ECPoint;
move-result-object v0
return-object v0
.end method