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 sun.security.x509.AlgorithmId rsaId;
descriptor: Lsun/security/x509/AlgorithmId;
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 19
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
invokevirtual java.math.BigInteger.bitLength:()I
iload 4
if_icmple 19
16: new java.security.InvalidAlgorithmParameterException
dup
17: ldc "Public exponent must be smaller than key size"
18: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
19: StackMap locals:
StackMap stack:
iload 4
aload 5
20: sipush 512
ldc 65536
21: invokestatic sun.security.rsa.RSAKeyFactory.checkKeyLengths:(ILjava/math/BigInteger;II)V
22: goto 27
StackMap locals:
StackMap stack: java.security.InvalidKeyException
23: astore 7
start local 7 24: new java.security.InvalidAlgorithmParameterException
dup
25: ldc "Invalid key sizes"
aload 7
26: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 7 27: 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.createAlgorithmId:(Lsun/security/rsa/RSAUtil$KeyType;Ljava/security/spec/AlgorithmParameterSpec;)Lsun/security/x509/AlgorithmId;
putfield sun.security.rsa.RSAKeyPairGenerator.rsaId:Lsun/security/x509/AlgorithmId;
28: goto 33
StackMap locals:
StackMap stack: java.security.ProviderException
29: astore 7
start local 7 30: new java.security.InvalidAlgorithmParameterException
dup
31: ldc "Invalid key parameters"
aload 7
32: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 7 33: StackMap locals:
StackMap stack:
aload 0
iload 4
putfield sun.security.rsa.RSAKeyPairGenerator.keySize:I
34: aload 0
aload 5
putfield sun.security.rsa.RSAKeyPairGenerator.publicExponent:Ljava/math/BigInteger;
35: aload 0
aload 2
putfield sun.security.rsa.RSAKeyPairGenerator.random:Ljava/security/SecureRandom;
36: 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 37 0 this Lsun/security/rsa/RSAKeyPairGenerator;
0 37 1 params Ljava/security/spec/AlgorithmParameterSpec;
0 37 2 random Ljava/security/SecureRandom;
5 37 3 rsaSpec Ljava/security/spec/RSAKeyGenParameterSpec;
6 37 4 tmpKeySize I
7 37 5 tmpPublicExponent Ljava/math/BigInteger;
8 37 6 tmpParams Ljava/security/spec/AlgorithmParameterSpec;
24 27 7 e Ljava/security/InvalidKeyException;
30 33 7 e Ljava/security/ProviderException;
Exception table:
from to target type
19 22 23 Class java.security.InvalidKeyException
27 28 29 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=11, 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.rsaId:Lsun/security/x509/AlgorithmId;
aload 6
aload 3
invokespecial sun.security.rsa.RSAPublicKeyImpl.<init>:(Lsun/security/x509/AlgorithmId;Ljava/math/BigInteger;Ljava/math/BigInteger;)V
astore 14
start local 14 24: new sun.security.rsa.RSAPrivateCrtKeyImpl
dup
25: aload 0
getfield sun.security.rsa.RSAKeyPairGenerator.rsaId:Lsun/security/x509/AlgorithmId;
aload 6
aload 3
aload 10
aload 4
aload 5
aload 11
aload 12
aload 13
26: invokespecial sun.security.rsa.RSAPrivateCrtKeyImpl.<init>:(Lsun/security/x509/AlgorithmId;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 27: new java.security.KeyPair
dup
aload 14
aload 15
invokespecial java.security.KeyPair.<init>:(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V
28: areturn
end local 15 end local 14 29: 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 30: 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 31 0 this Lsun/security/rsa/RSAKeyPairGenerator;
1 31 1 lp I
2 31 2 lq I
5 31 3 e Ljava/math/BigInteger;
6 31 4 p Ljava/math/BigInteger;
7 31 5 q Ljava/math/BigInteger;
12 31 6 n Ljava/math/BigInteger;
9 11 7 tmp Ljava/math/BigInteger;
15 31 7 p1 Ljava/math/BigInteger;
16 31 8 q1 Ljava/math/BigInteger;
17 31 9 phi Ljava/math/BigInteger;
20 31 10 d Ljava/math/BigInteger;
21 31 11 pe Ljava/math/BigInteger;
22 31 12 qe Ljava/math/BigInteger;
23 31 13 coeff Ljava/math/BigInteger;
24 29 14 publicKey Ljava/security/PublicKey;
27 29 15 privateKey Ljava/security/PrivateKey;
30 31 14 exc Ljava/security/InvalidKeyException;
Exception table:
from to target type
23 28 29 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