ChaChaEngine.smali
.class public Lorg/spongycastle/crypto/engines/ChaChaEngine;
.super Lorg/spongycastle/crypto/engines/Salsa20Engine;
.source "ChaChaEngine.java"
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 15
invoke-direct {p0}, Lorg/spongycastle/crypto/engines/Salsa20Engine;-><init>()V
.line 16
return-void
.end method
.method public constructor <init>(I)V
.registers 2
.prologue
.line 24
invoke-direct {p0, p1}, Lorg/spongycastle/crypto/engines/Salsa20Engine;-><init>(I)V
.line 25
return-void
.end method
.method public static chachaCore(I[I[I)V
.registers 22
.prologue
.line 175
move-object/from16 v0, p1
array-length v1, v0
const/16 v2, 0x10
if-eq v1, v2, :cond_d
.line 177
new-instance v1, Ljava/lang/IllegalArgumentException;
invoke-direct {v1}, Ljava/lang/IllegalArgumentException;-><init>()V
throw v1
.line 179
:cond_d
move-object/from16 v0, p2
array-length v1, v0
const/16 v2, 0x10
if-eq v1, v2, :cond_1a
.line 181
new-instance v1, Ljava/lang/IllegalArgumentException;
invoke-direct {v1}, Ljava/lang/IllegalArgumentException;-><init>()V
throw v1
.line 183
:cond_1a
rem-int/lit8 v1, p0, 0x2
if-eqz v1, :cond_26
.line 185
new-instance v1, Ljava/lang/IllegalArgumentException;
const-string v2, "Number of rounds must be even"
invoke-direct {v1, v2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v1
.line 188
:cond_26
const/4 v1, 0x0
aget v16, p1, v1
.line 189
const/4 v1, 0x1
aget v15, p1, v1
.line 190
const/4 v1, 0x2
aget v14, p1, v1
.line 191
const/4 v1, 0x3
aget v13, p1, v1
.line 192
const/4 v1, 0x4
aget v12, p1, v1
.line 193
const/4 v1, 0x5
aget v11, p1, v1
.line 194
const/4 v1, 0x6
aget v10, p1, v1
.line 195
const/4 v1, 0x7
aget v9, p1, v1
.line 196
const/16 v1, 0x8
aget v8, p1, v1
.line 197
const/16 v1, 0x9
aget v7, p1, v1
.line 198
const/16 v1, 0xa
aget v6, p1, v1
.line 199
const/16 v1, 0xb
aget v5, p1, v1
.line 200
const/16 v1, 0xc
aget v4, p1, v1
.line 201
const/16 v1, 0xd
aget v3, p1, v1
.line 202
const/16 v1, 0xe
aget v2, p1, v1
.line 203
const/16 v1, 0xf
aget v1, p1, v1
.line 205
:goto_5e
if-lez p0, :cond_1ac
.line 207
add-int v16, v16, v12
xor-int v4, v4, v16
const/16 v17, 0x10
move/from16 v0, v17
invoke-static {v4, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v4
.line 208
add-int/2addr v8, v4
xor-int/2addr v12, v8
const/16 v17, 0xc
move/from16 v0, v17
invoke-static {v12, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v12
.line 209
add-int v16, v16, v12
xor-int v4, v4, v16
const/16 v17, 0x8
move/from16 v0, v17
invoke-static {v4, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v4
.line 210
add-int/2addr v8, v4
xor-int/2addr v12, v8
const/16 v17, 0x7
move/from16 v0, v17
invoke-static {v12, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v12
.line 211
add-int/2addr v15, v11
xor-int/2addr v3, v15
const/16 v17, 0x10
move/from16 v0, v17
invoke-static {v3, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v3
.line 212
add-int/2addr v7, v3
xor-int/2addr v11, v7
const/16 v17, 0xc
move/from16 v0, v17
invoke-static {v11, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v11
.line 213
add-int/2addr v15, v11
xor-int/2addr v3, v15
const/16 v17, 0x8
move/from16 v0, v17
invoke-static {v3, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v3
.line 214
add-int/2addr v7, v3
xor-int/2addr v11, v7
const/16 v17, 0x7
move/from16 v0, v17
invoke-static {v11, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v11
.line 215
add-int/2addr v14, v10
xor-int/2addr v2, v14
const/16 v17, 0x10
move/from16 v0, v17
invoke-static {v2, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v2
.line 216
add-int/2addr v6, v2
xor-int/2addr v10, v6
const/16 v17, 0xc
move/from16 v0, v17
invoke-static {v10, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v10
.line 217
add-int/2addr v14, v10
xor-int/2addr v2, v14
const/16 v17, 0x8
move/from16 v0, v17
invoke-static {v2, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v2
.line 218
add-int/2addr v6, v2
xor-int/2addr v10, v6
const/16 v17, 0x7
move/from16 v0, v17
invoke-static {v10, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v10
.line 219
add-int/2addr v13, v9
xor-int/2addr v1, v13
const/16 v17, 0x10
move/from16 v0, v17
invoke-static {v1, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v1
.line 220
add-int/2addr v5, v1
xor-int/2addr v9, v5
const/16 v17, 0xc
move/from16 v0, v17
invoke-static {v9, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v9
.line 221
add-int/2addr v13, v9
xor-int/2addr v1, v13
const/16 v17, 0x8
move/from16 v0, v17
invoke-static {v1, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v1
.line 222
add-int/2addr v5, v1
xor-int/2addr v9, v5
const/16 v17, 0x7
move/from16 v0, v17
invoke-static {v9, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v9
.line 223
add-int v16, v16, v11
xor-int v1, v1, v16
const/16 v17, 0x10
move/from16 v0, v17
invoke-static {v1, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v1
.line 224
add-int/2addr v6, v1
xor-int/2addr v11, v6
const/16 v17, 0xc
move/from16 v0, v17
invoke-static {v11, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v11
.line 225
add-int v16, v16, v11
xor-int v1, v1, v16
const/16 v17, 0x8
move/from16 v0, v17
invoke-static {v1, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v1
.line 226
add-int/2addr v6, v1
xor-int/2addr v11, v6
const/16 v17, 0x7
move/from16 v0, v17
invoke-static {v11, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v11
.line 227
add-int/2addr v15, v10
xor-int/2addr v4, v15
const/16 v17, 0x10
move/from16 v0, v17
invoke-static {v4, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v4
.line 228
add-int/2addr v5, v4
xor-int/2addr v10, v5
const/16 v17, 0xc
move/from16 v0, v17
invoke-static {v10, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v10
.line 229
add-int/2addr v15, v10
xor-int/2addr v4, v15
const/16 v17, 0x8
move/from16 v0, v17
invoke-static {v4, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v4
.line 230
add-int/2addr v5, v4
xor-int/2addr v10, v5
const/16 v17, 0x7
move/from16 v0, v17
invoke-static {v10, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v10
.line 231
add-int/2addr v14, v9
xor-int/2addr v3, v14
const/16 v17, 0x10
move/from16 v0, v17
invoke-static {v3, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v3
.line 232
add-int/2addr v8, v3
xor-int/2addr v9, v8
const/16 v17, 0xc
move/from16 v0, v17
invoke-static {v9, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v9
.line 233
add-int/2addr v14, v9
xor-int/2addr v3, v14
const/16 v17, 0x8
move/from16 v0, v17
invoke-static {v3, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v3
.line 234
add-int/2addr v8, v3
xor-int/2addr v9, v8
const/16 v17, 0x7
move/from16 v0, v17
invoke-static {v9, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v9
.line 235
add-int/2addr v13, v12
xor-int/2addr v2, v13
const/16 v17, 0x10
move/from16 v0, v17
invoke-static {v2, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v2
.line 236
add-int/2addr v7, v2
xor-int/2addr v12, v7
const/16 v17, 0xc
move/from16 v0, v17
invoke-static {v12, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v12
.line 237
add-int/2addr v13, v12
xor-int/2addr v2, v13
const/16 v17, 0x8
move/from16 v0, v17
invoke-static {v2, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v2
.line 238
add-int/2addr v7, v2
xor-int/2addr v12, v7
const/16 v17, 0x7
move/from16 v0, v17
invoke-static {v12, v0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rotl(II)I
move-result v12
.line 205
add-int/lit8 p0, p0, -0x2
goto/16 :goto_5e
.line 242
:cond_1ac
const/16 v17, 0x0
const/16 v18, 0x0
aget v18, p1, v18
add-int v16, v16, v18
aput v16, p2, v17
.line 243
const/16 v16, 0x1
const/16 v17, 0x1
aget v17, p1, v17
add-int v15, v15, v17
aput v15, p2, v16
.line 244
const/4 v15, 0x2
const/16 v16, 0x2
aget v16, p1, v16
add-int v14, v14, v16
aput v14, p2, v15
.line 245
const/4 v14, 0x3
const/4 v15, 0x3
aget v15, p1, v15
add-int/2addr v13, v15
aput v13, p2, v14
.line 246
const/4 v13, 0x4
const/4 v14, 0x4
aget v14, p1, v14
add-int/2addr v12, v14
aput v12, p2, v13
.line 247
const/4 v12, 0x5
const/4 v13, 0x5
aget v13, p1, v13
add-int/2addr v11, v13
aput v11, p2, v12
.line 248
const/4 v11, 0x6
const/4 v12, 0x6
aget v12, p1, v12
add-int/2addr v10, v12
aput v10, p2, v11
.line 249
const/4 v10, 0x7
const/4 v11, 0x7
aget v11, p1, v11
add-int/2addr v9, v11
aput v9, p2, v10
.line 250
const/16 v9, 0x8
const/16 v10, 0x8
aget v10, p1, v10
add-int/2addr v8, v10
aput v8, p2, v9
.line 251
const/16 v8, 0x9
const/16 v9, 0x9
aget v9, p1, v9
add-int/2addr v7, v9
aput v7, p2, v8
.line 252
const/16 v7, 0xa
const/16 v8, 0xa
aget v8, p1, v8
add-int/2addr v6, v8
aput v6, p2, v7
.line 253
const/16 v6, 0xb
const/16 v7, 0xb
aget v7, p1, v7
add-int/2addr v5, v7
aput v5, p2, v6
.line 254
const/16 v5, 0xc
const/16 v6, 0xc
aget v6, p1, v6
add-int/2addr v4, v6
aput v4, p2, v5
.line 255
const/16 v4, 0xd
const/16 v5, 0xd
aget v5, p1, v5
add-int/2addr v3, v5
aput v3, p2, v4
.line 256
const/16 v3, 0xe
const/16 v4, 0xe
aget v4, p1, v4
add-int/2addr v2, v4
aput v2, p2, v3
.line 257
const/16 v2, 0xf
const/16 v3, 0xf
aget v3, p1, v3
add-int/2addr v1, v3
aput v1, p2, v2
.line 258
return-void
.end method
# virtual methods
.method protected advanceCounter()V
.registers 4
.prologue
.line 54
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/16 v1, 0xc
aget v2, v0, v1
add-int/lit8 v2, v2, 0x1
aput v2, v0, v1
if-nez v2, :cond_16
.line 56
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/16 v1, 0xd
aget v2, v0, v1
add-int/lit8 v2, v2, 0x1
aput v2, v0, v1
.line 58
:cond_16
return-void
.end method
.method protected advanceCounter(J)V
.registers 10
.prologue
const/16 v5, 0xd
const/16 v4, 0xc
.line 34
const/16 v0, 0x20
ushr-long v0, p1, v0
long-to-int v0, v0
.line 35
long-to-int v1, p1
.line 37
if-lez v0, :cond_13
.line 39
iget-object v2, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v3, v2, v5
add-int/2addr v0, v3
aput v0, v2, v5
.line 42
:cond_13
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v0, v0, v4
.line 44
iget-object v2, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v3, v2, v4
add-int/2addr v1, v3
aput v1, v2, v4
.line 46
if-eqz v0, :cond_2e
iget-object v1, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v1, v1, v4
if-ge v1, v0, :cond_2e
.line 48
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v1, v0, v5
add-int/lit8 v1, v1, 0x1
aput v1, v0, v5
.line 50
:cond_2e
return-void
.end method
.method protected generateKeyStream([B)V
.registers 5
.prologue
.line 164
iget v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rounds:I
iget-object v1, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
iget-object v2, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->x:[I
invoke-static {v0, v1, v2}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->chachaCore(I[I[I)V
.line 165
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->x:[I
const/4 v1, 0x0
invoke-static {v0, p1, v1}, Lorg/spongycastle/util/Pack;->intToLittleEndian([I[BI)V
.line 166
return-void
.end method
.method public getAlgorithmName()Ljava/lang/String;
.registers 3
.prologue
.line 29
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "ChaCha"
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
iget v1, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->rounds:I
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method protected getCounter()J
.registers 7
.prologue
.line 110
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/16 v1, 0xd
aget v0, v0, v1
int-to-long v0, v0
const/16 v2, 0x20
shl-long/2addr v0, v2
iget-object v2, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/16 v3, 0xc
aget v2, v2, v3
int-to-long v2, v2
const-wide v4, 0xffffffffL
and-long/2addr v2, v4
or-long/2addr v0, v2
return-wide v0
.end method
.method protected resetCounter()V
.registers 6
.prologue
.line 115
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/16 v1, 0xc
iget-object v2, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/16 v3, 0xd
const/4 v4, 0x0
aput v4, v2, v3
aput v4, v0, v1
.line 116
return-void
.end method
.method protected retreatCounter()V
.registers 5
.prologue
const/16 v3, 0xd
const/16 v2, 0xc
.line 97
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v0, v0, v2
if-nez v0, :cond_18
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v0, v0, v3
if-nez v0, :cond_18
.line 99
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "attempt to reduce counter past zero."
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.line 102
:cond_18
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v1, v0, v2
add-int/lit8 v1, v1, -0x1
aput v1, v0, v2
const/4 v0, -0x1
if-ne v1, v0, :cond_2b
.line 104
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v1, v0, v3
add-int/lit8 v1, v1, -0x1
aput v1, v0, v3
.line 106
:cond_2b
return-void
.end method
.method protected retreatCounter(J)V
.registers 14
.prologue
const/16 v7, 0xc
const-wide v8, 0xffffffffL
const/16 v6, 0xd
.line 62
const/16 v0, 0x20
ushr-long v0, p1, v0
long-to-int v0, v0
.line 63
long-to-int v1, p1
.line 65
if-eqz v0, :cond_25
.line 67
iget-object v2, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v2, v2, v6
int-to-long v2, v2
and-long/2addr v2, v8
int-to-long v4, v0
and-long/2addr v4, v8
cmp-long v2, v2, v4
if-ltz v2, :cond_3a
.line 69
iget-object v2, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v3, v2, v6
sub-int v0, v3, v0
aput v0, v2, v6
.line 77
:cond_25
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v0, v0, v7
int-to-long v2, v0
and-long/2addr v2, v8
int-to-long v4, v1
and-long/2addr v4, v8
cmp-long v0, v2, v4
if-ltz v0, :cond_42
.line 79
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v2, v0, v7
sub-int v1, v2, v1
aput v1, v0, v7
.line 86
:goto_39
return-void
.line 73
:cond_3a
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "attempt to reduce counter past zero."
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.line 83
:cond_42
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v0, v0, v6
if-eqz v0, :cond_59
.line 85
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v2, v0, v6
add-int/lit8 v2, v2, -0x1
aput v2, v0, v6
.line 86
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
aget v2, v0, v7
sub-int v1, v2, v1
aput v1, v0, v7
goto :goto_39
.line 90
:cond_59
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "attempt to reduce counter past zero."
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method protected setKey([B[B)V
.registers 12
.prologue
const/16 v0, 0x10
const/16 v8, 0xc
const/16 v7, 0x8
const/4 v6, 0x4
const/4 v1, 0x0
.line 120
if-eqz p1, :cond_a8
.line 122
array-length v2, p1
if-eq v2, v0, :cond_2f
array-length v2, p1
const/16 v3, 0x20
if-eq v2, v3, :cond_2f
.line 124
new-instance v0, Ljava/lang/IllegalArgumentException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p0}, Lorg/spongycastle/crypto/engines/ChaChaEngine;->getAlgorithmName()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, " requires 128 bit or 256 bit key"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.line 128
:cond_2f
iget-object v2, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
invoke-static {p1, v1}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v3
aput v3, v2, v6
.line 129
iget-object v2, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/4 v3, 0x5
invoke-static {p1, v6}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v4
aput v4, v2, v3
.line 130
iget-object v2, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/4 v3, 0x6
invoke-static {p1, v7}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v4
aput v4, v2, v3
.line 131
iget-object v2, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/4 v3, 0x7
invoke-static {p1, v8}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v4
aput v4, v2, v3
.line 135
array-length v2, p1
const/16 v3, 0x20
if-ne v2, v3, :cond_bd
.line 137
sget-object v2, Lorg/spongycastle/crypto/engines/ChaChaEngine;->sigma:[B
.line 146
:goto_59
iget-object v3, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
invoke-static {p1, v0}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v4
aput v4, v3, v7
.line 147
iget-object v3, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/16 v4, 0x9
add-int/lit8 v5, v0, 0x4
invoke-static {p1, v5}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v5
aput v5, v3, v4
.line 148
iget-object v3, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/16 v4, 0xa
add-int/lit8 v5, v0, 0x8
invoke-static {p1, v5}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v5
aput v5, v3, v4
.line 149
iget-object v3, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/16 v4, 0xb
add-int/lit8 v0, v0, 0xc
invoke-static {p1, v0}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v0
aput v0, v3, v4
.line 151
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
invoke-static {v2, v1}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v3
aput v3, v0, v1
.line 152
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/4 v3, 0x1
invoke-static {v2, v6}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v4
aput v4, v0, v3
.line 153
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/4 v3, 0x2
invoke-static {v2, v7}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v4
aput v4, v0, v3
.line 154
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/4 v3, 0x3
invoke-static {v2, v8}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v2
aput v2, v0, v3
.line 158
:cond_a8
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/16 v2, 0xe
invoke-static {p2, v1}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v1
aput v1, v0, v2
.line 159
iget-object v0, p0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->engineState:[I
const/16 v1, 0xf
invoke-static {p2, v6}, Lorg/spongycastle/util/Pack;->littleEndianToInt([BI)I
move-result v2
aput v2, v0, v1
.line 160
return-void
.line 142
:cond_bd
sget-object v0, Lorg/spongycastle/crypto/engines/ChaChaEngine;->tau:[B
move-object v2, v0
move v0, v1
.line 143
goto :goto_59
.end method