final class sun.security.ssl.DHCrypt
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: sun.security.ssl.DHCrypt
super_class: java.lang.Object
{
private java.math.BigInteger modulus;
descriptor: Ljava/math/BigInteger;
flags: (0x0002) ACC_PRIVATE
private java.math.BigInteger base;
descriptor: Ljava/math/BigInteger;
flags: (0x0002) ACC_PRIVATE
private java.security.PrivateKey privateKey;
descriptor: Ljava/security/PrivateKey;
flags: (0x0002) ACC_PRIVATE
private java.math.BigInteger publicValue;
descriptor: Ljava/math/BigInteger;
flags: (0x0002) ACC_PRIVATE
private static int MAX_FAILOVER_TIMES;
descriptor: I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: iconst_2
putstatic sun.security.ssl.DHCrypt.MAX_FAILOVER_TIMES:I
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(int, java.security.SecureRandom);
descriptor: (ILjava/security/SecureRandom;)V
flags: (0x0000)
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
iload 1
1: getstatic sun.security.ssl.PredefinedDHParameterSpecs.definedParams:Ljava/util/Map;
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast javax.crypto.spec.DHParameterSpec
aload 2
invokespecial sun.security.ssl.DHCrypt.<init>:(ILjavax/crypto/spec/DHParameterSpec;Ljava/security/SecureRandom;)V
2: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lsun/security/ssl/DHCrypt;
0 3 1 keyLength I
0 3 2 random Ljava/security/SecureRandom;
MethodParameters:
Name Flags
keyLength
random
void <init>(java.math.BigInteger, java.math.BigInteger, java.security.SecureRandom);
descriptor: (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/SecureRandom;)V
flags: (0x0000)
Code:
stack=6, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
invokevirtual java.math.BigInteger.bitLength:()I
1: new javax.crypto.spec.DHParameterSpec
dup
aload 1
aload 2
invokespecial javax.crypto.spec.DHParameterSpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
aload 3
invokespecial sun.security.ssl.DHCrypt.<init>:(ILjavax/crypto/spec/DHParameterSpec;Ljava/security/SecureRandom;)V
2: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lsun/security/ssl/DHCrypt;
0 3 1 modulus Ljava/math/BigInteger;
0 3 2 base Ljava/math/BigInteger;
0 3 3 random Ljava/security/SecureRandom;
MethodParameters:
Name Flags
modulus
base
random
void <init>(sun.security.ssl.NamedGroup, java.security.SecureRandom);
descriptor: (Lsun/security/ssl/NamedGroup;Ljava/security/SecureRandom;)V
flags: (0x0000)
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
iconst_m1
1: aload 1
invokestatic sun.security.ssl.SupportedGroupsExtension.getDHParameterSpec:(Lsun/security/ssl/NamedGroup;)Ljavax/crypto/spec/DHParameterSpec;
aload 2
invokespecial sun.security.ssl.DHCrypt.<init>:(ILjavax/crypto/spec/DHParameterSpec;Ljava/security/SecureRandom;)V
2: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lsun/security/ssl/DHCrypt;
0 3 1 namedGroup Lsun/security/ssl/NamedGroup;
0 3 2 random Ljava/security/SecureRandom;
MethodParameters:
Name Flags
namedGroup
random
private void <init>(int, javax.crypto.spec.DHParameterSpec, java.security.SecureRandom);
descriptor: (ILjavax/crypto/spec/DHParameterSpec;Ljava/security/SecureRandom;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: ldc "DiffieHellman"
invokestatic sun.security.ssl.JsseJce.getKeyPairGenerator:(Ljava/lang/String;)Ljava/security/KeyPairGenerator;
astore 4
start local 4 2: aload 2
ifnull 5
3: aload 4
aload 2
aload 3
invokevirtual java.security.KeyPairGenerator.initialize:(Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
4: goto 6
5: StackMap locals: sun.security.ssl.DHCrypt int javax.crypto.spec.DHParameterSpec java.security.SecureRandom java.security.KeyPairGenerator
StackMap stack:
aload 4
iload 1
aload 3
invokevirtual java.security.KeyPairGenerator.initialize:(ILjava/security/SecureRandom;)V
6: StackMap locals:
StackMap stack:
aload 0
aload 4
invokevirtual sun.security.ssl.DHCrypt.generateDHPublicKeySpec:(Ljava/security/KeyPairGenerator;)Ljavax/crypto/spec/DHPublicKeySpec;
astore 5
start local 5 7: aload 5
ifnonnull 9
8: new java.lang.RuntimeException
dup
ldc "Could not generate DH keypair"
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals: javax.crypto.spec.DHPublicKeySpec
StackMap stack:
aload 0
aload 5
invokevirtual javax.crypto.spec.DHPublicKeySpec.getY:()Ljava/math/BigInteger;
putfield sun.security.ssl.DHCrypt.publicValue:Ljava/math/BigInteger;
10: aload 0
aload 5
invokevirtual javax.crypto.spec.DHPublicKeySpec.getP:()Ljava/math/BigInteger;
putfield sun.security.ssl.DHCrypt.modulus:Ljava/math/BigInteger;
11: aload 0
aload 5
invokevirtual javax.crypto.spec.DHPublicKeySpec.getG:()Ljava/math/BigInteger;
putfield sun.security.ssl.DHCrypt.base:Ljava/math/BigInteger;
end local 5 end local 4 12: goto 15
StackMap locals: sun.security.ssl.DHCrypt int javax.crypto.spec.DHParameterSpec java.security.SecureRandom
StackMap stack: java.security.GeneralSecurityException
13: astore 4
start local 4 14: new java.lang.RuntimeException
dup
ldc "Could not generate DH keypair"
aload 4
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 4 15: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lsun/security/ssl/DHCrypt;
0 16 1 keyLength I
0 16 2 params Ljavax/crypto/spec/DHParameterSpec;
0 16 3 random Ljava/security/SecureRandom;
2 12 4 kpg Ljava/security/KeyPairGenerator;
7 12 5 spec Ljavax/crypto/spec/DHPublicKeySpec;
14 15 4 e Ljava/security/GeneralSecurityException;
Exception table:
from to target type
1 12 13 Class java.security.GeneralSecurityException
MethodParameters:
Name Flags
keyLength
params
random
static javax.crypto.spec.DHPublicKeySpec getDHPublicKeySpec(java.security.PublicKey);
descriptor: (Ljava/security/PublicKey;)Ljavax/crypto/spec/DHPublicKeySpec;
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=3, args_size=1
start local 0 0: aload 0
instanceof javax.crypto.interfaces.DHPublicKey
ifeq 6
1: aload 0
checkcast javax.crypto.interfaces.DHPublicKey
astore 1
start local 1 2: aload 1
invokeinterface javax.crypto.interfaces.DHPublicKey.getParams:()Ljavax/crypto/spec/DHParameterSpec;
astore 2
start local 2 3: new javax.crypto.spec.DHPublicKeySpec
dup
aload 1
invokeinterface javax.crypto.interfaces.DHPublicKey.getY:()Ljava/math/BigInteger;
4: aload 2
invokevirtual javax.crypto.spec.DHParameterSpec.getP:()Ljava/math/BigInteger;
aload 2
invokevirtual javax.crypto.spec.DHParameterSpec.getG:()Ljava/math/BigInteger;
5: invokespecial javax.crypto.spec.DHPublicKeySpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;)V
areturn
end local 2 end local 1 6: StackMap locals:
StackMap stack:
ldc "DiffieHellman"
invokestatic sun.security.ssl.JsseJce.getKeyFactory:(Ljava/lang/String;)Ljava/security/KeyFactory;
astore 1
start local 1 7: aload 1
aload 0
ldc Ljavax/crypto/spec/DHPublicKeySpec;
invokevirtual java.security.KeyFactory.getKeySpec:(Ljava/security/Key;Ljava/lang/Class;)Ljava/security/spec/KeySpec;
checkcast javax.crypto.spec.DHPublicKeySpec
8: areturn
end local 1 9: StackMap locals:
StackMap stack: java.lang.Exception
astore 1
start local 1 10: new java.lang.RuntimeException
dup
aload 1
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 key Ljava/security/PublicKey;
2 6 1 dhKey Ljavax/crypto/interfaces/DHPublicKey;
3 6 2 params Ljavax/crypto/spec/DHParameterSpec;
7 9 1 factory Ljava/security/KeyFactory;
10 11 1 e Ljava/lang/Exception;
Exception table:
from to target type
6 8 9 Class java.lang.Exception
MethodParameters:
Name Flags
key
java.math.BigInteger getModulus();
descriptor: ()Ljava/math/BigInteger;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield sun.security.ssl.DHCrypt.modulus:Ljava/math/BigInteger;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lsun/security/ssl/DHCrypt;
java.math.BigInteger getBase();
descriptor: ()Ljava/math/BigInteger;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield sun.security.ssl.DHCrypt.base:Ljava/math/BigInteger;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lsun/security/ssl/DHCrypt;
java.math.BigInteger getPublicKey();
descriptor: ()Ljava/math/BigInteger;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield sun.security.ssl.DHCrypt.publicValue:Ljava/math/BigInteger;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lsun/security/ssl/DHCrypt;
javax.crypto.SecretKey getAgreedSecret(java.math.BigInteger, boolean);
descriptor: (Ljava/math/BigInteger;Z)Ljavax/crypto/SecretKey;
flags: (0x0000)
Code:
stack=5, locals=8, args_size=3
start local 0 start local 1 start local 2 0: ldc "DiffieHellman"
invokestatic sun.security.ssl.JsseJce.getKeyFactory:(Ljava/lang/String;)Ljava/security/KeyFactory;
astore 3
start local 3 1: new javax.crypto.spec.DHPublicKeySpec
dup
aload 1
aload 0
getfield sun.security.ssl.DHCrypt.modulus:Ljava/math/BigInteger;
aload 0
getfield sun.security.ssl.DHCrypt.base:Ljava/math/BigInteger;
invokespecial javax.crypto.spec.DHPublicKeySpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;)V
2: astore 4
start local 4 3: aload 3
aload 4
invokevirtual java.security.KeyFactory.generatePublic:(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;
astore 5
start local 5 4: ldc "DiffieHellman"
invokestatic sun.security.ssl.JsseJce.getKeyAgreement:(Ljava/lang/String;)Ljavax/crypto/KeyAgreement;
astore 6
start local 6 5: iload 2
ifne 11
6: aload 6
invokevirtual javax.crypto.KeyAgreement.getProvider:()Ljava/security/Provider;
invokevirtual java.security.Provider.getName:()Ljava/lang/String;
invokestatic sun.security.util.KeyUtil.isOracleJCEProvider:(Ljava/lang/String;)Z
ifne 11
7: aload 4
invokestatic sun.security.util.KeyUtil.validate:(Ljava/security/spec/KeySpec;)V
8: goto 11
StackMap locals: sun.security.ssl.DHCrypt java.math.BigInteger int java.security.KeyFactory javax.crypto.spec.DHPublicKeySpec java.security.PublicKey javax.crypto.KeyAgreement
StackMap stack: java.security.InvalidKeyException
9: astore 7
start local 7 10: new javax.net.ssl.SSLHandshakeException
dup
aload 7
invokevirtual java.security.InvalidKeyException.getMessage:()Ljava/lang/String;
invokespecial javax.net.ssl.SSLHandshakeException.<init>:(Ljava/lang/String;)V
athrow
end local 7 11: StackMap locals:
StackMap stack:
aload 6
aload 0
getfield sun.security.ssl.DHCrypt.privateKey:Ljava/security/PrivateKey;
invokevirtual javax.crypto.KeyAgreement.init:(Ljava/security/Key;)V
12: aload 6
aload 5
iconst_1
invokevirtual javax.crypto.KeyAgreement.doPhase:(Ljava/security/Key;Z)Ljava/security/Key;
pop
13: aload 6
ldc "TlsPremasterSecret"
invokevirtual javax.crypto.KeyAgreement.generateSecret:(Ljava/lang/String;)Ljavax/crypto/SecretKey;
14: areturn
end local 6 end local 5 end local 4 end local 3 15: StackMap locals: sun.security.ssl.DHCrypt java.math.BigInteger int
StackMap stack: java.security.GeneralSecurityException
astore 3
start local 3 16: new javax.net.ssl.SSLHandshakeException
dup
17: ldc "Could not generate secret"
18: invokespecial javax.net.ssl.SSLHandshakeException.<init>:(Ljava/lang/String;)V
19: aload 3
invokevirtual javax.net.ssl.SSLHandshakeException.initCause:(Ljava/lang/Throwable;)Ljava/lang/Throwable;
20: checkcast javax.net.ssl.SSLHandshakeException
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 this Lsun/security/ssl/DHCrypt;
0 21 1 peerPublicValue Ljava/math/BigInteger;
0 21 2 keyIsValidated Z
1 15 3 kf Ljava/security/KeyFactory;
3 15 4 spec Ljavax/crypto/spec/DHPublicKeySpec;
4 15 5 publicKey Ljava/security/PublicKey;
5 15 6 ka Ljavax/crypto/KeyAgreement;
10 11 7 ike Ljava/security/InvalidKeyException;
16 21 3 e Ljava/security/GeneralSecurityException;
Exception table:
from to target type
7 8 9 Class java.security.InvalidKeyException
0 14 15 Class java.security.GeneralSecurityException
Exceptions:
throws javax.net.ssl.SSLHandshakeException
MethodParameters:
Name Flags
peerPublicValue
keyIsValidated
void checkConstraints(java.security.AlgorithmConstraints, java.math.BigInteger);
descriptor: (Ljava/security/AlgorithmConstraints;Ljava/math/BigInteger;)V
flags: (0x0000)
Code:
stack=5, locals=6, args_size=3
start local 0 start local 1 start local 2 0: ldc "DiffieHellman"
invokestatic sun.security.ssl.JsseJce.getKeyFactory:(Ljava/lang/String;)Ljava/security/KeyFactory;
astore 3
start local 3 1: new javax.crypto.spec.DHPublicKeySpec
dup
aload 2
aload 0
getfield sun.security.ssl.DHCrypt.modulus:Ljava/math/BigInteger;
aload 0
getfield sun.security.ssl.DHCrypt.base:Ljava/math/BigInteger;
invokespecial javax.crypto.spec.DHPublicKeySpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;)V
2: astore 4
start local 4 3: aload 3
aload 4
invokevirtual java.security.KeyFactory.generatePublic:(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;
checkcast javax.crypto.interfaces.DHPublicKey
astore 5
start local 5 4: aload 1
5: getstatic java.security.CryptoPrimitive.KEY_AGREEMENT:Ljava/security/CryptoPrimitive;
invokestatic java.util.EnumSet.of:(Ljava/lang/Enum;)Ljava/util/EnumSet;
aload 5
6: invokeinterface java.security.AlgorithmConstraints.permits:(Ljava/util/Set;Ljava/security/Key;)Z
7: ifne 17
8: new javax.net.ssl.SSLHandshakeException
dup
9: ldc "DHPublicKey does not comply to algorithm constraints"
10: invokespecial javax.net.ssl.SSLHandshakeException.<init>:(Ljava/lang/String;)V
athrow
end local 5 end local 4 end local 3 11: StackMap locals:
StackMap stack: java.security.GeneralSecurityException
astore 3
start local 3 12: new javax.net.ssl.SSLHandshakeException
dup
13: ldc "Could not generate DHPublicKey"
14: invokespecial javax.net.ssl.SSLHandshakeException.<init>:(Ljava/lang/String;)V
15: aload 3
invokevirtual javax.net.ssl.SSLHandshakeException.initCause:(Ljava/lang/Throwable;)Ljava/lang/Throwable;
16: checkcast javax.net.ssl.SSLHandshakeException
athrow
end local 3 17: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Lsun/security/ssl/DHCrypt;
0 18 1 constraints Ljava/security/AlgorithmConstraints;
0 18 2 peerPublicValue Ljava/math/BigInteger;
1 11 3 kf Ljava/security/KeyFactory;
3 11 4 spec Ljavax/crypto/spec/DHPublicKeySpec;
4 11 5 publicKey Ljavax/crypto/interfaces/DHPublicKey;
12 17 3 gse Ljava/security/GeneralSecurityException;
Exception table:
from to target type
0 11 11 Class java.security.GeneralSecurityException
Exceptions:
throws javax.net.ssl.SSLHandshakeException
MethodParameters:
Name Flags
constraints
peerPublicValue
private javax.crypto.spec.DHPublicKeySpec generateDHPublicKeySpec(java.security.KeyPairGenerator);
descriptor: (Ljava/security/KeyPairGenerator;)Ljavax/crypto/spec/DHPublicKeySpec;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=7, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.security.KeyPairGenerator.getProvider:()Ljava/security/Provider;
invokevirtual java.security.Provider.getName:()Ljava/lang/String;
invokestatic sun.security.util.KeyUtil.isOracleJCEProvider:(Ljava/lang/String;)Z
ifeq 1
iconst_0
goto 2
StackMap locals:
StackMap stack:
1: iconst_1
2: StackMap locals:
StackMap stack: int
istore 2
start local 2 3: iconst_0
istore 3
start local 3 4: goto 16
5: StackMap locals: int int
StackMap stack:
aload 1
invokevirtual java.security.KeyPairGenerator.generateKeyPair:()Ljava/security/KeyPair;
astore 4
start local 4 6: aload 0
aload 4
invokevirtual java.security.KeyPair.getPrivate:()Ljava/security/PrivateKey;
putfield sun.security.ssl.DHCrypt.privateKey:Ljava/security/PrivateKey;
7: aload 4
invokevirtual java.security.KeyPair.getPublic:()Ljava/security/PublicKey;
invokestatic sun.security.ssl.DHCrypt.getDHPublicKeySpec:(Ljava/security/PublicKey;)Ljavax/crypto/spec/DHPublicKeySpec;
astore 5
start local 5 8: iload 2
ifeq 14
9: aload 5
invokestatic sun.security.util.KeyUtil.validate:(Ljava/security/spec/KeySpec;)V
10: goto 14
StackMap locals: sun.security.ssl.DHCrypt java.security.KeyPairGenerator int int java.security.KeyPair javax.crypto.spec.DHPublicKeySpec
StackMap stack: java.security.InvalidKeyException
11: astore 6
start local 6 12: iload 3
getstatic sun.security.ssl.DHCrypt.MAX_FAILOVER_TIMES:I
if_icmpne 15
13: aload 6
athrow
end local 6 14: StackMap locals:
StackMap stack:
aload 5
areturn
end local 5 end local 4 15: StackMap locals:
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
16: iload 3
getstatic sun.security.ssl.DHCrypt.MAX_FAILOVER_TIMES:I
if_icmple 5
end local 3 17: aconst_null
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Lsun/security/ssl/DHCrypt;
0 18 1 kpg Ljava/security/KeyPairGenerator;
3 18 2 doExtraValiadtion Z
4 17 3 i I
6 15 4 kp Ljava/security/KeyPair;
8 15 5 spec Ljavax/crypto/spec/DHPublicKeySpec;
12 14 6 ivke Ljava/security/InvalidKeyException;
Exception table:
from to target type
9 10 11 Class java.security.InvalidKeyException
Exceptions:
throws java.security.GeneralSecurityException
MethodParameters:
Name Flags
kpg
}
SourceFile: "DHCrypt.java"