public abstract class sun.security.rsa.RSAKeyPairGenerator extends java.security.KeyPairGeneratorSpi
minor version: 0
major version: 59
flags: flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
this_class: sun.security.rsa.RSAKeyPairGenerator
super_class: java.security.KeyPairGeneratorSpi
{
private java.math.BigInteger publicExponent;
descriptor: Ljava/math/BigInteger;
flags: (0x0002) ACC_PRIVATE
private int keySize;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private final sun.security.rsa.RSAUtil$KeyType type;
descriptor: Lsun/security/rsa/RSAUtil$KeyType;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private java.security.spec.AlgorithmParameterSpec keyParams;
descriptor: Ljava/security/spec/AlgorithmParameterSpec;
flags: (0x0002) ACC_PRIVATE
private java.security.SecureRandom random;
descriptor: Ljava/security/SecureRandom;
flags: (0x0002) ACC_PRIVATE
void <init>(sun.security.rsa.RSAUtil$KeyType, int);
descriptor: (Lsun/security/rsa/RSAUtil$KeyType;I)V
flags: (0x0000)
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.security.KeyPairGeneratorSpi.<init>:()V
1: aload 0
aload 1
putfield sun.security.rsa.RSAKeyPairGenerator.type:Lsun/security/rsa/RSAUtil$KeyType;
2: aload 0
iload 2
aconst_null
invokevirtual sun.security.rsa.RSAKeyPairGenerator.initialize:(ILjava/security/SecureRandom;)V
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lsun/security/rsa/RSAKeyPairGenerator;
0 4 1 type Lsun/security/rsa/RSAUtil$KeyType;
0 4 2 defKeySize I
MethodParameters:
Name Flags
type
defKeySize
public void initialize(int, java.security.SecureRandom);
descriptor: (ILjava/security/SecureRandom;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
new java.security.spec.RSAKeyGenParameterSpec
dup
iload 1
1: getstatic java.security.spec.RSAKeyGenParameterSpec.F4:Ljava/math/BigInteger;
invokespecial java.security.spec.RSAKeyGenParameterSpec.<init>:(ILjava/math/BigInteger;)V
aload 2
2: invokevirtual sun.security.rsa.RSAKeyPairGenerator.initialize:(Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
3: goto 6
StackMap locals:
StackMap stack: java.security.InvalidAlgorithmParameterException
4: astore 3
start local 3 5: new java.security.InvalidParameterException
dup
aload 3
invokevirtual java.security.InvalidAlgorithmParameterException.getMessage:()Ljava/lang/String;
invokespecial java.security.InvalidParameterException.<init>:(Ljava/lang/String;)V
athrow
end local 3 6: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lsun/security/rsa/RSAKeyPairGenerator;
0 7 1 keySize I
0 7 2 random Ljava/security/SecureRandom;
5 6 3 iape Ljava/security/InvalidAlgorithmParameterException;
Exception table:
from to target type
0 3 4 Class java.security.InvalidAlgorithmParameterException
MethodParameters:
Name Flags
keySize
random
public void initialize(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom);
descriptor: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 1
instanceof java.security.spec.RSAKeyGenParameterSpec
ifne 4
1: new java.security.InvalidAlgorithmParameterException
dup
2: ldc "Params must be instance of RSAKeyGenParameterSpec"
3: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 1
checkcast java.security.spec.RSAKeyGenParameterSpec
astore 3
start local 3 5: aload 3
invokevirtual java.security.spec.RSAKeyGenParameterSpec.getKeysize:()I
istore 4
start local 4 6: aload 3
invokevirtual java.security.spec.RSAKeyGenParameterSpec.getPublicExponent:()Ljava/math/BigInteger;
astore 5
start local 5 7: aload 3
invokevirtual java.security.spec.RSAKeyGenParameterSpec.getKeyParams:()Ljava/security/spec/AlgorithmParameterSpec;
astore 6
start local 6 8: aload 5
ifnonnull 11
9: getstatic java.security.spec.RSAKeyGenParameterSpec.F4:Ljava/math/BigInteger;
astore 5
10: goto 23
11: StackMap locals: sun.security.rsa.RSAKeyPairGenerator java.security.spec.AlgorithmParameterSpec java.security.SecureRandom java.security.spec.RSAKeyGenParameterSpec int java.math.BigInteger java.security.spec.AlgorithmParameterSpec
StackMap stack:
aload 5
getstatic java.security.spec.RSAKeyGenParameterSpec.F0:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
ifge 15
12: new java.security.InvalidAlgorithmParameterException
dup
13: ldc "Public exponent must be 3 or larger"
14: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
15: StackMap locals:
StackMap stack:
aload 5
iconst_0
invokevirtual java.math.BigInteger.testBit:(I)Z
ifne 19
16: new java.security.InvalidAlgorithmParameterException
dup
17: ldc "Public exponent must be an odd number"
18: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
19: StackMap locals:
StackMap stack:
aload 5
invokevirtual java.math.BigInteger.bitLength:()I
iload 4
if_icmple 23
20: new java.security.InvalidAlgorithmParameterException
dup
21: ldc "Public exponent must be smaller than key size"
22: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
23: StackMap locals:
StackMap stack:
iload 4
aload 5
24: sipush 512
ldc 65536
25: invokestatic sun.security.rsa.RSAKeyFactory.checkKeyLengths:(ILjava/math/BigInteger;II)V
26: goto 31
StackMap locals:
StackMap stack: java.security.InvalidKeyException
27: astore 7
start local 7 28: new java.security.InvalidAlgorithmParameterException
dup
29: ldc "Invalid key sizes"
aload 7
30: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 7 31: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.type:Lsun/security/rsa/RSAUtil$KeyType;
aload 6
invokestatic sun.security.rsa.RSAUtil.checkParamsAgainstType:(Lsun/security/rsa/RSAUtil$KeyType;Ljava/security/spec/AlgorithmParameterSpec;)Ljava/security/spec/AlgorithmParameterSpec;
putfield sun.security.rsa.RSAKeyPairGenerator.keyParams:Ljava/security/spec/AlgorithmParameterSpec;
32: goto 37
StackMap locals:
StackMap stack: java.security.ProviderException
33: astore 7
start local 7 34: new java.security.InvalidAlgorithmParameterException
dup
35: ldc "Invalid key parameters"
aload 7
36: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 7 37: StackMap locals:
StackMap stack:
aload 0
iload 4
putfield sun.security.rsa.RSAKeyPairGenerator.keySize:I
38: aload 0
aload 5
putfield sun.security.rsa.RSAKeyPairGenerator.publicExponent:Ljava/math/BigInteger;
39: aload 0
aload 2
putfield sun.security.rsa.RSAKeyPairGenerator.random:Ljava/security/SecureRandom;
40: return
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 41 0 this Lsun/security/rsa/RSAKeyPairGenerator;
0 41 1 params Ljava/security/spec/AlgorithmParameterSpec;
0 41 2 random Ljava/security/SecureRandom;
5 41 3 rsaSpec Ljava/security/spec/RSAKeyGenParameterSpec;
6 41 4 tmpKeySize I
7 41 5 tmpPublicExponent Ljava/math/BigInteger;
8 41 6 tmpParams Ljava/security/spec/AlgorithmParameterSpec;
28 31 7 e Ljava/security/InvalidKeyException;
34 37 7 e Ljava/security/ProviderException;
Exception table:
from to target type
23 26 27 Class java.security.InvalidKeyException
31 32 33 Class java.security.ProviderException
Exceptions:
throws java.security.InvalidAlgorithmParameterException
MethodParameters:
Name Flags
params
random
public java.security.KeyPair generateKeyPair();
descriptor: ()Ljava/security/KeyPair;
flags: (0x0001) ACC_PUBLIC
Code:
stack=12, locals=16, args_size=1
start local 0 0: aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.keySize:I
iconst_1
iadd
iconst_1
ishr
istore 1
start local 1 1: aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.keySize:I
iload 1
isub
istore 2
start local 2 2: aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.random:Ljava/security/SecureRandom;
ifnonnull 4
3: aload 0
invokestatic sun.security.jca.JCAUtil.getSecureRandom:()Ljava/security/SecureRandom;
putfield sun.security.rsa.RSAKeyPairGenerator.random:Ljava/security/SecureRandom;
4: StackMap locals: int int
StackMap stack:
aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.publicExponent:Ljava/math/BigInteger;
astore 3
start local 3 5: StackMap locals: java.math.BigInteger
StackMap stack:
iload 1
aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.random:Ljava/security/SecureRandom;
invokestatic java.math.BigInteger.probablePrime:(ILjava/util/Random;)Ljava/math/BigInteger;
astore 4
start local 4 6: StackMap locals: java.math.BigInteger
StackMap stack:
iload 2
aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.random:Ljava/security/SecureRandom;
invokestatic java.math.BigInteger.probablePrime:(ILjava/util/Random;)Ljava/math/BigInteger;
astore 5
start local 5 7: aload 4
aload 5
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
ifge 11
8: aload 4
astore 7
start local 7 9: aload 5
astore 4
10: aload 7
astore 5
end local 7 11: StackMap locals: java.math.BigInteger
StackMap stack:
aload 4
aload 5
invokevirtual java.math.BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 6
start local 6 12: aload 6
invokevirtual java.math.BigInteger.bitLength:()I
aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.keySize:I
13: if_icmplt 6
14: aload 4
getstatic java.math.BigInteger.ONE:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.subtract:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 7
start local 7 15: aload 5
getstatic java.math.BigInteger.ONE:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.subtract:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 8
start local 8 16: aload 7
aload 8
invokevirtual java.math.BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 9
start local 9 17: aload 3
aload 9
invokevirtual java.math.BigInteger.gcd:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
getstatic java.math.BigInteger.ONE:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.equals:(Ljava/lang/Object;)Z
ifne 19
18: goto 5
19: StackMap locals: sun.security.rsa.RSAKeyPairGenerator int int java.math.BigInteger java.math.BigInteger java.math.BigInteger java.math.BigInteger java.math.BigInteger java.math.BigInteger java.math.BigInteger
StackMap stack:
aload 3
aload 9
invokevirtual java.math.BigInteger.modInverse:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 10
start local 10 20: aload 10
aload 7
invokevirtual java.math.BigInteger.mod:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 11
start local 11 21: aload 10
aload 8
invokevirtual java.math.BigInteger.mod:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 12
start local 12 22: aload 5
aload 4
invokevirtual java.math.BigInteger.modInverse:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 13
start local 13 23: new sun.security.rsa.RSAPublicKeyImpl
dup
aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.type:Lsun/security/rsa/RSAUtil$KeyType;
aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.keyParams:Ljava/security/spec/AlgorithmParameterSpec;
24: aload 6
aload 3
25: invokespecial sun.security.rsa.RSAPublicKeyImpl.<init>:(Lsun/security/rsa/RSAUtil$KeyType;Ljava/security/spec/AlgorithmParameterSpec;Ljava/math/BigInteger;Ljava/math/BigInteger;)V
astore 14
start local 14 26: new sun.security.rsa.RSAPrivateCrtKeyImpl
dup
aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.type:Lsun/security/rsa/RSAUtil$KeyType;
27: aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.keyParams:Ljava/security/spec/AlgorithmParameterSpec;
aload 6
aload 3
aload 10
aload 4
aload 5
aload 11
aload 12
aload 13
28: invokespecial sun.security.rsa.RSAPrivateCrtKeyImpl.<init>:(Lsun/security/rsa/RSAUtil$KeyType;Ljava/security/spec/AlgorithmParameterSpec;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;)V
astore 15
start local 15 29: new java.security.KeyPair
dup
aload 14
aload 15
invokespecial java.security.KeyPair.<init>:(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V
30: areturn
end local 15 end local 14 31: StackMap locals: sun.security.rsa.RSAKeyPairGenerator int int java.math.BigInteger java.math.BigInteger java.math.BigInteger java.math.BigInteger java.math.BigInteger java.math.BigInteger java.math.BigInteger java.math.BigInteger java.math.BigInteger java.math.BigInteger java.math.BigInteger
StackMap stack: java.security.InvalidKeyException
astore 14
start local 14 32: new java.lang.RuntimeException
dup
aload 14
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 14 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 33 0 this Lsun/security/rsa/RSAKeyPairGenerator;
1 33 1 lp I
2 33 2 lq I
5 33 3 e Ljava/math/BigInteger;
6 33 4 p Ljava/math/BigInteger;
7 33 5 q Ljava/math/BigInteger;
12 33 6 n Ljava/math/BigInteger;
9 11 7 tmp Ljava/math/BigInteger;
15 33 7 p1 Ljava/math/BigInteger;
16 33 8 q1 Ljava/math/BigInteger;
17 33 9 phi Ljava/math/BigInteger;
20 33 10 d Ljava/math/BigInteger;
21 33 11 pe Ljava/math/BigInteger;
22 33 12 qe Ljava/math/BigInteger;
23 33 13 coeff Ljava/math/BigInteger;
26 31 14 publicKey Ljava/security/PublicKey;
29 31 15 privateKey Ljava/security/PrivateKey;
32 33 14 exc Ljava/security/InvalidKeyException;
Exception table:
from to target type
23 30 31 Class java.security.InvalidKeyException
}
SourceFile: "RSAKeyPairGenerator.java"
NestMembers:
sun.security.rsa.RSAKeyPairGenerator$Legacy sun.security.rsa.RSAKeyPairGenerator$PSS
InnerClasses:
public final Legacy = sun.security.rsa.RSAKeyPairGenerator$Legacy of sun.security.rsa.RSAKeyPairGenerator
public final PSS = sun.security.rsa.RSAKeyPairGenerator$PSS of sun.security.rsa.RSAKeyPairGenerator
public final KeyType = sun.security.rsa.RSAUtil$KeyType of sun.security.rsa.RSAUtil