public class org.bouncycastle.crypto.engines.HC256Engine implements org.bouncycastle.crypto.StreamCipher
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.bouncycastle.crypto.engines.HC256Engine
super_class: java.lang.Object
{
private int[] p;
descriptor: [I
flags: (0x0002) ACC_PRIVATE
private int[] q;
descriptor: [I
flags: (0x0002) ACC_PRIVATE
private int cnt;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private byte[] key;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private byte[] iv;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private boolean initialised;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private byte[] buf;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private int idx;
descriptor: I
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
sipush 1024
newarray 10
putfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
2: aload 0
sipush 1024
newarray 10
putfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
3: aload 0
iconst_0
putfield org.bouncycastle.crypto.engines.HC256Engine.cnt:I
4: aload 0
iconst_4
newarray 8
putfield org.bouncycastle.crypto.engines.HC256Engine.buf:[B
5: aload 0
iconst_0
putfield org.bouncycastle.crypto.engines.HC256Engine.idx:I
6: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/bouncycastle/crypto/engines/HC256Engine;
private int step();
descriptor: ()I
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=5, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.cnt:I
sipush 1023
iand
istore 1
start local 1 1: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.cnt:I
sipush 1024
if_icmpge 17
2: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
iload 1
iconst_3
isub
sipush 1023
iand
iaload
istore 3
start local 3 3: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
iload 1
sipush 1023
isub
sipush 1023
iand
iaload
istore 4
start local 4 4: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
iload 1
dup2
iaload
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
iload 1
bipush 10
isub
sipush 1023
iand
iaload
5: iload 3
bipush 10
invokestatic org.bouncycastle.crypto.engines.HC256Engine.rotateRight:(II)I
iload 4
bipush 23
invokestatic org.bouncycastle.crypto.engines.HC256Engine.rotateRight:(II)I
ixor
iadd
6: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
iload 3
iload 4
ixor
sipush 1023
iand
iaload
iadd
7: iadd
iastore
8: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
iload 1
bipush 12
isub
sipush 1023
iand
iaload
istore 3
9: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
iload 3
sipush 255
iand
iaload
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
iload 3
bipush 8
ishr
sipush 255
iand
sipush 256
iadd
iaload
iadd
10: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
iload 3
bipush 16
ishr
sipush 255
iand
sipush 512
iadd
iaload
11: iadd
12: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
iload 3
bipush 24
ishr
sipush 255
iand
sipush 768
iadd
iaload
13: iadd
14: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
iload 1
iaload
15: ixor
istore 2
end local 4 end local 3 start local 2 16: goto 31
end local 2 17: StackMap locals: int
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
iload 1
iconst_3
isub
sipush 1023
iand
iaload
istore 3
start local 3 18: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
iload 1
sipush 1023
isub
sipush 1023
iand
iaload
istore 4
start local 4 19: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
iload 1
dup2
iaload
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
iload 1
bipush 10
isub
sipush 1023
iand
iaload
20: iload 3
bipush 10
invokestatic org.bouncycastle.crypto.engines.HC256Engine.rotateRight:(II)I
iload 4
bipush 23
invokestatic org.bouncycastle.crypto.engines.HC256Engine.rotateRight:(II)I
ixor
iadd
21: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
iload 3
iload 4
ixor
sipush 1023
iand
iaload
iadd
22: iadd
iastore
23: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
iload 1
bipush 12
isub
sipush 1023
iand
iaload
istore 3
24: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
iload 3
sipush 255
iand
iaload
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
iload 3
bipush 8
ishr
sipush 255
iand
sipush 256
iadd
iaload
iadd
25: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
iload 3
bipush 16
ishr
sipush 255
iand
sipush 512
iadd
iaload
26: iadd
27: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
iload 3
bipush 24
ishr
sipush 255
iand
sipush 768
iadd
iaload
28: iadd
29: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
iload 1
iaload
30: ixor
istore 2
end local 4 end local 3 start local 2 31: StackMap locals: int
StackMap stack:
aload 0
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.cnt:I
iconst_1
iadd
sipush 2047
iand
putfield org.bouncycastle.crypto.engines.HC256Engine.cnt:I
32: iload 2
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 33 0 this Lorg/bouncycastle/crypto/engines/HC256Engine;
1 33 1 j I
16 17 2 ret I
31 33 2 ret I
3 16 3 x I
4 16 4 y I
18 31 3 x I
19 31 4 y I
private void init();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=5, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.key:[B
arraylength
bipush 32
if_icmpeq 4
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.key:[B
arraylength
bipush 16
if_icmpeq 4
1: new java.lang.IllegalArgumentException
dup
2: ldc "The key must be 128/256 bits long"
3: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.iv:[B
arraylength
bipush 16
if_icmpge 8
5: new java.lang.IllegalArgumentException
dup
6: ldc "The IV must be at least 128 bits long"
7: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.key:[B
arraylength
bipush 32
if_icmpeq 13
9: bipush 32
newarray 8
astore 1
start local 1 10: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.key:[B
iconst_0
aload 1
iconst_0
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.key:[B
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
11: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.key:[B
iconst_0
aload 1
bipush 16
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.key:[B
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
12: aload 0
aload 1
putfield org.bouncycastle.crypto.engines.HC256Engine.key:[B
end local 1 13: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.iv:[B
arraylength
bipush 32
if_icmpge 18
14: bipush 32
newarray 8
astore 1
start local 1 15: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.iv:[B
iconst_0
aload 1
iconst_0
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.iv:[B
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
16: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.iv:[B
iconst_0
aload 1
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.iv:[B
arraylength
aload 1
arraylength
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.iv:[B
arraylength
isub
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
17: aload 0
aload 1
putfield org.bouncycastle.crypto.engines.HC256Engine.iv:[B
end local 1 18: StackMap locals:
StackMap stack:
aload 0
iconst_0
putfield org.bouncycastle.crypto.engines.HC256Engine.cnt:I
19: sipush 2560
newarray 10
astore 1
start local 1 20: iconst_0
istore 2
start local 2 21: goto 24
22: StackMap locals: int[] int
StackMap stack:
aload 1
iload 2
iconst_2
ishr
dup2
iaload
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.key:[B
iload 2
baload
sipush 255
iand
bipush 8
iload 2
iconst_3
iand
imul
ishl
ior
iastore
23: iinc 2 1
StackMap locals:
StackMap stack:
24: iload 2
bipush 32
if_icmplt 22
end local 2 25: iconst_0
istore 2
start local 2 26: goto 29
27: StackMap locals:
StackMap stack:
aload 1
iload 2
iconst_2
ishr
bipush 8
iadd
dup2
iaload
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.iv:[B
iload 2
baload
sipush 255
iand
bipush 8
iload 2
iconst_3
iand
imul
ishl
ior
iastore
28: iinc 2 1
StackMap locals:
StackMap stack:
29: iload 2
bipush 32
if_icmplt 27
end local 2 30: bipush 16
istore 2
start local 2 31: goto 40
32: StackMap locals:
StackMap stack:
aload 1
iload 2
iconst_2
isub
iaload
istore 3
start local 3 33: aload 1
iload 2
bipush 15
isub
iaload
istore 4
start local 4 34: aload 1
iload 2
iload 3
bipush 17
invokestatic org.bouncycastle.crypto.engines.HC256Engine.rotateRight:(II)I
iload 3
bipush 19
invokestatic org.bouncycastle.crypto.engines.HC256Engine.rotateRight:(II)I
ixor
iload 3
bipush 10
iushr
ixor
35: aload 1
iload 2
bipush 7
isub
iaload
iadd
36: iload 4
bipush 7
invokestatic org.bouncycastle.crypto.engines.HC256Engine.rotateRight:(II)I
iload 4
bipush 18
invokestatic org.bouncycastle.crypto.engines.HC256Engine.rotateRight:(II)I
ixor
iload 4
iconst_3
iushr
ixor
iadd
37: aload 1
iload 2
bipush 16
isub
iaload
iadd
iload 2
iadd
38: iastore
end local 4 end local 3 39: iinc 2 1
StackMap locals:
StackMap stack:
40: iload 2
sipush 2560
if_icmplt 32
end local 2 41: aload 1
sipush 512
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.p:[I
iconst_0
sipush 1024
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
42: aload 1
sipush 1536
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.q:[I
iconst_0
sipush 1024
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
43: iconst_0
istore 2
start local 2 44: goto 47
45: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.bouncycastle.crypto.engines.HC256Engine.step:()I
pop
46: iinc 2 1
StackMap locals:
StackMap stack:
47: iload 2
sipush 4096
if_icmplt 45
end local 2 48: aload 0
iconst_0
putfield org.bouncycastle.crypto.engines.HC256Engine.cnt:I
49: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 50 0 this Lorg/bouncycastle/crypto/engines/HC256Engine;
10 13 1 k [B
15 18 1 newIV [B
20 50 1 w [I
21 25 2 i I
26 30 2 i I
31 41 2 i I
33 39 3 x I
34 39 4 y I
44 48 2 i I
public java.lang.String getAlgorithmName();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: ldc "HC-256"
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bouncycastle/crypto/engines/HC256Engine;
public void init(boolean, org.bouncycastle.crypto.CipherParameters);
descriptor: (ZLorg/bouncycastle/crypto/CipherParameters;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 2
astore 3
start local 3 1: aload 2
instanceof org.bouncycastle.crypto.params.ParametersWithIV
ifeq 5
2: aload 0
aload 2
checkcast org.bouncycastle.crypto.params.ParametersWithIV
invokevirtual org.bouncycastle.crypto.params.ParametersWithIV.getIV:()[B
putfield org.bouncycastle.crypto.engines.HC256Engine.iv:[B
3: aload 2
checkcast org.bouncycastle.crypto.params.ParametersWithIV
invokevirtual org.bouncycastle.crypto.params.ParametersWithIV.getParameters:()Lorg/bouncycastle/crypto/CipherParameters;
astore 3
4: goto 6
5: StackMap locals: org.bouncycastle.crypto.CipherParameters
StackMap stack:
aload 0
iconst_0
newarray 8
putfield org.bouncycastle.crypto.engines.HC256Engine.iv:[B
6: StackMap locals:
StackMap stack:
aload 3
instanceof org.bouncycastle.crypto.params.KeyParameter
ifeq 10
7: aload 0
aload 3
checkcast org.bouncycastle.crypto.params.KeyParameter
invokevirtual org.bouncycastle.crypto.params.KeyParameter.getKey:()[B
putfield org.bouncycastle.crypto.engines.HC256Engine.key:[B
8: aload 0
invokevirtual org.bouncycastle.crypto.engines.HC256Engine.init:()V
9: goto 15
10: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
11: new java.lang.StringBuilder
dup
ldc "Invalid parameter passed to HC256 init - "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
12: aload 2
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
13: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
14: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
15: StackMap locals:
StackMap stack:
aload 0
iconst_1
putfield org.bouncycastle.crypto.engines.HC256Engine.initialised:Z
16: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lorg/bouncycastle/crypto/engines/HC256Engine;
0 17 1 forEncryption Z
0 17 2 params Lorg/bouncycastle/crypto/CipherParameters;
1 17 3 keyParam Lorg/bouncycastle/crypto/CipherParameters;
Exceptions:
throws java.lang.IllegalArgumentException
MethodParameters:
Name Flags
forEncryption
params
private byte getByte();
descriptor: ()B
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.idx:I
ifne 9
1: aload 0
invokevirtual org.bouncycastle.crypto.engines.HC256Engine.step:()I
istore 1
start local 1 2: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.buf:[B
iconst_0
iload 1
sipush 255
iand
i2b
bastore
3: iload 1
bipush 8
ishr
istore 1
4: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.buf:[B
iconst_1
iload 1
sipush 255
iand
i2b
bastore
5: iload 1
bipush 8
ishr
istore 1
6: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.buf:[B
iconst_2
iload 1
sipush 255
iand
i2b
bastore
7: iload 1
bipush 8
ishr
istore 1
8: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.buf:[B
iconst_3
iload 1
sipush 255
iand
i2b
bastore
end local 1 9: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.buf:[B
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.idx:I
baload
istore 1
start local 1 10: aload 0
aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.idx:I
iconst_1
iadd
iconst_3
iand
putfield org.bouncycastle.crypto.engines.HC256Engine.idx:I
11: iload 1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/bouncycastle/crypto/engines/HC256Engine;
2 9 1 step I
10 12 1 ret B
public void processBytes(byte[], int, int, byte[], int);
descriptor: ([BII[BI)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=7, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
getfield org.bouncycastle.crypto.engines.HC256Engine.initialised:Z
ifne 4
1: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
aload 0
invokevirtual org.bouncycastle.crypto.engines.HC256Engine.getAlgorithmName:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
2: ldc " not initialised"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
3: invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
iload 2
iload 3
iadd
aload 1
arraylength
if_icmple 6
5: new org.bouncycastle.crypto.DataLengthException
dup
ldc "input buffer too short"
invokespecial org.bouncycastle.crypto.DataLengthException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
iload 5
iload 3
iadd
aload 4
arraylength
if_icmple 8
7: new org.bouncycastle.crypto.DataLengthException
dup
ldc "output buffer too short"
invokespecial org.bouncycastle.crypto.DataLengthException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
iconst_0
istore 6
start local 6 9: goto 12
10: StackMap locals: int
StackMap stack:
aload 4
iload 5
iload 6
iadd
aload 1
iload 2
iload 6
iadd
baload
aload 0
invokevirtual org.bouncycastle.crypto.engines.HC256Engine.getByte:()B
ixor
i2b
bastore
11: iinc 6 1
StackMap locals:
StackMap stack:
12: iload 6
iload 3
if_icmplt 10
end local 6 13: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/bouncycastle/crypto/engines/HC256Engine;
0 14 1 in [B
0 14 2 inOff I
0 14 3 len I
0 14 4 out [B
0 14 5 outOff I
9 13 6 i I
Exceptions:
throws org.bouncycastle.crypto.DataLengthException
MethodParameters:
Name Flags
in
inOff
len
out
outOff
public void reset();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_0
putfield org.bouncycastle.crypto.engines.HC256Engine.idx:I
1: aload 0
invokevirtual org.bouncycastle.crypto.engines.HC256Engine.init:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/bouncycastle/crypto/engines/HC256Engine;
public byte returnByte(byte);
descriptor: (B)B
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: iload 1
aload 0
invokevirtual org.bouncycastle.crypto.engines.HC256Engine.getByte:()B
ixor
i2b
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bouncycastle/crypto/engines/HC256Engine;
0 1 1 in B
MethodParameters:
Name Flags
in
private static int rotateRight(int, int);
descriptor: (II)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: iload 0
iload 1
iushr
iload 0
iload 1
ineg
ishl
ior
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 x I
0 1 1 bits I
MethodParameters:
Name Flags
x
bits
}
SourceFile: "HC256Engine.java"