public final class com.sun.crypto.provider.DHKeyPairGenerator extends java.security.KeyPairGeneratorSpi
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.sun.crypto.provider.DHKeyPairGenerator
super_class: java.security.KeyPairGeneratorSpi
{
private javax.crypto.spec.DHParameterSpec params;
descriptor: Ljavax/crypto/spec/DHParameterSpec;
flags: (0x0002) ACC_PRIVATE
private int pSize;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int lSize;
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_DH_KEY_SIZE:I
aconst_null
invokevirtual com.sun.crypto.provider.DHKeyPairGenerator.initialize:(ILjava/security/SecureRandom;)V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/sun/crypto/provider/DHKeyPairGenerator;
private static void checkKeySize(int);
descriptor: (I)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: iload 0
sipush 512
if_icmplt 1
iload 0
sipush 8192
if_icmpgt 1
iload 0
bipush 63
iand
ifeq 6
1: StackMap locals:
StackMap stack:
new java.security.InvalidParameterException
dup
2: new java.lang.StringBuilder
dup
ldc "DH key size must be multiple of 64, and can only range from 512 to 8192 (inclusive). The specific key size "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
3: iload 0
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " is not supported"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
4: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
5: invokespecial java.security.InvalidParameterException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 keysize I
Exceptions:
throws java.security.InvalidParameterException
MethodParameters:
Name Flags
keysize
public void initialize(int, java.security.SecureRandom);
descriptor: (ILjava/security/SecureRandom;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: iload 1
invokestatic com.sun.crypto.provider.DHKeyPairGenerator.checkKeySize:(I)V
1: aload 0
iload 1
invokestatic sun.security.provider.ParameterCache.getCachedDHParameterSpec:(I)Ljavax/crypto/spec/DHParameterSpec;
putfield com.sun.crypto.provider.DHKeyPairGenerator.params:Ljavax/crypto/spec/DHParameterSpec;
2: aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.params:Ljavax/crypto/spec/DHParameterSpec;
ifnonnull 6
iload 1
sipush 1024
if_icmple 6
3: new java.security.InvalidParameterException
dup
4: new java.lang.StringBuilder
dup
ldc "Unsupported "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 1
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc "-bit DH parameter generation"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
5: invokespecial java.security.InvalidParameterException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
aload 0
iload 1
putfield com.sun.crypto.provider.DHKeyPairGenerator.pSize:I
7: aload 0
iconst_0
putfield com.sun.crypto.provider.DHKeyPairGenerator.lSize:I
8: aload 0
aload 2
putfield com.sun.crypto.provider.DHKeyPairGenerator.random:Ljava/security/SecureRandom;
9: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lcom/sun/crypto/provider/DHKeyPairGenerator;
0 10 1 keysize I
0 10 2 random Ljava/security/SecureRandom;
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=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
instanceof javax.crypto.spec.DHParameterSpec
ifne 4
1: new java.security.InvalidAlgorithmParameterException
dup
2: ldc "Inappropriate parameter type"
3: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
aload 1
checkcast javax.crypto.spec.DHParameterSpec
putfield com.sun.crypto.provider.DHKeyPairGenerator.params:Ljavax/crypto/spec/DHParameterSpec;
5: aload 0
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.params:Ljavax/crypto/spec/DHParameterSpec;
invokevirtual javax.crypto.spec.DHParameterSpec.getP:()Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.bitLength:()I
putfield com.sun.crypto.provider.DHKeyPairGenerator.pSize:I
6: aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.pSize:I
invokestatic com.sun.crypto.provider.DHKeyPairGenerator.checkKeySize:(I)V
7: goto 10
StackMap locals:
StackMap stack: java.security.InvalidParameterException
8: astore 3
start local 3 9: new java.security.InvalidAlgorithmParameterException
dup
aload 3
invokevirtual java.security.InvalidParameterException.getMessage:()Ljava/lang/String;
invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
end local 3 10: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.params:Ljavax/crypto/spec/DHParameterSpec;
invokevirtual javax.crypto.spec.DHParameterSpec.getL:()I
putfield com.sun.crypto.provider.DHKeyPairGenerator.lSize:I
11: aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.lSize:I
ifeq 15
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.lSize:I
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.pSize:I
if_icmple 15
12: new java.security.InvalidAlgorithmParameterException
dup
13: ldc "Exponent size must not be larger than modulus size"
14: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
15: StackMap locals:
StackMap stack:
aload 0
aload 2
putfield com.sun.crypto.provider.DHKeyPairGenerator.random:Ljava/security/SecureRandom;
16: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lcom/sun/crypto/provider/DHKeyPairGenerator;
0 17 1 algParams Ljava/security/spec/AlgorithmParameterSpec;
0 17 2 random Ljava/security/SecureRandom;
9 10 3 ipe Ljava/security/InvalidParameterException;
Exception table:
from to target type
6 7 8 Class java.security.InvalidParameterException
Exceptions:
throws java.security.InvalidAlgorithmParameterException
MethodParameters:
Name Flags
algParams
random
public java.security.KeyPair generateKeyPair();
descriptor: ()Ljava/security/KeyPair;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=8, args_size=1
start local 0 0: aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.random:Ljava/security/SecureRandom;
ifnonnull 2
1: aload 0
invokestatic com.sun.crypto.provider.SunJCE.getRandom:()Ljava/security/SecureRandom;
putfield com.sun.crypto.provider.DHKeyPairGenerator.random:Ljava/security/SecureRandom;
2: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.params:Ljavax/crypto/spec/DHParameterSpec;
ifnonnull 7
3: aload 0
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.pSize:I
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.random:Ljava/security/SecureRandom;
invokestatic sun.security.provider.ParameterCache.getDHParameterSpec:(ILjava/security/SecureRandom;)Ljavax/crypto/spec/DHParameterSpec;
putfield com.sun.crypto.provider.DHKeyPairGenerator.params:Ljavax/crypto/spec/DHParameterSpec;
4: goto 7
StackMap locals:
StackMap stack: java.security.GeneralSecurityException
5: astore 1
start local 1 6: new java.security.ProviderException
dup
aload 1
invokespecial java.security.ProviderException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 1 7: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.params:Ljavax/crypto/spec/DHParameterSpec;
invokevirtual javax.crypto.spec.DHParameterSpec.getP:()Ljava/math/BigInteger;
astore 1
start local 1 8: aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.params:Ljavax/crypto/spec/DHParameterSpec;
invokevirtual javax.crypto.spec.DHParameterSpec.getG:()Ljava/math/BigInteger;
astore 2
start local 2 9: aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.lSize:I
ifgt 13
10: aload 0
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.pSize:I
iconst_1
ishr
putfield com.sun.crypto.provider.DHKeyPairGenerator.lSize:I
11: aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.lSize:I
sipush 384
if_icmpge 13
12: aload 0
sipush 384
putfield com.sun.crypto.provider.DHKeyPairGenerator.lSize:I
13: StackMap locals: java.math.BigInteger java.math.BigInteger
StackMap stack:
aload 1
getstatic java.math.BigInteger.TWO:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.subtract:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 4
start local 4 14: StackMap locals: com.sun.crypto.provider.DHKeyPairGenerator java.math.BigInteger java.math.BigInteger top java.math.BigInteger
StackMap stack:
new java.math.BigInteger
dup
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.lSize:I
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.random:Ljava/security/SecureRandom;
invokespecial java.math.BigInteger.<init>:(ILjava/util/Random;)V
astore 3
start local 3 15: aload 3
getstatic java.math.BigInteger.ONE:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
iflt 14
16: aload 3
aload 4
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
ifgt 14
aload 3
invokevirtual java.math.BigInteger.bitLength:()I
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.lSize:I
if_icmpne 14
17: aload 2
aload 3
aload 1
invokevirtual java.math.BigInteger.modPow:(Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 5
start local 5 18: new com.sun.crypto.provider.DHPublicKey
dup
aload 5
aload 1
aload 2
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.lSize:I
invokespecial com.sun.crypto.provider.DHPublicKey.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;I)V
astore 6
start local 6 19: new com.sun.crypto.provider.DHPrivateKey
dup
aload 3
aload 1
aload 2
aload 0
getfield com.sun.crypto.provider.DHKeyPairGenerator.lSize:I
invokespecial com.sun.crypto.provider.DHPrivateKey.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;I)V
astore 7
start local 7 20: new java.security.KeyPair
dup
aload 6
aload 7
invokespecial java.security.KeyPair.<init>:(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V
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 21 0 this Lcom/sun/crypto/provider/DHKeyPairGenerator;
6 7 1 e Ljava/security/GeneralSecurityException;
8 21 1 p Ljava/math/BigInteger;
9 21 2 g Ljava/math/BigInteger;
15 21 3 x Ljava/math/BigInteger;
14 21 4 pMinus2 Ljava/math/BigInteger;
18 21 5 y Ljava/math/BigInteger;
19 21 6 pubKey Lcom/sun/crypto/provider/DHPublicKey;
20 21 7 privKey Lcom/sun/crypto/provider/DHPrivateKey;
Exception table:
from to target type
3 4 5 Class java.security.GeneralSecurityException
}
SourceFile: "DHKeyPairGenerator.java"