public final class sun.security.ec.ECDHKeyAgreement extends javax.crypto.KeyAgreementSpi
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: sun.security.ec.ECDHKeyAgreement
super_class: javax.crypto.KeyAgreementSpi
{
private java.security.interfaces.ECPrivateKey privateKey;
descriptor: Ljava/security/interfaces/ECPrivateKey;
flags: (0x0002) ACC_PRIVATE
private java.security.interfaces.ECPublicKey publicKey;
descriptor: Ljava/security/interfaces/ECPublicKey;
flags: (0x0002) ACC_PRIVATE
private int secretLen;
descriptor: I
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial javax.crypto.KeyAgreementSpi.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lsun/security/ec/ECDHKeyAgreement;
protected void engineInit(java.security.Key, java.security.SecureRandom);
descriptor: (Ljava/security/Key;Ljava/security/SecureRandom;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
instanceof java.security.PrivateKey
ifne 4
1: new java.security.InvalidKeyException
dup
2: ldc "Key must be instance of PrivateKey"
3: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
aload 1
invokestatic sun.security.ec.ECKeyFactory.toECKey:(Ljava/security/Key;)Ljava/security/interfaces/ECKey;
checkcast java.security.interfaces.ECPrivateKey
putfield sun.security.ec.ECDHKeyAgreement.privateKey:Ljava/security/interfaces/ECPrivateKey;
5: aload 0
aconst_null
putfield sun.security.ec.ECDHKeyAgreement.publicKey:Ljava/security/interfaces/ECPublicKey;
6: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lsun/security/ec/ECDHKeyAgreement;
0 7 1 key Ljava/security/Key;
0 7 2 random Ljava/security/SecureRandom;
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
key
random
protected void engineInit(java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom);
descriptor: (Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 2
ifnull 4
1: new java.security.InvalidAlgorithmParameterException
dup
2: ldc "Parameters not supported"
3: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
aload 1
aload 3
invokevirtual sun.security.ec.ECDHKeyAgreement.engineInit:(Ljava/security/Key;Ljava/security/SecureRandom;)V
5: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lsun/security/ec/ECDHKeyAgreement;
0 6 1 key Ljava/security/Key;
0 6 2 params Ljava/security/spec/AlgorithmParameterSpec;
0 6 3 random Ljava/security/SecureRandom;
Exceptions:
throws java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException
MethodParameters:
Name Flags
key
params
random
protected java.security.Key engineDoPhase(java.security.Key, boolean);
descriptor: (Ljava/security/Key;Z)Ljava/security/Key;
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield sun.security.ec.ECDHKeyAgreement.privateKey:Ljava/security/interfaces/ECPrivateKey;
ifnonnull 2
1: new java.lang.IllegalStateException
dup
ldc "Not initialized"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.ec.ECDHKeyAgreement.publicKey:Ljava/security/interfaces/ECPublicKey;
ifnull 4
3: new java.lang.IllegalStateException
dup
ldc "Phase already executed"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
iload 2
ifne 8
5: new java.lang.IllegalStateException
dup
6: ldc "Only two party agreement supported, lastPhase must be true"
7: invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.interfaces.ECPublicKey
ifne 12
9: new java.security.InvalidKeyException
dup
10: ldc "Key must be a PublicKey with algorithm EC"
11: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
12: StackMap locals:
StackMap stack:
aload 0
aload 1
checkcast java.security.interfaces.ECPublicKey
putfield sun.security.ec.ECDHKeyAgreement.publicKey:Ljava/security/interfaces/ECPublicKey;
13: aload 0
getfield sun.security.ec.ECDHKeyAgreement.publicKey:Ljava/security/interfaces/ECPublicKey;
invokeinterface java.security.interfaces.ECPublicKey.getParams:()Ljava/security/spec/ECParameterSpec;
astore 3
start local 3 14: aload 3
invokevirtual java.security.spec.ECParameterSpec.getCurve:()Ljava/security/spec/EllipticCurve;
invokevirtual java.security.spec.EllipticCurve.getField:()Ljava/security/spec/ECField;
invokeinterface java.security.spec.ECField.getFieldSize:()I
istore 4
start local 4 15: aload 0
iload 4
bipush 7
iadd
iconst_3
ishr
putfield sun.security.ec.ECDHKeyAgreement.secretLen:I
16: aconst_null
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lsun/security/ec/ECDHKeyAgreement;
0 17 1 key Ljava/security/Key;
0 17 2 lastPhase Z
14 17 3 params Ljava/security/spec/ECParameterSpec;
15 17 4 keyLenBits I
Exceptions:
throws java.security.InvalidKeyException, java.lang.IllegalStateException
MethodParameters:
Name Flags
key
lastPhase
private static void validateCoordinate(java.math.BigInteger, java.math.BigInteger);
descriptor: (Ljava/math/BigInteger;Ljava/math/BigInteger;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getstatic java.math.BigInteger.ZERO:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
ifge 2
1: new java.security.ProviderException
dup
ldc "invalid coordinate"
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
iflt 4
3: new java.security.ProviderException
dup
ldc "invalid coordinate"
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 c Ljava/math/BigInteger;
0 5 1 mod Ljava/math/BigInteger;
MethodParameters:
Name Flags
c
mod
private static void validate(sun.security.ec.ECOperations, java.security.interfaces.ECPublicKey);
descriptor: (Lsun/security/ec/ECOperations;Ljava/security/interfaces/ECPublicKey;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=13, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface java.security.interfaces.ECPublicKey.getW:()Ljava/security/spec/ECPoint;
invokevirtual java.security.spec.ECPoint.getAffineX:()Ljava/math/BigInteger;
astore 2
start local 2 1: aload 1
invokeinterface java.security.interfaces.ECPublicKey.getW:()Ljava/security/spec/ECPoint;
invokevirtual java.security.spec.ECPoint.getAffineY:()Ljava/math/BigInteger;
astore 3
start local 3 2: aload 0
invokevirtual sun.security.ec.ECOperations.getField:()Lsun/security/util/math/IntegerFieldModuloP;
invokeinterface sun.security.util.math.IntegerFieldModuloP.getSize:()Ljava/math/BigInteger;
astore 4
start local 4 3: aload 2
aload 4
invokestatic sun.security.ec.ECDHKeyAgreement.validateCoordinate:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
4: aload 3
aload 4
invokestatic sun.security.ec.ECDHKeyAgreement.validateCoordinate:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
5: aload 1
invokeinterface java.security.interfaces.ECPublicKey.getParams:()Ljava/security/spec/ECParameterSpec;
invokevirtual java.security.spec.ECParameterSpec.getCurve:()Ljava/security/spec/EllipticCurve;
astore 5
start local 5 6: aload 2
ldc 3
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
aload 4
invokevirtual java.math.BigInteger.modPow:(Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
aload 5
invokevirtual java.security.spec.EllipticCurve.getA:()Ljava/math/BigInteger;
7: aload 2
invokevirtual java.math.BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
8: invokevirtual java.math.BigInteger.add:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
9: aload 5
invokevirtual java.security.spec.EllipticCurve.getB:()Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.add:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
aload 4
invokevirtual java.math.BigInteger.mod:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
10: astore 6
start local 6 11: aload 3
ldc 2
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
aload 4
invokevirtual java.math.BigInteger.modPow:(Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
aload 4
invokevirtual java.math.BigInteger.mod:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 7
start local 7 12: aload 6
aload 7
invokevirtual java.math.BigInteger.equals:(Ljava/lang/Object;)Z
ifne 14
13: new java.security.ProviderException
dup
ldc "point is not on curve"
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;)V
athrow
14: StackMap locals: sun.security.ec.ECOperations java.security.interfaces.ECPublicKey java.math.BigInteger java.math.BigInteger java.math.BigInteger java.security.spec.EllipticCurve java.math.BigInteger java.math.BigInteger
StackMap stack:
aload 0
invokevirtual sun.security.ec.ECOperations.getField:()Lsun/security/util/math/IntegerFieldModuloP;
aload 2
invokeinterface sun.security.util.math.IntegerFieldModuloP.getElement:(Ljava/math/BigInteger;)Lsun/security/util/math/ImmutableIntegerModuloP;
astore 8
start local 8 15: aload 0
invokevirtual sun.security.ec.ECOperations.getField:()Lsun/security/util/math/IntegerFieldModuloP;
aload 3
invokeinterface sun.security.util.math.IntegerFieldModuloP.getElement:(Ljava/math/BigInteger;)Lsun/security/util/math/ImmutableIntegerModuloP;
astore 9
start local 9 16: new sun.security.ec.point.AffinePoint
dup
aload 8
aload 9
invokespecial sun.security.ec.point.AffinePoint.<init>:(Lsun/security/util/math/ImmutableIntegerModuloP;Lsun/security/util/math/ImmutableIntegerModuloP;)V
astore 10
start local 10 17: aload 1
invokeinterface java.security.interfaces.ECPublicKey.getParams:()Ljava/security/spec/ECParameterSpec;
invokevirtual java.security.spec.ECParameterSpec.getOrder:()Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.toByteArray:()[B
astore 11
start local 11 18: aload 11
invokestatic sun.security.util.ArrayUtil.reverse:([B)V
19: aload 0
aload 10
aload 11
invokevirtual sun.security.ec.ECOperations.multiply:(Lsun/security/ec/point/AffinePoint;[B)Lsun/security/ec/point/MutablePoint;
astore 12
start local 12 20: aload 0
aload 12
invokevirtual sun.security.ec.ECOperations.isNeutral:(Lsun/security/ec/point/Point;)Z
ifne 22
21: new java.security.ProviderException
dup
ldc "point has incorrect order"
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;)V
athrow
22: StackMap locals: sun.security.ec.ECOperations java.security.interfaces.ECPublicKey java.math.BigInteger java.math.BigInteger java.math.BigInteger java.security.spec.EllipticCurve java.math.BigInteger java.math.BigInteger sun.security.util.math.ImmutableIntegerModuloP sun.security.util.math.ImmutableIntegerModuloP sun.security.ec.point.AffinePoint byte[] sun.security.ec.point.Point
StackMap stack:
return
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 23 0 ops Lsun/security/ec/ECOperations;
0 23 1 key Ljava/security/interfaces/ECPublicKey;
1 23 2 x Ljava/math/BigInteger;
2 23 3 y Ljava/math/BigInteger;
3 23 4 p Ljava/math/BigInteger;
6 23 5 curve Ljava/security/spec/EllipticCurve;
11 23 6 rhs Ljava/math/BigInteger;
12 23 7 lhs Ljava/math/BigInteger;
15 23 8 xElem Lsun/security/util/math/ImmutableIntegerModuloP;
16 23 9 yElem Lsun/security/util/math/ImmutableIntegerModuloP;
17 23 10 affP Lsun/security/ec/point/AffinePoint;
18 23 11 order [B
20 23 12 product Lsun/security/ec/point/Point;
MethodParameters:
Name Flags
ops
key
protected byte[] engineGenerateSecret();
descriptor: ()[B
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield sun.security.ec.ECDHKeyAgreement.privateKey:Ljava/security/interfaces/ECPrivateKey;
ifnull 1
aload 0
getfield sun.security.ec.ECDHKeyAgreement.publicKey:Ljava/security/interfaces/ECPublicKey;
ifnonnull 2
1: StackMap locals:
StackMap stack:
new java.lang.IllegalStateException
dup
ldc "Not initialized correctly"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.ec.ECDHKeyAgreement.privateKey:Ljava/security/interfaces/ECPrivateKey;
aload 0
getfield sun.security.ec.ECDHKeyAgreement.publicKey:Ljava/security/interfaces/ECPublicKey;
invokestatic sun.security.ec.ECDHKeyAgreement.deriveKeyImpl:(Ljava/security/interfaces/ECPrivateKey;Ljava/security/interfaces/ECPublicKey;)Lsun/security/util/Optional;
astore 1
start local 1 3: aload 1
new sun.security.ec.ECDHKeyAgreement$1
dup
aload 0
invokespecial sun.security.ec.ECDHKeyAgreement$1.<init>:(Lsun/security/ec/ECDHKeyAgreement;)V
invokevirtual sun.security.util.Optional.orElseGet:(Lsun/security/util/Supplier;)Ljava/lang/Object;
checkcast byte[]
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lsun/security/ec/ECDHKeyAgreement;
3 4 1 resultOpt Lsun/security/util/Optional<[B>;
Exceptions:
throws java.lang.IllegalStateException
protected int engineGenerateSecret(byte[], int);
descriptor: ([BI)I
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 2 0: iload 2
aload 0
getfield sun.security.ec.ECDHKeyAgreement.secretLen:I
iadd
aload 1
arraylength
if_icmple 5
1: new javax.crypto.ShortBufferException
dup
new java.lang.StringBuilder
dup
ldc "Need "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield sun.security.ec.ECDHKeyAgreement.secretLen:I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
2: ldc " bytes, only "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
arraylength
iload 2
isub
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
3: ldc " available"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
4: invokespecial javax.crypto.ShortBufferException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 0
invokevirtual sun.security.ec.ECDHKeyAgreement.engineGenerateSecret:()[B
astore 3
start local 3 6: aload 3
iconst_0
aload 1
iload 2
aload 3
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
7: aload 3
arraylength
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lsun/security/ec/ECDHKeyAgreement;
0 8 1 sharedSecret [B
0 8 2 offset I
6 8 3 secret [B
Exceptions:
throws java.lang.IllegalStateException, javax.crypto.ShortBufferException
MethodParameters:
Name Flags
sharedSecret
offset
protected javax.crypto.SecretKey engineGenerateSecret(java.lang.String);
descriptor: (Ljava/lang/String;)Ljavax/crypto/SecretKey;
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ifnonnull 2
1: new java.security.NoSuchAlgorithmException
dup
ldc "Algorithm must not be null"
invokespecial java.security.NoSuchAlgorithmException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 1
ldc "TlsPremasterSecret"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 6
3: new java.security.NoSuchAlgorithmException
dup
4: ldc "Only supported for algorithm TlsPremasterSecret"
5: invokespecial java.security.NoSuchAlgorithmException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
new javax.crypto.spec.SecretKeySpec
dup
aload 0
invokevirtual sun.security.ec.ECDHKeyAgreement.engineGenerateSecret:()[B
ldc "TlsPremasterSecret"
invokespecial javax.crypto.spec.SecretKeySpec.<init>:([BLjava/lang/String;)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lsun/security/ec/ECDHKeyAgreement;
0 7 1 algorithm Ljava/lang/String;
Exceptions:
throws java.lang.IllegalStateException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException
MethodParameters:
Name Flags
algorithm
private static sun.security.util.Optional<byte[]> deriveKeyImpl(java.security.interfaces.ECPrivateKey, java.security.interfaces.ECPublicKey);
descriptor: (Ljava/security/interfaces/ECPrivateKey;Ljava/security/interfaces/ECPublicKey;)Lsun/security/util/Optional;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=19, args_size=2
start local 0 start local 1 0: aload 0
invokeinterface java.security.interfaces.ECPrivateKey.getParams:()Ljava/security/spec/ECParameterSpec;
astore 2
start local 2 1: aload 2
invokevirtual java.security.spec.ECParameterSpec.getCurve:()Ljava/security/spec/EllipticCurve;
astore 3
start local 3 2: aload 2
invokestatic sun.security.ec.ECOperations.forParameters:(Ljava/security/spec/ECParameterSpec;)Lsun/security/util/Optional;
astore 4
start local 4 3: aload 4
invokevirtual sun.security.util.Optional.isEmpty:()Z
ifeq 5
4: invokestatic sun.security.util.Optional.empty:()Lsun/security/util/Optional;
areturn
5: StackMap locals: java.security.spec.ECParameterSpec java.security.spec.EllipticCurve sun.security.util.Optional
StackMap stack:
aload 4
invokevirtual sun.security.util.Optional.get:()Ljava/lang/Object;
checkcast sun.security.ec.ECOperations
astore 5
start local 5 6: aload 0
instanceof sun.security.ec.ECPrivateKeyImpl
ifne 8
7: invokestatic sun.security.util.Optional.empty:()Lsun/security/util/Optional;
areturn
8: StackMap locals: sun.security.ec.ECOperations
StackMap stack:
aload 0
checkcast sun.security.ec.ECPrivateKeyImpl
astore 6
start local 6 9: aload 6
invokevirtual sun.security.ec.ECPrivateKeyImpl.getArrayS:()[B
astore 7
start local 7 10: aload 5
aload 1
invokestatic sun.security.ec.ECDHKeyAgreement.validate:(Lsun/security/ec/ECOperations;Ljava/security/interfaces/ECPublicKey;)V
11: aload 5
invokevirtual sun.security.ec.ECOperations.getField:()Lsun/security/util/math/IntegerFieldModuloP;
astore 8
start local 8 12: aload 8
aload 7
invokeinterface sun.security.util.math.IntegerFieldModuloP.getElement:([B)Lsun/security/util/math/ImmutableIntegerModuloP;
invokeinterface sun.security.util.math.ImmutableIntegerModuloP.mutable:()Lsun/security/util/math/MutableIntegerModuloP;
astore 9
start local 9 13: aload 8
aload 0
invokeinterface java.security.interfaces.ECPrivateKey.getParams:()Ljava/security/spec/ECParameterSpec;
invokevirtual java.security.spec.ECParameterSpec.getCofactor:()I
invokeinterface sun.security.util.math.IntegerFieldModuloP.getSmallValue:(I)Lsun/security/util/math/SmallValue;
14: astore 10
start local 10 15: aload 9
aload 10
invokeinterface sun.security.util.math.MutableIntegerModuloP.setProduct:(Lsun/security/util/math/SmallValue;)Lsun/security/util/math/MutableIntegerModuloP;
pop
16: aload 3
invokevirtual java.security.spec.EllipticCurve.getField:()Ljava/security/spec/ECField;
invokeinterface java.security.spec.ECField.getFieldSize:()I
bipush 7
iadd
bipush 8
idiv
istore 11
start local 11 17: aload 9
iload 11
invokeinterface sun.security.util.math.MutableIntegerModuloP.asByteArray:(I)[B
astore 12
start local 12 18: aload 8
aload 1
invokeinterface java.security.interfaces.ECPublicKey.getW:()Ljava/security/spec/ECPoint;
invokevirtual java.security.spec.ECPoint.getAffineX:()Ljava/math/BigInteger;
invokeinterface sun.security.util.math.IntegerFieldModuloP.getElement:(Ljava/math/BigInteger;)Lsun/security/util/math/ImmutableIntegerModuloP;
19: astore 13
start local 13 20: aload 8
aload 1
invokeinterface java.security.interfaces.ECPublicKey.getW:()Ljava/security/spec/ECPoint;
invokevirtual java.security.spec.ECPoint.getAffineY:()Ljava/math/BigInteger;
invokeinterface sun.security.util.math.IntegerFieldModuloP.getElement:(Ljava/math/BigInteger;)Lsun/security/util/math/ImmutableIntegerModuloP;
21: astore 14
start local 14 22: new sun.security.ec.point.AffinePoint
dup
aload 13
aload 14
invokespecial sun.security.ec.point.AffinePoint.<init>:(Lsun/security/util/math/ImmutableIntegerModuloP;Lsun/security/util/math/ImmutableIntegerModuloP;)V
astore 15
start local 15 23: aload 5
aload 15
aload 12
invokevirtual sun.security.ec.ECOperations.multiply:(Lsun/security/ec/point/AffinePoint;[B)Lsun/security/ec/point/MutablePoint;
astore 16
start local 16 24: aload 5
aload 16
invokevirtual sun.security.ec.ECOperations.isNeutral:(Lsun/security/ec/point/Point;)Z
ifeq 26
25: new java.security.ProviderException
dup
ldc "Product is zero"
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;)V
athrow
26: StackMap locals: java.security.interfaces.ECPrivateKey java.security.interfaces.ECPublicKey java.security.spec.ECParameterSpec java.security.spec.EllipticCurve sun.security.util.Optional sun.security.ec.ECOperations sun.security.ec.ECPrivateKeyImpl byte[] sun.security.util.math.IntegerFieldModuloP sun.security.util.math.MutableIntegerModuloP sun.security.util.math.SmallValue int byte[] sun.security.util.math.ImmutableIntegerModuloP sun.security.util.math.ImmutableIntegerModuloP sun.security.ec.point.AffinePoint sun.security.ec.point.Point
StackMap stack:
aload 16
invokeinterface sun.security.ec.point.Point.asAffine:()Lsun/security/ec/point/AffinePoint;
astore 17
start local 17 27: aload 17
invokevirtual sun.security.ec.point.AffinePoint.getX:()Lsun/security/util/math/ImmutableIntegerModuloP;
iload 11
invokeinterface sun.security.util.math.ImmutableIntegerModuloP.asByteArray:(I)[B
astore 18
start local 18 28: aload 18
invokestatic sun.security.util.ArrayUtil.reverse:([B)V
29: aload 18
invokestatic sun.security.util.Optional.of:(Ljava/lang/Object;)Lsun/security/util/Optional;
areturn
end local 18 end local 17 end local 16 end local 15 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 priv Ljava/security/interfaces/ECPrivateKey;
0 30 1 pubKey Ljava/security/interfaces/ECPublicKey;
1 30 2 ecSpec Ljava/security/spec/ECParameterSpec;
2 30 3 curve Ljava/security/spec/EllipticCurve;
3 30 4 opsOpt Lsun/security/util/Optional<Lsun/security/ec/ECOperations;>;
6 30 5 ops Lsun/security/ec/ECOperations;
9 30 6 privImpl Lsun/security/ec/ECPrivateKeyImpl;
10 30 7 sArr [B
12 30 8 field Lsun/security/util/math/IntegerFieldModuloP;
13 30 9 scalar Lsun/security/util/math/MutableIntegerModuloP;
15 30 10 cofactor Lsun/security/util/math/SmallValue;
17 30 11 keySize I
18 30 12 privArr [B
20 30 13 x Lsun/security/util/math/ImmutableIntegerModuloP;
22 30 14 y Lsun/security/util/math/ImmutableIntegerModuloP;
23 30 15 affPub Lsun/security/ec/point/AffinePoint;
24 30 16 product Lsun/security/ec/point/Point;
27 30 17 affProduct Lsun/security/ec/point/AffinePoint;
28 30 18 result [B
Signature: (Ljava/security/interfaces/ECPrivateKey;Ljava/security/interfaces/ECPublicKey;)Lsun/security/util/Optional<[B>;
MethodParameters:
Name Flags
priv
pubKey
private static byte[] deriveKeyNative(java.security.interfaces.ECPrivateKey, java.security.interfaces.ECPublicKey);
descriptor: (Ljava/security/interfaces/ECPrivateKey;Ljava/security/interfaces/ECPublicKey;)[B
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=7, args_size=2
start local 0 start local 1 0: aload 0
invokeinterface java.security.interfaces.ECPrivateKey.getParams:()Ljava/security/spec/ECParameterSpec;
astore 2
start local 2 1: aload 0
invokeinterface java.security.interfaces.ECPrivateKey.getS:()Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.toByteArray:()[B
astore 3
start local 3 2: aconst_null
aload 2
invokestatic sun.security.util.ECUtil.encodeECParameterSpec:(Ljava/security/Provider;Ljava/security/spec/ECParameterSpec;)[B
3: astore 4
start local 4 4: aload 1
instanceof sun.security.ec.ECPublicKeyImpl
ifeq 8
5: aload 1
checkcast sun.security.ec.ECPublicKeyImpl
astore 6
start local 6 6: aload 6
invokevirtual sun.security.ec.ECPublicKeyImpl.getEncodedPublicValue:()[B
astore 5
end local 6 start local 5 7: goto 10
end local 5 8: StackMap locals: java.security.spec.ECParameterSpec byte[] byte[]
StackMap stack:
aload 1
invokeinterface java.security.interfaces.ECPublicKey.getW:()Ljava/security/spec/ECPoint;
aload 2
invokevirtual java.security.spec.ECParameterSpec.getCurve:()Ljava/security/spec/EllipticCurve;
invokestatic sun.security.util.ECUtil.encodePoint:(Ljava/security/spec/ECPoint;Ljava/security/spec/EllipticCurve;)[B
9: astore 5
start local 5 10: StackMap locals: byte[]
StackMap stack:
aload 3
aload 5
aload 4
invokestatic sun.security.ec.ECDHKeyAgreement.deriveKey:([B[B[B)[B
11: areturn
12: StackMap locals:
StackMap stack: java.security.GeneralSecurityException
astore 6
start local 6 13: new java.security.ProviderException
dup
ldc "Could not derive key"
aload 6
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
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 14 0 privateKey Ljava/security/interfaces/ECPrivateKey;
0 14 1 publicKey Ljava/security/interfaces/ECPublicKey;
1 14 2 params Ljava/security/spec/ECParameterSpec;
2 14 3 s [B
4 14 4 encodedParams [B
7 8 5 publicValue [B
10 14 5 publicValue [B
6 7 6 ecPub Lsun/security/ec/ECPublicKeyImpl;
13 14 6 e Ljava/security/GeneralSecurityException;
Exception table:
from to target type
10 11 12 Class java.security.GeneralSecurityException
MethodParameters:
Name Flags
privateKey
publicKey
private static native byte[] deriveKey(byte[], byte[], byte[]);
descriptor: ([B[B[B)[B
flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.security.GeneralSecurityException
MethodParameters:
Name Flags
s
w
encodedParams
}
SourceFile: "ECDHKeyAgreement.java"
NestMembers:
sun.security.ec.ECDHKeyAgreement$1
InnerClasses:
sun.security.ec.ECDHKeyAgreement$1