public class org.bouncycastle.crypto.engines.Grainv1Engine implements org.bouncycastle.crypto.StreamCipher
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.bouncycastle.crypto.engines.Grainv1Engine
super_class: java.lang.Object
{
private static final int STATE_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 5
private byte[] workingKey;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private byte[] workingIV;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private byte[] out;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private int[] lfsr;
descriptor: [I
flags: (0x0002) ACC_PRIVATE
private int[] nfsr;
descriptor: [I
flags: (0x0002) ACC_PRIVATE
private int output;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int index;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private boolean initialised;
descriptor: Z
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
iconst_2
putfield org.bouncycastle.crypto.engines.Grainv1Engine.index:I
2: aload 0
iconst_0
putfield org.bouncycastle.crypto.engines.Grainv1Engine.initialised:Z
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
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 "Grain v1"
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
public void init(boolean, org.bouncycastle.crypto.CipherParameters);
descriptor: (ZLorg/bouncycastle/crypto/CipherParameters;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 2
instanceof org.bouncycastle.crypto.params.ParametersWithIV
ifne 4
1: new java.lang.IllegalArgumentException
dup
2: ldc "Grain v1 Init parameters must include an IV"
3: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 2
checkcast org.bouncycastle.crypto.params.ParametersWithIV
astore 3
start local 3 5: aload 3
invokevirtual org.bouncycastle.crypto.params.ParametersWithIV.getIV:()[B
astore 4
start local 4 6: aload 4
ifnull 7
aload 4
arraylength
bipush 8
if_icmpeq 10
7: StackMap locals: org.bouncycastle.crypto.params.ParametersWithIV byte[]
StackMap stack:
new java.lang.IllegalArgumentException
dup
8: ldc "Grain v1 requires exactly 8 bytes of IV"
9: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
10: StackMap locals:
StackMap stack:
aload 3
invokevirtual org.bouncycastle.crypto.params.ParametersWithIV.getParameters:()Lorg/bouncycastle/crypto/CipherParameters;
instanceof org.bouncycastle.crypto.params.KeyParameter
ifne 14
11: new java.lang.IllegalArgumentException
dup
12: ldc "Grain v1 Init parameters must include a key"
13: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
14: StackMap locals:
StackMap stack:
aload 3
invokevirtual org.bouncycastle.crypto.params.ParametersWithIV.getParameters:()Lorg/bouncycastle/crypto/CipherParameters;
checkcast org.bouncycastle.crypto.params.KeyParameter
astore 5
start local 5 15: aload 0
aload 5
invokevirtual org.bouncycastle.crypto.params.KeyParameter.getKey:()[B
arraylength
newarray 8
putfield org.bouncycastle.crypto.engines.Grainv1Engine.workingIV:[B
16: aload 0
aload 5
invokevirtual org.bouncycastle.crypto.params.KeyParameter.getKey:()[B
arraylength
newarray 8
putfield org.bouncycastle.crypto.engines.Grainv1Engine.workingKey:[B
17: aload 0
iconst_5
newarray 10
putfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
18: aload 0
iconst_5
newarray 10
putfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
19: aload 0
iconst_2
newarray 8
putfield org.bouncycastle.crypto.engines.Grainv1Engine.out:[B
20: aload 4
iconst_0
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.workingIV:[B
iconst_0
aload 4
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
21: aload 5
invokevirtual org.bouncycastle.crypto.params.KeyParameter.getKey:()[B
iconst_0
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.workingKey:[B
iconst_0
aload 5
invokevirtual org.bouncycastle.crypto.params.KeyParameter.getKey:()[B
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
22: aload 0
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.workingKey:[B
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.workingIV:[B
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.setKey:([B[B)V
23: aload 0
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.initGrain:()V
24: 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 25 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
0 25 1 forEncryption Z
0 25 2 params Lorg/bouncycastle/crypto/CipherParameters;
5 25 3 ivParams Lorg/bouncycastle/crypto/params/ParametersWithIV;
6 25 4 iv [B
15 25 5 key Lorg/bouncycastle/crypto/params/KeyParameter;
Exceptions:
throws java.lang.IllegalArgumentException
MethodParameters:
Name Flags
forEncryption
params
private void initGrain();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=2, args_size=1
start local 0 0: iconst_0
istore 1
start local 1 1: goto 6
2: StackMap locals: int
StackMap stack:
aload 0
aload 0
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.getOutput:()I
putfield org.bouncycastle.crypto.engines.Grainv1Engine.output:I
3: aload 0
aload 0
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
aload 0
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.getOutputNFSR:()I
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_0
iaload
ixor
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.output:I
ixor
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.shift:([II)[I
putfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
4: aload 0
aload 0
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
aload 0
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.getOutputLFSR:()I
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.output:I
ixor
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.shift:([II)[I
putfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
5: iinc 1 1
StackMap locals:
StackMap stack:
6: iload 1
bipush 10
if_icmplt 2
end local 1 7: aload 0
iconst_1
putfield org.bouncycastle.crypto.engines.Grainv1Engine.initialised:Z
8: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
1 7 1 i I
private int getOutputNFSR();
descriptor: ()I
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=14, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_0
iaload
istore 1
start local 1 1: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_0
iaload
bipush 9
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_1
iaload
bipush 7
ishl
ior
istore 2
start local 2 2: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_0
iaload
bipush 14
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_1
iaload
iconst_2
ishl
ior
istore 3
start local 3 3: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_0
iaload
bipush 15
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_1
iaload
iconst_1
ishl
ior
istore 4
start local 4 4: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_1
iaload
iconst_5
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_2
iaload
bipush 11
ishl
ior
istore 5
start local 5 5: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_1
iaload
bipush 12
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_2
iaload
iconst_4
ishl
ior
istore 6
start local 6 6: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_2
iaload
iconst_1
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_3
iaload
bipush 15
ishl
ior
istore 7
start local 7 7: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_2
iaload
iconst_5
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_3
iaload
bipush 11
ishl
ior
istore 8
start local 8 8: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_2
iaload
bipush 13
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_3
iaload
iconst_3
ishl
ior
istore 9
start local 9 9: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_3
iaload
iconst_4
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_4
iaload
bipush 12
ishl
ior
istore 10
start local 10 10: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_3
iaload
bipush 12
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_4
iaload
iconst_4
ishl
ior
istore 11
start local 11 11: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_3
iaload
bipush 14
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_4
iaload
iconst_2
ishl
ior
istore 12
start local 12 12: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_3
iaload
bipush 15
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_4
iaload
iconst_1
ishl
ior
istore 13
start local 13 13: iload 12
iload 11
ixor
iload 10
ixor
iload 9
ixor
iload 8
ixor
iload 7
ixor
iload 6
ixor
iload 5
ixor
iload 3
ixor
14: iload 2
15: ixor
16: iload 1
17: ixor
18: iload 13
iload 11
iand
19: ixor
20: iload 8
iload 7
iand
21: ixor
22: iload 4
iload 2
iand
23: ixor
24: iload 11
iload 10
iand
iload 9
iand
25: ixor
26: iload 7
iload 6
iand
iload 5
iand
27: ixor
28: iload 13
iload 9
iand
iload 6
iand
iload 2
iand
29: ixor
30: iload 11
iload 10
iand
iload 8
iand
31: iload 7
32: iand
33: ixor
34: iload 13
iload 11
iand
iload 5
iand
iload 4
iand
35: ixor
36: iload 13
iload 11
iand
iload 10
iand
iload 9
iand
iload 8
iand
37: ixor
38: iload 7
iload 6
iand
iload 5
iand
iload 4
iand
iload 2
iand
39: ixor
40: iload 10
iload 9
iand
iload 8
iand
iload 7
iand
iload 6
iand
41: iload 5
42: iand
43: ixor
44: ldc 65535
45: iand
ireturn
end local 13 end local 12 end local 11 end local 10 end local 9 end local 8 end local 7 end local 6 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 46 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
1 46 1 b0 I
2 46 2 b9 I
3 46 3 b14 I
4 46 4 b15 I
5 46 5 b21 I
6 46 6 b28 I
7 46 7 b33 I
8 46 8 b37 I
9 46 9 b45 I
10 46 10 b52 I
11 46 11 b60 I
12 46 12 b62 I
13 46 13 b63 I
private int getOutputLFSR();
descriptor: ()I
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=7, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_0
iaload
istore 1
start local 1 1: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_0
iaload
bipush 13
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_1
iaload
iconst_3
ishl
ior
istore 2
start local 2 2: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_1
iaload
bipush 7
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_2
iaload
bipush 9
ishl
ior
istore 3
start local 3 3: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_2
iaload
bipush 6
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_3
iaload
bipush 10
ishl
ior
istore 4
start local 4 4: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_3
iaload
iconst_3
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_4
iaload
bipush 13
ishl
ior
istore 5
start local 5 5: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_3
iaload
bipush 14
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_4
iaload
iconst_2
ishl
ior
istore 6
start local 6 6: iload 1
iload 2
ixor
iload 3
ixor
iload 4
ixor
iload 5
ixor
iload 6
ixor
ldc 65535
iand
ireturn
end local 6 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 7 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
1 7 1 s0 I
2 7 2 s13 I
3 7 3 s23 I
4 7 4 s38 I
5 7 5 s51 I
6 7 6 s62 I
private int getOutput();
descriptor: ()I
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=13, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_0
iaload
iconst_1
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_1
iaload
bipush 15
ishl
ior
istore 1
start local 1 1: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_0
iaload
iconst_2
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_1
iaload
bipush 14
ishl
ior
istore 2
start local 2 2: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_0
iaload
iconst_4
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_1
iaload
bipush 12
ishl
ior
istore 3
start local 3 3: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_0
iaload
bipush 10
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_1
iaload
bipush 6
ishl
ior
istore 4
start local 4 4: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_1
iaload
bipush 15
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_2
iaload
iconst_1
ishl
ior
istore 5
start local 5 5: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_2
iaload
bipush 11
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_3
iaload
iconst_5
ishl
ior
istore 6
start local 6 6: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_3
iaload
bipush 8
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_4
iaload
bipush 8
ishl
ior
istore 7
start local 7 7: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_3
iaload
bipush 15
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iconst_4
iaload
iconst_1
ishl
ior
istore 8
start local 8 8: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_0
iaload
iconst_3
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_1
iaload
bipush 13
ishl
ior
istore 9
start local 9 9: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_1
iaload
bipush 9
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_2
iaload
bipush 7
ishl
ior
istore 10
start local 10 10: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_2
iaload
bipush 14
iushr
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_3
iaload
iconst_2
ishl
ior
istore 11
start local 11 11: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_4
iaload
istore 12
start local 12 12: iload 10
iload 8
ixor
iload 9
iload 12
iand
ixor
iload 11
iload 12
iand
ixor
iload 12
iload 8
iand
ixor
iload 9
13: iload 10
iand
iload 11
iand
14: ixor
15: iload 9
iload 11
iand
iload 12
iand
16: ixor
17: iload 9
iload 11
iand
iload 8
iand
18: ixor
19: iload 10
iload 11
iand
iload 8
iand
20: ixor
21: iload 11
22: iload 12
23: iand
24: iload 8
25: iand
26: ixor
27: iload 1
28: ixor
29: iload 2
30: ixor
31: iload 3
32: ixor
33: iload 4
34: ixor
35: iload 5
36: ixor
37: iload 6
38: ixor
39: iload 7
40: ixor
41: ldc 65535
42: iand
ireturn
end local 12 end local 11 end local 10 end local 9 end local 8 end local 7 end local 6 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 43 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
1 43 1 b1 I
2 43 2 b2 I
3 43 3 b4 I
4 43 4 b10 I
5 43 5 b31 I
6 43 6 b43 I
7 43 7 b56 I
8 43 8 b63 I
9 43 9 s3 I
10 43 10 s25 I
11 43 11 s46 I
12 43 12 s64 I
private int[] shift(int[], int);
descriptor: ([II)[I
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
iconst_0
aload 1
iconst_1
iaload
iastore
1: aload 1
iconst_1
aload 1
iconst_2
iaload
iastore
2: aload 1
iconst_2
aload 1
iconst_3
iaload
iastore
3: aload 1
iconst_3
aload 1
iconst_4
iaload
iastore
4: aload 1
iconst_4
iload 2
iastore
5: aload 1
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
0 6 1 array [I
0 6 2 val I
MethodParameters:
Name Flags
array
val
private void setKey(byte[], byte[]);
descriptor: ([B[B)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 2
bipush 8
iconst_m1
bastore
1: aload 2
bipush 9
iconst_m1
bastore
2: aload 0
aload 1
putfield org.bouncycastle.crypto.engines.Grainv1Engine.workingKey:[B
3: aload 0
aload 2
putfield org.bouncycastle.crypto.engines.Grainv1Engine.workingIV:[B
4: iconst_0
istore 3
start local 3 5: iconst_0
istore 4
start local 4 6: goto 11
7: StackMap locals: int int
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
iload 4
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.workingKey:[B
iload 3
iconst_1
iadd
baload
bipush 8
ishl
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.workingKey:[B
iload 3
baload
sipush 255
iand
ior
ldc 65535
iand
iastore
8: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iload 4
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.workingIV:[B
iload 3
iconst_1
iadd
baload
bipush 8
ishl
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.workingIV:[B
iload 3
baload
sipush 255
iand
ior
ldc 65535
iand
iastore
9: iinc 3 2
10: iinc 4 1
StackMap locals:
StackMap stack:
11: iload 4
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
arraylength
if_icmplt 7
end local 4 12: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
0 13 1 keyBytes [B
0 13 2 ivBytes [B
5 13 3 j I
6 12 4 i I
MethodParameters:
Name Flags
keyBytes
ivBytes
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.Grainv1Engine.initialised:Z
ifne 4
1: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
aload 0
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.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.Grainv1Engine.getKeyStream:()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/Grainv1Engine;
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=3, locals=1, args_size=1
start local 0 0: aload 0
iconst_2
putfield org.bouncycastle.crypto.engines.Grainv1Engine.index:I
1: aload 0
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.workingKey:[B
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.workingIV:[B
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.setKey:([B[B)V
2: aload 0
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.initGrain:()V
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
private void oneRound();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=1, args_size=1
start local 0 0: aload 0
aload 0
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.getOutput:()I
putfield org.bouncycastle.crypto.engines.Grainv1Engine.output:I
1: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.out:[B
iconst_0
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.output:I
i2b
bastore
2: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.out:[B
iconst_1
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.output:I
bipush 8
ishr
i2b
bastore
3: aload 0
aload 0
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
aload 0
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.getOutputNFSR:()I
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
iconst_0
iaload
ixor
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.shift:([II)[I
putfield org.bouncycastle.crypto.engines.Grainv1Engine.nfsr:[I
4: aload 0
aload 0
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
aload 0
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.getOutputLFSR:()I
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.shift:([II)[I
putfield org.bouncycastle.crypto.engines.Grainv1Engine.lfsr:[I
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
public byte returnByte(byte);
descriptor: (B)B
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.initialised:Z
ifne 4
1: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
aload 0
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.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 1
aload 0
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.getKeyStream:()B
ixor
i2b
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
0 5 1 in B
MethodParameters:
Name Flags
in
private byte getKeyStream();
descriptor: ()B
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.index:I
iconst_1
if_icmple 3
1: aload 0
invokevirtual org.bouncycastle.crypto.engines.Grainv1Engine.oneRound:()V
2: aload 0
iconst_0
putfield org.bouncycastle.crypto.engines.Grainv1Engine.index:I
3: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.Grainv1Engine.out:[B
aload 0
dup
getfield org.bouncycastle.crypto.engines.Grainv1Engine.index:I
dup_x1
iconst_1
iadd
putfield org.bouncycastle.crypto.engines.Grainv1Engine.index:I
baload
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/bouncycastle/crypto/engines/Grainv1Engine;
}
SourceFile: "Grainv1Engine.java"