public class org.bouncycastle.crypto.engines.RFC3211WrapEngine implements org.bouncycastle.crypto.Wrapper
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.bouncycastle.crypto.engines.RFC3211WrapEngine
super_class: java.lang.Object
{
private org.bouncycastle.crypto.modes.CBCBlockCipher engine;
descriptor: Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
flags: (0x0002) ACC_PRIVATE
private org.bouncycastle.crypto.params.ParametersWithIV param;
descriptor: Lorg/bouncycastle/crypto/params/ParametersWithIV;
flags: (0x0002) ACC_PRIVATE
private boolean forWrapping;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private java.security.SecureRandom rand;
descriptor: Ljava/security/SecureRandom;
flags: (0x0002) ACC_PRIVATE
public void <init>(org.bouncycastle.crypto.BlockCipher);
descriptor: (Lorg/bouncycastle/crypto/BlockCipher;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new org.bouncycastle.crypto.modes.CBCBlockCipher
dup
aload 1
invokespecial org.bouncycastle.crypto.modes.CBCBlockCipher.<init>:(Lorg/bouncycastle/crypto/BlockCipher;)V
putfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/bouncycastle/crypto/engines/RFC3211WrapEngine;
0 3 1 engine Lorg/bouncycastle/crypto/BlockCipher;
MethodParameters:
Name Flags
engine
public void init(boolean, org.bouncycastle.crypto.CipherParameters);
descriptor: (ZLorg/bouncycastle/crypto/CipherParameters;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
iload 1
putfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.forWrapping:Z
1: aload 2
instanceof org.bouncycastle.crypto.params.ParametersWithRandom
ifeq 6
2: aload 2
checkcast org.bouncycastle.crypto.params.ParametersWithRandom
astore 3
start local 3 3: aload 0
aload 3
invokevirtual org.bouncycastle.crypto.params.ParametersWithRandom.getRandom:()Ljava/security/SecureRandom;
putfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.rand:Ljava/security/SecureRandom;
4: aload 0
aload 3
invokevirtual org.bouncycastle.crypto.params.ParametersWithRandom.getParameters:()Lorg/bouncycastle/crypto/CipherParameters;
checkcast org.bouncycastle.crypto.params.ParametersWithIV
putfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.param:Lorg/bouncycastle/crypto/params/ParametersWithIV;
end local 3 5: goto 9
6: StackMap locals:
StackMap stack:
iload 1
ifeq 8
7: aload 0
new java.security.SecureRandom
dup
invokespecial java.security.SecureRandom.<init>:()V
putfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.rand:Ljava/security/SecureRandom;
8: StackMap locals:
StackMap stack:
aload 0
aload 2
checkcast org.bouncycastle.crypto.params.ParametersWithIV
putfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.param:Lorg/bouncycastle/crypto/params/ParametersWithIV;
9: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/bouncycastle/crypto/engines/RFC3211WrapEngine;
0 10 1 forWrapping Z
0 10 2 param Lorg/bouncycastle/crypto/CipherParameters;
3 5 3 p Lorg/bouncycastle/crypto/params/ParametersWithRandom;
MethodParameters:
Name Flags
forWrapping
param
public java.lang.String getAlgorithmName();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
invokevirtual org.bouncycastle.crypto.modes.CBCBlockCipher.getUnderlyingCipher:()Lorg/bouncycastle/crypto/BlockCipher;
invokeinterface org.bouncycastle.crypto.BlockCipher.getAlgorithmName:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "/RFC3211Wrap"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bouncycastle/crypto/engines/RFC3211WrapEngine;
public byte[] wrap(byte[], int, int);
descriptor: ([BII)[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=7, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.forWrapping:Z
ifne 2
1: new java.lang.IllegalStateException
dup
ldc "not set for wrapping"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
iconst_1
aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.param:Lorg/bouncycastle/crypto/params/ParametersWithIV;
invokevirtual org.bouncycastle.crypto.modes.CBCBlockCipher.init:(ZLorg/bouncycastle/crypto/CipherParameters;)V
3: aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
invokevirtual org.bouncycastle.crypto.modes.CBCBlockCipher.getBlockSize:()I
istore 4
start local 4 4: iload 3
iconst_4
iadd
iload 4
iconst_2
imul
if_icmpge 7
5: iload 4
iconst_2
imul
newarray 8
astore 5
start local 5 6: goto 10
end local 5 7: StackMap locals: int
StackMap stack:
iload 3
iconst_4
iadd
iload 4
irem
ifne 8
iload 3
iconst_4
iadd
goto 9
StackMap locals:
StackMap stack:
8: iload 3
iconst_4
iadd
iload 4
idiv
iconst_1
iadd
iload 4
imul
StackMap locals:
StackMap stack: int
9: newarray 8
astore 5
start local 5 10: StackMap locals: byte[]
StackMap stack:
aload 5
iconst_0
iload 3
i2b
bastore
11: aload 5
iconst_1
aload 1
iload 2
baload
iconst_m1
ixor
i2b
bastore
12: aload 5
iconst_2
aload 1
iload 2
iconst_1
iadd
baload
iconst_m1
ixor
i2b
bastore
13: aload 5
iconst_3
aload 1
iload 2
iconst_2
iadd
baload
iconst_m1
ixor
i2b
bastore
14: aload 1
iload 2
aload 5
iconst_4
iload 3
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
15: iload 3
iconst_4
iadd
istore 6
start local 6 16: goto 19
17: StackMap locals: int
StackMap stack:
aload 5
iload 6
aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.rand:Ljava/security/SecureRandom;
invokevirtual java.security.SecureRandom.nextInt:()I
i2b
bastore
18: iinc 6 1
StackMap locals:
StackMap stack:
19: iload 6
aload 5
arraylength
if_icmplt 17
end local 6 20: iconst_0
istore 6
start local 6 21: goto 24
22: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
aload 5
iload 6
aload 5
iload 6
invokevirtual org.bouncycastle.crypto.modes.CBCBlockCipher.processBlock:([BI[BI)I
pop
23: iload 6
iload 4
iadd
istore 6
StackMap locals:
StackMap stack:
24: iload 6
aload 5
arraylength
if_icmplt 22
end local 6 25: iconst_0
istore 6
start local 6 26: goto 29
27: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
aload 5
iload 6
aload 5
iload 6
invokevirtual org.bouncycastle.crypto.modes.CBCBlockCipher.processBlock:([BI[BI)I
pop
28: iload 6
iload 4
iadd
istore 6
StackMap locals:
StackMap stack:
29: iload 6
aload 5
arraylength
if_icmplt 27
end local 6 30: aload 5
areturn
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 31 0 this Lorg/bouncycastle/crypto/engines/RFC3211WrapEngine;
0 31 1 in [B
0 31 2 inOff I
0 31 3 inLen I
4 31 4 blockSize I
6 7 5 cekBlock [B
10 31 5 cekBlock [B
16 20 6 i I
21 25 6 i I
26 30 6 i I
MethodParameters:
Name Flags
in
inOff
inLen
public byte[] unwrap(byte[], int, int);
descriptor: ([BII)[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=11, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.forWrapping:Z
ifeq 2
1: new java.lang.IllegalStateException
dup
ldc "not set for unwrapping"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
invokevirtual org.bouncycastle.crypto.modes.CBCBlockCipher.getBlockSize:()I
istore 4
start local 4 3: iload 3
iconst_2
iload 4
imul
if_icmpge 5
4: new org.bouncycastle.crypto.InvalidCipherTextException
dup
ldc "input too short"
invokespecial org.bouncycastle.crypto.InvalidCipherTextException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals: int
StackMap stack:
iload 3
newarray 8
astore 5
start local 5 6: iload 4
newarray 8
astore 6
start local 6 7: aload 1
iload 2
aload 5
iconst_0
iload 3
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
8: aload 1
iload 2
aload 6
iconst_0
aload 6
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
9: aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
iconst_0
new org.bouncycastle.crypto.params.ParametersWithIV
dup
aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.param:Lorg/bouncycastle/crypto/params/ParametersWithIV;
invokevirtual org.bouncycastle.crypto.params.ParametersWithIV.getParameters:()Lorg/bouncycastle/crypto/CipherParameters;
aload 6
invokespecial org.bouncycastle.crypto.params.ParametersWithIV.<init>:(Lorg/bouncycastle/crypto/CipherParameters;[B)V
invokevirtual org.bouncycastle.crypto.modes.CBCBlockCipher.init:(ZLorg/bouncycastle/crypto/CipherParameters;)V
10: iload 4
istore 7
start local 7 11: goto 14
12: StackMap locals: byte[] byte[] int
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
aload 5
iload 7
aload 5
iload 7
invokevirtual org.bouncycastle.crypto.modes.CBCBlockCipher.processBlock:([BI[BI)I
pop
13: iload 7
iload 4
iadd
istore 7
StackMap locals:
StackMap stack:
14: iload 7
aload 5
arraylength
if_icmplt 12
end local 7 15: aload 5
aload 5
arraylength
aload 6
arraylength
isub
aload 6
iconst_0
aload 6
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
16: aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
iconst_0
new org.bouncycastle.crypto.params.ParametersWithIV
dup
aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.param:Lorg/bouncycastle/crypto/params/ParametersWithIV;
invokevirtual org.bouncycastle.crypto.params.ParametersWithIV.getParameters:()Lorg/bouncycastle/crypto/CipherParameters;
aload 6
invokespecial org.bouncycastle.crypto.params.ParametersWithIV.<init>:(Lorg/bouncycastle/crypto/CipherParameters;[B)V
invokevirtual org.bouncycastle.crypto.modes.CBCBlockCipher.init:(ZLorg/bouncycastle/crypto/CipherParameters;)V
17: aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
aload 5
iconst_0
aload 5
iconst_0
invokevirtual org.bouncycastle.crypto.modes.CBCBlockCipher.processBlock:([BI[BI)I
pop
18: aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
iconst_0
aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.param:Lorg/bouncycastle/crypto/params/ParametersWithIV;
invokevirtual org.bouncycastle.crypto.modes.CBCBlockCipher.init:(ZLorg/bouncycastle/crypto/CipherParameters;)V
19: iconst_0
istore 7
start local 7 20: goto 23
21: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.engines.RFC3211WrapEngine.engine:Lorg/bouncycastle/crypto/modes/CBCBlockCipher;
aload 5
iload 7
aload 5
iload 7
invokevirtual org.bouncycastle.crypto.modes.CBCBlockCipher.processBlock:([BI[BI)I
pop
22: iload 7
iload 4
iadd
istore 7
StackMap locals:
StackMap stack:
23: iload 7
aload 5
arraylength
if_icmplt 21
end local 7 24: aload 5
iconst_0
baload
sipush 255
iand
aload 5
arraylength
iconst_4
isub
if_icmple 26
25: new org.bouncycastle.crypto.InvalidCipherTextException
dup
ldc "wrapped key corrupted"
invokespecial org.bouncycastle.crypto.InvalidCipherTextException.<init>:(Ljava/lang/String;)V
athrow
26: StackMap locals:
StackMap stack:
aload 5
iconst_0
baload
sipush 255
iand
newarray 8
astore 7
start local 7 27: aload 5
iconst_4
aload 7
iconst_0
aload 5
iconst_0
baload
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
28: iconst_0
istore 8
start local 8 29: iconst_0
istore 9
start local 9 30: goto 34
31: StackMap locals: byte[] int int
StackMap stack:
aload 5
iconst_1
iload 9
iadd
baload
iconst_m1
ixor
i2b
istore 10
start local 10 32: iload 8
iload 10
aload 7
iload 9
baload
ixor
ior
istore 8
end local 10 33: iinc 9 1
StackMap locals:
StackMap stack:
34: iload 9
iconst_3
if_icmpne 31
end local 9 35: iload 8
ifeq 37
36: new org.bouncycastle.crypto.InvalidCipherTextException
dup
ldc "wrapped key fails checksum"
invokespecial org.bouncycastle.crypto.InvalidCipherTextException.<init>:(Ljava/lang/String;)V
athrow
37: StackMap locals:
StackMap stack:
aload 7
areturn
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 38 0 this Lorg/bouncycastle/crypto/engines/RFC3211WrapEngine;
0 38 1 in [B
0 38 2 inOff I
0 38 3 inLen I
3 38 4 blockSize I
6 38 5 cekBlock [B
7 38 6 iv [B
11 15 7 i I
20 24 7 i I
27 38 7 key [B
29 38 8 nonEqual I
30 35 9 i I
32 33 10 check B
Exceptions:
throws org.bouncycastle.crypto.InvalidCipherTextException
MethodParameters:
Name Flags
in
inOff
inLen
}
SourceFile: "RFC3211WrapEngine.java"