final class sun.security.ssl.ECDHCrypt
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: sun.security.ssl.ECDHCrypt
super_class: java.lang.Object
{
private java.security.PrivateKey privateKey;
descriptor: Ljava/security/PrivateKey;
flags: (0x0002) ACC_PRIVATE
private java.security.interfaces.ECPublicKey publicKey;
descriptor: Ljava/security/interfaces/ECPublicKey;
flags: (0x0002) ACC_PRIVATE
void <init>(java.security.PrivateKey, java.security.PublicKey);
descriptor: (Ljava/security/PrivateKey;Ljava/security/PublicKey;)V
flags: (0x0000)
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield sun.security.ssl.ECDHCrypt.privateKey:Ljava/security/PrivateKey;
2: aload 0
aload 2
checkcast java.security.interfaces.ECPublicKey
putfield sun.security.ssl.ECDHCrypt.publicKey:Ljava/security/interfaces/ECPublicKey;
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lsun/security/ssl/ECDHCrypt;
0 4 1 privateKey Ljava/security/PrivateKey;
0 4 2 publicKey Ljava/security/PublicKey;
MethodParameters:
Name Flags
privateKey
publicKey
void <init>(int, java.security.SecureRandom);
descriptor: (ILjava/security/SecureRandom;)V
flags: (0x0000)
Code:
stack=4, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: ldc "EC"
invokestatic sun.security.ssl.JsseJce.getKeyPairGenerator:(Ljava/lang/String;)Ljava/security/KeyPairGenerator;
astore 3
start local 3 2: iload 1
invokestatic sun.security.ssl.EllipticCurvesExtension.getECGenParamSpec:(I)Ljava/security/spec/ECGenParameterSpec;
3: astore 4
start local 4 4: aload 3
aload 4
aload 2
invokevirtual java.security.KeyPairGenerator.initialize:(Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
5: aload 3
invokevirtual java.security.KeyPairGenerator.generateKeyPair:()Ljava/security/KeyPair;
astore 5
start local 5 6: aload 0
aload 5
invokevirtual java.security.KeyPair.getPrivate:()Ljava/security/PrivateKey;
putfield sun.security.ssl.ECDHCrypt.privateKey:Ljava/security/PrivateKey;
7: aload 0
aload 5
invokevirtual java.security.KeyPair.getPublic:()Ljava/security/PublicKey;
checkcast java.security.interfaces.ECPublicKey
putfield sun.security.ssl.ECDHCrypt.publicKey:Ljava/security/interfaces/ECPublicKey;
end local 5 end local 4 end local 3 8: goto 11
StackMap locals: sun.security.ssl.ECDHCrypt int java.security.SecureRandom
StackMap stack: java.security.GeneralSecurityException
9: astore 3
start local 3 10: new java.lang.RuntimeException
dup
ldc "Could not generate DH keypair"
aload 3
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 11: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lsun/security/ssl/ECDHCrypt;
0 12 1 curveId I
0 12 2 random Ljava/security/SecureRandom;
2 8 3 kpg Ljava/security/KeyPairGenerator;
4 8 4 params Ljava/security/spec/ECGenParameterSpec;
6 8 5 kp Ljava/security/KeyPair;
10 11 3 e Ljava/security/GeneralSecurityException;
Exception table:
from to target type
1 8 9 Class java.security.GeneralSecurityException
MethodParameters:
Name Flags
curveId
random
void <init>(java.security.spec.ECParameterSpec, java.security.SecureRandom);
descriptor: (Ljava/security/spec/ECParameterSpec;Ljava/security/SecureRandom;)V
flags: (0x0000)
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: ldc "EC"
invokestatic sun.security.ssl.JsseJce.getKeyPairGenerator:(Ljava/lang/String;)Ljava/security/KeyPairGenerator;
astore 3
start local 3 2: aload 3
aload 1
aload 2
invokevirtual java.security.KeyPairGenerator.initialize:(Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
3: aload 3
invokevirtual java.security.KeyPairGenerator.generateKeyPair:()Ljava/security/KeyPair;
astore 4
start local 4 4: aload 0
aload 4
invokevirtual java.security.KeyPair.getPrivate:()Ljava/security/PrivateKey;
putfield sun.security.ssl.ECDHCrypt.privateKey:Ljava/security/PrivateKey;
5: aload 0
aload 4
invokevirtual java.security.KeyPair.getPublic:()Ljava/security/PublicKey;
checkcast java.security.interfaces.ECPublicKey
putfield sun.security.ssl.ECDHCrypt.publicKey:Ljava/security/interfaces/ECPublicKey;
end local 4 end local 3 6: goto 9
StackMap locals: sun.security.ssl.ECDHCrypt java.security.spec.ECParameterSpec java.security.SecureRandom
StackMap stack: java.security.GeneralSecurityException
7: astore 3
start local 3 8: new java.lang.RuntimeException
dup
ldc "Could not generate DH keypair"
aload 3
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 9: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lsun/security/ssl/ECDHCrypt;
0 10 1 params Ljava/security/spec/ECParameterSpec;
0 10 2 random Ljava/security/SecureRandom;
2 6 3 kpg Ljava/security/KeyPairGenerator;
4 6 4 kp Ljava/security/KeyPair;
8 9 3 e Ljava/security/GeneralSecurityException;
Exception table:
from to target type
1 6 7 Class java.security.GeneralSecurityException
MethodParameters:
Name Flags
params
random
java.security.PublicKey getPublicKey();
descriptor: ()Ljava/security/PublicKey;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield sun.security.ssl.ECDHCrypt.publicKey:Ljava/security/interfaces/ECPublicKey;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lsun/security/ssl/ECDHCrypt;
javax.crypto.SecretKey getAgreedSecret(java.security.PublicKey);
descriptor: (Ljava/security/PublicKey;)Ljavax/crypto/SecretKey;
flags: (0x0000)
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: ldc "ECDH"
invokestatic sun.security.ssl.JsseJce.getKeyAgreement:(Ljava/lang/String;)Ljavax/crypto/KeyAgreement;
astore 2
start local 2 1: aload 2
aload 0
getfield sun.security.ssl.ECDHCrypt.privateKey:Ljava/security/PrivateKey;
invokevirtual javax.crypto.KeyAgreement.init:(Ljava/security/Key;)V
2: aload 2
aload 1
iconst_1
invokevirtual javax.crypto.KeyAgreement.doPhase:(Ljava/security/Key;Z)Ljava/security/Key;
pop
3: aload 2
ldc "TlsPremasterSecret"
invokevirtual javax.crypto.KeyAgreement.generateSecret:(Ljava/lang/String;)Ljavax/crypto/SecretKey;
4: areturn
end local 2 5: StackMap locals:
StackMap stack: java.security.GeneralSecurityException
astore 2
start local 2 6: new javax.net.ssl.SSLHandshakeException
dup
7: ldc "Could not generate secret"
8: invokespecial javax.net.ssl.SSLHandshakeException.<init>:(Ljava/lang/String;)V
9: aload 2
invokevirtual javax.net.ssl.SSLHandshakeException.initCause:(Ljava/lang/Throwable;)Ljava/lang/Throwable;
10: checkcast javax.net.ssl.SSLHandshakeException
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lsun/security/ssl/ECDHCrypt;
0 11 1 peerPublicKey Ljava/security/PublicKey;
1 5 2 ka Ljavax/crypto/KeyAgreement;
6 11 2 e Ljava/security/GeneralSecurityException;
Exception table:
from to target type
0 4 5 Class java.security.GeneralSecurityException
Exceptions:
throws javax.net.ssl.SSLHandshakeException
MethodParameters:
Name Flags
peerPublicKey
javax.crypto.SecretKey getAgreedSecret(byte[]);
descriptor: ([B)Ljavax/crypto/SecretKey;
flags: (0x0000)
Code:
stack=4, locals=7, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.security.ssl.ECDHCrypt.publicKey:Ljava/security/interfaces/ECPublicKey;
invokeinterface java.security.interfaces.ECPublicKey.getParams:()Ljava/security/spec/ECParameterSpec;
astore 2
start local 2 1: aload 1
aload 2
invokevirtual java.security.spec.ECParameterSpec.getCurve:()Ljava/security/spec/EllipticCurve;
invokestatic sun.security.ssl.JsseJce.decodePoint:([BLjava/security/spec/EllipticCurve;)Ljava/security/spec/ECPoint;
2: astore 3
start local 3 3: ldc "EC"
invokestatic sun.security.ssl.JsseJce.getKeyFactory:(Ljava/lang/String;)Ljava/security/KeyFactory;
astore 4
start local 4 4: new java.security.spec.ECPublicKeySpec
dup
aload 3
aload 2
invokespecial java.security.spec.ECPublicKeySpec.<init>:(Ljava/security/spec/ECPoint;Ljava/security/spec/ECParameterSpec;)V
astore 5
start local 5 5: aload 4
aload 5
invokevirtual java.security.KeyFactory.generatePublic:(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;
astore 6
start local 6 6: aload 0
aload 6
invokevirtual sun.security.ssl.ECDHCrypt.getAgreedSecret:(Ljava/security/PublicKey;)Ljavax/crypto/SecretKey;
7: areturn
end local 6 end local 5 end local 4 end local 3 end local 2 8: StackMap locals:
StackMap stack: java.lang.Exception
astore 2
start local 2 9: new javax.net.ssl.SSLHandshakeException
dup
10: ldc "Could not generate secret"
11: invokespecial javax.net.ssl.SSLHandshakeException.<init>:(Ljava/lang/String;)V
12: aload 2
invokevirtual javax.net.ssl.SSLHandshakeException.initCause:(Ljava/lang/Throwable;)Ljava/lang/Throwable;
13: checkcast javax.net.ssl.SSLHandshakeException
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lsun/security/ssl/ECDHCrypt;
0 14 1 encodedPoint [B
1 8 2 params Ljava/security/spec/ECParameterSpec;
3 8 3 point Ljava/security/spec/ECPoint;
4 8 4 kf Ljava/security/KeyFactory;
5 8 5 spec Ljava/security/spec/ECPublicKeySpec;
6 8 6 peerPublicKey Ljava/security/PublicKey;
9 14 2 e Ljava/lang/Exception;
Exception table:
from to target type
0 7 8 Class java.security.GeneralSecurityException
0 7 8 Class java.io.IOException
Exceptions:
throws javax.net.ssl.SSLHandshakeException
MethodParameters:
Name Flags
encodedPoint
void checkConstraints(java.security.AlgorithmConstraints, byte[]);
descriptor: (Ljava/security/AlgorithmConstraints;[B)V
flags: (0x0000)
Code:
stack=4, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield sun.security.ssl.ECDHCrypt.publicKey:Ljava/security/interfaces/ECPublicKey;
invokeinterface java.security.interfaces.ECPublicKey.getParams:()Ljava/security/spec/ECParameterSpec;
astore 3
start local 3 1: aload 2
aload 3
invokevirtual java.security.spec.ECParameterSpec.getCurve:()Ljava/security/spec/EllipticCurve;
invokestatic sun.security.ssl.JsseJce.decodePoint:([BLjava/security/spec/EllipticCurve;)Ljava/security/spec/ECPoint;
2: astore 4
start local 4 3: new java.security.spec.ECPublicKeySpec
dup
aload 4
aload 3
invokespecial java.security.spec.ECPublicKeySpec.<init>:(Ljava/security/spec/ECPoint;Ljava/security/spec/ECParameterSpec;)V
astore 5
start local 5 4: ldc "EC"
invokestatic sun.security.ssl.JsseJce.getKeyFactory:(Ljava/lang/String;)Ljava/security/KeyFactory;
astore 6
start local 6 5: aload 6
aload 5
invokevirtual java.security.KeyFactory.generatePublic:(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;
checkcast java.security.interfaces.ECPublicKey
astore 7
start local 7 6: aload 1
7: getstatic java.security.CryptoPrimitive.KEY_AGREEMENT:Ljava/security/CryptoPrimitive;
invokestatic java.util.EnumSet.of:(Ljava/lang/Enum;)Ljava/util/EnumSet;
aload 7
8: invokeinterface java.security.AlgorithmConstraints.permits:(Ljava/util/Set;Ljava/security/Key;)Z
9: ifne 19
10: new javax.net.ssl.SSLHandshakeException
dup
11: ldc "ECPublicKey does not comply to algorithm constraints"
12: invokespecial javax.net.ssl.SSLHandshakeException.<init>:(Ljava/lang/String;)V
athrow
end local 7 end local 6 end local 5 end local 4 end local 3 13: StackMap locals:
StackMap stack: java.lang.Exception
astore 3
start local 3 14: new javax.net.ssl.SSLHandshakeException
dup
15: ldc "Could not generate ECPublicKey"
16: invokespecial javax.net.ssl.SSLHandshakeException.<init>:(Ljava/lang/String;)V
17: aload 3
invokevirtual javax.net.ssl.SSLHandshakeException.initCause:(Ljava/lang/Throwable;)Ljava/lang/Throwable;
18: checkcast javax.net.ssl.SSLHandshakeException
athrow
end local 3 19: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Lsun/security/ssl/ECDHCrypt;
0 20 1 constraints Ljava/security/AlgorithmConstraints;
0 20 2 encodedPoint [B
1 13 3 params Ljava/security/spec/ECParameterSpec;
3 13 4 point Ljava/security/spec/ECPoint;
4 13 5 spec Ljava/security/spec/ECPublicKeySpec;
5 13 6 kf Ljava/security/KeyFactory;
6 13 7 publicKey Ljava/security/interfaces/ECPublicKey;
14 19 3 e Ljava/lang/Exception;
Exception table:
from to target type
0 13 13 Class java.security.GeneralSecurityException
0 13 13 Class java.io.IOException
Exceptions:
throws javax.net.ssl.SSLHandshakeException
MethodParameters:
Name Flags
constraints
encodedPoint
}
SourceFile: "ECDHCrypt.java"