public final class sun.security.rsa.RSAKeyPairGenerator extends java.security.KeyPairGeneratorSpi
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
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 java.security.SecureRandom random;
descriptor: Ljava/security/SecureRandom;
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.security.KeyPairGeneratorSpi.<init>:()V
1: aload 0
getstatic sun.security.util.SecurityProviderConstants.DEF_RSA_KEY_SIZE:I
aconst_null
invokevirtual sun.security.rsa.RSAKeyPairGenerator.initialize:(ILjava/security/SecureRandom;)V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lsun/security/rsa/RSAKeyPairGenerator;
public void initialize(int, java.security.SecureRandom);
descriptor: (ILjava/security/SecureRandom;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 2 0: iload 1
getstatic java.security.spec.RSAKeyGenParameterSpec.F4:Ljava/math/BigInteger;
1: sipush 512
ldc 65536
2: invokestatic sun.security.rsa.RSAKeyFactory.checkKeyLengths:(ILjava/math/BigInteger;II)V
3: goto 6
StackMap locals:
StackMap stack: java.security.InvalidKeyException
4: astore 3
start local 3 5: new java.security.InvalidParameterException
dup
aload 3
invokevirtual java.security.InvalidKeyException.getMessage:()Ljava/lang/String;
invokespecial java.security.InvalidParameterException.<init>:(Ljava/lang/String;)V
athrow
end local 3 6: StackMap locals:
StackMap stack:
aload 0
iload 1
putfield sun.security.rsa.RSAKeyPairGenerator.keySize:I
7: aload 0
aload 2
putfield sun.security.rsa.RSAKeyPairGenerator.random:Ljava/security/SecureRandom;
8: aload 0
getstatic java.security.spec.RSAKeyGenParameterSpec.F4:Ljava/math/BigInteger;
putfield sun.security.rsa.RSAKeyPairGenerator.publicExponent:Ljava/math/BigInteger;
9: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lsun/security/rsa/RSAKeyPairGenerator;
0 10 1 keySize I
0 10 2 random Ljava/security/SecureRandom;
5 6 3 e Ljava/security/InvalidKeyException;
Exception table:
from to target type
0 3 4 Class java.security.InvalidKeyException
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=7, 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 5
ifnonnull 10
8: getstatic java.security.spec.RSAKeyGenParameterSpec.F4:Ljava/math/BigInteger;
astore 5
9: goto 18
10: StackMap locals: java.security.spec.RSAKeyGenParameterSpec int java.math.BigInteger
StackMap stack:
aload 5
getstatic java.security.spec.RSAKeyGenParameterSpec.F0:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
ifge 14
11: new java.security.InvalidAlgorithmParameterException
dup
12: ldc "Public exponent must be 3 or larger"
13: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
14: StackMap locals:
StackMap stack:
aload 5
invokevirtual java.math.BigInteger.bitLength:()I
iload 4
if_icmple 18
15: new java.security.InvalidAlgorithmParameterException
dup
16: ldc "Public exponent must be smaller than key size"
17: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
18: StackMap locals:
StackMap stack:
iload 4
aload 5
19: sipush 512
ldc 65536
20: invokestatic sun.security.rsa.RSAKeyFactory.checkKeyLengths:(ILjava/math/BigInteger;II)V
21: goto 26
StackMap locals:
StackMap stack: java.security.InvalidKeyException
22: astore 6
start local 6 23: new java.security.InvalidAlgorithmParameterException
dup
24: ldc "Invalid key sizes"
aload 6
25: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 6 26: StackMap locals:
StackMap stack:
aload 0
iload 4
putfield sun.security.rsa.RSAKeyPairGenerator.keySize:I
27: aload 0
aload 5
putfield sun.security.rsa.RSAKeyPairGenerator.publicExponent:Ljava/math/BigInteger;
28: aload 0
aload 2
putfield sun.security.rsa.RSAKeyPairGenerator.random:Ljava/security/SecureRandom;
29: 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 30 0 this Lsun/security/rsa/RSAKeyPairGenerator;
0 30 1 params Ljava/security/spec/AlgorithmParameterSpec;
0 30 2 random Ljava/security/SecureRandom;
5 30 3 rsaSpec Ljava/security/spec/RSAKeyGenParameterSpec;
6 30 4 tmpKeySize I
7 30 5 tmpPublicExponent Ljava/math/BigInteger;
23 26 6 e Ljava/security/InvalidKeyException;
Exception table:
from to target type
18 21 22 Class java.security.InvalidKeyException
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=10, 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 6
aload 3
invokespecial sun.security.rsa.RSAPublicKeyImpl.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
astore 14
start local 14 24: new sun.security.rsa.RSAPrivateCrtKeyImpl
dup
aload 6
aload 3
aload 10
aload 4
aload 5
aload 11
aload 12
aload 13
invokespecial sun.security.rsa.RSAPrivateCrtKeyImpl.<init>:(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
25: astore 15
start local 15 26: new java.security.KeyPair
dup
aload 14
aload 15
invokespecial java.security.KeyPair.<init>:(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V
27: areturn
end local 15 end local 14 28: 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 29: 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 30 0 this Lsun/security/rsa/RSAKeyPairGenerator;
1 30 1 lp I
2 30 2 lq I
5 30 3 e Ljava/math/BigInteger;
6 30 4 p Ljava/math/BigInteger;
7 30 5 q Ljava/math/BigInteger;
12 30 6 n Ljava/math/BigInteger;
9 11 7 tmp Ljava/math/BigInteger;
15 30 7 p1 Ljava/math/BigInteger;
16 30 8 q1 Ljava/math/BigInteger;
17 30 9 phi Ljava/math/BigInteger;
20 30 10 d Ljava/math/BigInteger;
21 30 11 pe Ljava/math/BigInteger;
22 30 12 qe Ljava/math/BigInteger;
23 30 13 coeff Ljava/math/BigInteger;
24 28 14 publicKey Ljava/security/PublicKey;
26 28 15 privateKey Ljava/security/PrivateKey;
29 30 14 exc Ljava/security/InvalidKeyException;
Exception table:
from to target type
23 27 28 Class java.security.InvalidKeyException
}
SourceFile: "RSAKeyPairGenerator.java"