public class org.bouncycastle.crypto.encodings.PKCS1Encoding implements org.bouncycastle.crypto.AsymmetricBlockCipher
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.bouncycastle.crypto.encodings.PKCS1Encoding
super_class: java.lang.Object
{
public static final java.lang.String STRICT_LENGTH_ENABLED_PROPERTY;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: "org.bouncycastle.pkcs1.strict"
private static final int ;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 10
private java.security.SecureRandom random;
descriptor: Ljava/security/SecureRandom;
flags: (0x0002) ACC_PRIVATE
private org.bouncycastle.crypto.AsymmetricBlockCipher engine;
descriptor: Lorg/bouncycastle/crypto/AsymmetricBlockCipher;
flags: (0x0002) ACC_PRIVATE
private boolean forEncryption;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private boolean forPrivateKey;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private boolean useStrictLength;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
public void <init>(org.bouncycastle.crypto.AsymmetricBlockCipher);
descriptor: (Lorg/bouncycastle/crypto/AsymmetricBlockCipher;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield org.bouncycastle.crypto.encodings.PKCS1Encoding.engine:Lorg/bouncycastle/crypto/AsymmetricBlockCipher;
2: aload 0
aload 0
invokevirtual org.bouncycastle.crypto.encodings.PKCS1Encoding.useStrict:()Z
putfield org.bouncycastle.crypto.encodings.PKCS1Encoding.useStrictLength:Z
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/bouncycastle/crypto/encodings/PKCS1Encoding;
0 4 1 cipher Lorg/bouncycastle/crypto/AsymmetricBlockCipher;
MethodParameters:
Name Flags
cipher
private boolean useStrict();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=1
start local 0 0: new org.bouncycastle.crypto.encodings.PKCS1Encoding$1
dup
aload 0
invokespecial org.bouncycastle.crypto.encodings.PKCS1Encoding$1.<init>:(Lorg/bouncycastle/crypto/encodings/PKCS1Encoding;)V
invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedAction;)Ljava/lang/Object;
checkcast java.lang.String
astore 1
start local 1 1: aload 1
ifnull 2
aload 1
ldc "true"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 2
iconst_0
ireturn
StackMap locals: java.lang.String
StackMap stack:
2: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/bouncycastle/crypto/encodings/PKCS1Encoding;
1 3 1 strict Ljava/lang/String;
public org.bouncycastle.crypto.AsymmetricBlockCipher getUnderlyingCipher();
descriptor: ()Lorg/bouncycastle/crypto/AsymmetricBlockCipher;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.engine:Lorg/bouncycastle/crypto/AsymmetricBlockCipher;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bouncycastle/crypto/encodings/PKCS1Encoding;
public void init(boolean, org.bouncycastle.crypto.CipherParameters);
descriptor: (ZLorg/bouncycastle/crypto/CipherParameters;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 2
instanceof org.bouncycastle.crypto.params.ParametersWithRandom
ifeq 5
1: aload 2
checkcast org.bouncycastle.crypto.params.ParametersWithRandom
astore 4
start local 4 2: aload 0
aload 4
invokevirtual org.bouncycastle.crypto.params.ParametersWithRandom.getRandom:()Ljava/security/SecureRandom;
putfield org.bouncycastle.crypto.encodings.PKCS1Encoding.random:Ljava/security/SecureRandom;
3: aload 4
invokevirtual org.bouncycastle.crypto.params.ParametersWithRandom.getParameters:()Lorg/bouncycastle/crypto/CipherParameters;
checkcast org.bouncycastle.crypto.params.AsymmetricKeyParameter
astore 3
end local 4 start local 3 4: goto 7
end local 3 5: StackMap locals:
StackMap stack:
aload 0
new java.security.SecureRandom
dup
invokespecial java.security.SecureRandom.<init>:()V
putfield org.bouncycastle.crypto.encodings.PKCS1Encoding.random:Ljava/security/SecureRandom;
6: aload 2
checkcast org.bouncycastle.crypto.params.AsymmetricKeyParameter
astore 3
start local 3 7: StackMap locals: org.bouncycastle.crypto.params.AsymmetricKeyParameter
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.engine:Lorg/bouncycastle/crypto/AsymmetricBlockCipher;
iload 1
aload 2
invokeinterface org.bouncycastle.crypto.AsymmetricBlockCipher.init:(ZLorg/bouncycastle/crypto/CipherParameters;)V
8: aload 0
aload 3
invokevirtual org.bouncycastle.crypto.params.AsymmetricKeyParameter.isPrivate:()Z
putfield org.bouncycastle.crypto.encodings.PKCS1Encoding.forPrivateKey:Z
9: aload 0
iload 1
putfield org.bouncycastle.crypto.encodings.PKCS1Encoding.forEncryption:Z
10: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/bouncycastle/crypto/encodings/PKCS1Encoding;
0 11 1 forEncryption Z
0 11 2 param Lorg/bouncycastle/crypto/CipherParameters;
4 5 3 kParam Lorg/bouncycastle/crypto/params/AsymmetricKeyParameter;
7 11 3 kParam Lorg/bouncycastle/crypto/params/AsymmetricKeyParameter;
2 4 4 rParam Lorg/bouncycastle/crypto/params/ParametersWithRandom;
MethodParameters:
Name Flags
forEncryption
param
public int getInputBlockSize();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.engine:Lorg/bouncycastle/crypto/AsymmetricBlockCipher;
invokeinterface org.bouncycastle.crypto.AsymmetricBlockCipher.getInputBlockSize:()I
istore 1
start local 1 1: aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.forEncryption:Z
ifeq 3
2: iload 1
bipush 10
isub
ireturn
3: StackMap locals: int
StackMap stack:
iload 1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/bouncycastle/crypto/encodings/PKCS1Encoding;
1 4 1 baseBlockSize I
public int getOutputBlockSize();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.engine:Lorg/bouncycastle/crypto/AsymmetricBlockCipher;
invokeinterface org.bouncycastle.crypto.AsymmetricBlockCipher.getOutputBlockSize:()I
istore 1
start local 1 1: aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.forEncryption:Z
ifeq 3
2: iload 1
ireturn
3: StackMap locals: int
StackMap stack:
iload 1
bipush 10
isub
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/bouncycastle/crypto/encodings/PKCS1Encoding;
1 4 1 baseBlockSize I
public byte[] processBlock(byte[], int, int);
descriptor: ([BII)[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.forEncryption:Z
ifeq 2
1: aload 0
aload 1
iload 2
iload 3
invokevirtual org.bouncycastle.crypto.encodings.PKCS1Encoding.encodeBlock:([BII)[B
areturn
2: StackMap locals:
StackMap stack:
aload 0
aload 1
iload 2
iload 3
invokevirtual org.bouncycastle.crypto.encodings.PKCS1Encoding.decodeBlock:([BII)[B
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/bouncycastle/crypto/encodings/PKCS1Encoding;
0 3 1 in [B
0 3 2 inOff I
0 3 3 inLen I
Exceptions:
throws org.bouncycastle.crypto.InvalidCipherTextException
MethodParameters:
Name Flags
in
inOff
inLen
private byte[] encodeBlock(byte[], int, int);
descriptor: ([BII)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: iload 3
aload 0
invokevirtual org.bouncycastle.crypto.encodings.PKCS1Encoding.getInputBlockSize:()I
if_icmple 2
1: new java.lang.IllegalArgumentException
dup
ldc "input data too large"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.engine:Lorg/bouncycastle/crypto/AsymmetricBlockCipher;
invokeinterface org.bouncycastle.crypto.AsymmetricBlockCipher.getInputBlockSize:()I
newarray 8
astore 4
start local 4 3: aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.forPrivateKey:Z
ifeq 11
4: aload 4
iconst_0
iconst_1
bastore
5: iconst_1
istore 5
start local 5 6: goto 9
7: StackMap locals: byte[] int
StackMap stack:
aload 4
iload 5
iconst_m1
bastore
8: iinc 5 1
StackMap locals:
StackMap stack:
9: iload 5
aload 4
arraylength
iload 3
isub
iconst_1
isub
if_icmpne 7
end local 5 10: goto 19
11: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.random:Ljava/security/SecureRandom;
aload 4
invokevirtual java.security.SecureRandom.nextBytes:([B)V
12: aload 4
iconst_0
iconst_2
bastore
13: iconst_1
istore 5
start local 5 14: goto 18
15: StackMap locals: int
StackMap stack:
aload 4
iload 5
aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.random:Ljava/security/SecureRandom;
invokevirtual java.security.SecureRandom.nextInt:()I
i2b
bastore
16: StackMap locals:
StackMap stack:
aload 4
iload 5
baload
ifeq 15
17: iinc 5 1
StackMap locals:
StackMap stack:
18: iload 5
aload 4
arraylength
iload 3
isub
iconst_1
isub
if_icmpne 16
end local 5 19: StackMap locals:
StackMap stack:
aload 4
aload 4
arraylength
iload 3
isub
iconst_1
isub
iconst_0
bastore
20: aload 1
iload 2
aload 4
aload 4
arraylength
iload 3
isub
iload 3
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
21: aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.engine:Lorg/bouncycastle/crypto/AsymmetricBlockCipher;
aload 4
iconst_0
aload 4
arraylength
invokeinterface org.bouncycastle.crypto.AsymmetricBlockCipher.processBlock:([BII)[B
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 this Lorg/bouncycastle/crypto/encodings/PKCS1Encoding;
0 22 1 in [B
0 22 2 inOff I
0 22 3 inLen I
3 22 4 block [B
6 10 5 i I
14 19 5 i I
Exceptions:
throws org.bouncycastle.crypto.InvalidCipherTextException
MethodParameters:
Name Flags
in
inOff
inLen
private byte[] decodeBlock(byte[], int, int);
descriptor: ([BII)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=8, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.engine:Lorg/bouncycastle/crypto/AsymmetricBlockCipher;
aload 1
iload 2
iload 3
invokeinterface org.bouncycastle.crypto.AsymmetricBlockCipher.processBlock:([BII)[B
astore 4
start local 4 1: aload 4
arraylength
aload 0
invokevirtual org.bouncycastle.crypto.encodings.PKCS1Encoding.getOutputBlockSize:()I
if_icmpge 3
2: new org.bouncycastle.crypto.InvalidCipherTextException
dup
ldc "block truncated"
invokespecial org.bouncycastle.crypto.InvalidCipherTextException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: byte[]
StackMap stack:
aload 4
iconst_0
baload
istore 5
start local 5 4: iload 5
iconst_1
if_icmpeq 6
iload 5
iconst_2
if_icmpeq 6
5: new org.bouncycastle.crypto.InvalidCipherTextException
dup
ldc "unknown block type"
invokespecial org.bouncycastle.crypto.InvalidCipherTextException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals: int
StackMap stack:
aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.useStrictLength:Z
ifeq 8
aload 4
arraylength
aload 0
getfield org.bouncycastle.crypto.encodings.PKCS1Encoding.engine:Lorg/bouncycastle/crypto/AsymmetricBlockCipher;
invokeinterface org.bouncycastle.crypto.AsymmetricBlockCipher.getOutputBlockSize:()I
if_icmpeq 8
7: new org.bouncycastle.crypto.InvalidCipherTextException
dup
ldc "block incorrect size"
invokespecial org.bouncycastle.crypto.InvalidCipherTextException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
iconst_1
istore 6
start local 6 9: goto 16
10: StackMap locals: int
StackMap stack:
aload 4
iload 6
baload
istore 7
start local 7 11: iload 7
ifne 13
12: goto 17
13: StackMap locals: int
StackMap stack:
iload 5
iconst_1
if_icmpne 15
iload 7
iconst_m1
if_icmpeq 15
14: new org.bouncycastle.crypto.InvalidCipherTextException
dup
ldc "block padding incorrect"
invokespecial org.bouncycastle.crypto.InvalidCipherTextException.<init>:(Ljava/lang/String;)V
athrow
end local 7 15: StackMap locals:
StackMap stack:
iinc 6 1
StackMap locals:
StackMap stack:
16: iload 6
aload 4
arraylength
if_icmpne 10
17: StackMap locals:
StackMap stack:
iinc 6 1
18: iload 6
aload 4
arraylength
if_icmpgt 19
iload 6
bipush 10
if_icmpge 20
19: StackMap locals:
StackMap stack:
new org.bouncycastle.crypto.InvalidCipherTextException
dup
ldc "no data in block"
invokespecial org.bouncycastle.crypto.InvalidCipherTextException.<init>:(Ljava/lang/String;)V
athrow
20: StackMap locals:
StackMap stack:
aload 4
arraylength
iload 6
isub
newarray 8
astore 7
start local 7 21: aload 4
iload 6
aload 7
iconst_0
aload 7
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
22: aload 7
areturn
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 23 0 this Lorg/bouncycastle/crypto/encodings/PKCS1Encoding;
0 23 1 in [B
0 23 2 inOff I
0 23 3 inLen I
1 23 4 block [B
4 23 5 type B
9 23 6 start I
11 15 7 pad B
21 23 7 result [B
Exceptions:
throws org.bouncycastle.crypto.InvalidCipherTextException
MethodParameters:
Name Flags
in
inOff
inLen
}
SourceFile: "PKCS1Encoding.java"
NestMembers:
org.bouncycastle.crypto.encodings.PKCS1Encoding$1
InnerClasses:
org.bouncycastle.crypto.encodings.PKCS1Encoding$1