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 byte[] publicValue;
descriptor: [B
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.publicValue:[B
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=6, 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.publicValue:[B
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 1
checkcast java.security.interfaces.ECPublicKey
astore 3
start local 3 13: aload 3
invokeinterface java.security.interfaces.ECPublicKey.getParams:()Ljava/security/spec/ECParameterSpec;
astore 4
start local 4 14: aload 3
instanceof sun.security.ec.ECPublicKeyImpl
ifeq 17
15: aload 0
aload 3
checkcast sun.security.ec.ECPublicKeyImpl
invokevirtual sun.security.ec.ECPublicKeyImpl.getEncodedPublicValue:()[B
putfield sun.security.ec.ECDHKeyAgreement.publicValue:[B
16: goto 20
17: StackMap locals: java.security.interfaces.ECPublicKey java.security.spec.ECParameterSpec
StackMap stack:
aload 0
18: aload 3
invokeinterface java.security.interfaces.ECPublicKey.getW:()Ljava/security/spec/ECPoint;
aload 4
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
19: putfield sun.security.ec.ECDHKeyAgreement.publicValue:[B
20: StackMap locals:
StackMap stack:
aload 4
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 5
start local 5 21: aload 0
iload 5
bipush 7
iadd
iconst_3
ishr
putfield sun.security.ec.ECDHKeyAgreement.secretLen:I
22: aconst_null
areturn
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 this Lsun/security/ec/ECDHKeyAgreement;
0 23 1 key Ljava/security/Key;
0 23 2 lastPhase Z
13 23 3 ecKey Ljava/security/interfaces/ECPublicKey;
14 23 4 params Ljava/security/spec/ECParameterSpec;
21 23 5 keyLenBits I
Exceptions:
throws java.security.InvalidKeyException, java.lang.IllegalStateException
MethodParameters:
Name Flags
key
lastPhase
protected byte[] engineGenerateSecret();
descriptor: ()[B
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=4, 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.publicValue:[B
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;
invokeinterface java.security.interfaces.ECPrivateKey.getS:()Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.toByteArray:()[B
astore 1
start local 1 3: aconst_null
aload 0
getfield sun.security.ec.ECDHKeyAgreement.privateKey:Ljava/security/interfaces/ECPrivateKey;
invokeinterface java.security.interfaces.ECPrivateKey.getParams:()Ljava/security/spec/ECParameterSpec;
invokestatic sun.security.util.ECUtil.encodeECParameterSpec:(Ljava/security/Provider;Ljava/security/spec/ECParameterSpec;)[B
4: astore 2
start local 2 5: aload 1
aload 0
getfield sun.security.ec.ECDHKeyAgreement.publicValue:[B
aload 2
invokestatic sun.security.ec.ECDHKeyAgreement.deriveKey:([B[B[B)[B
6: areturn
7: StackMap locals: sun.security.ec.ECDHKeyAgreement byte[] byte[]
StackMap stack: java.security.GeneralSecurityException
astore 3
start local 3 8: new java.security.ProviderException
dup
ldc "Could not derive key"
aload 3
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lsun/security/ec/ECDHKeyAgreement;
3 9 1 s [B
5 9 2 encodedParams [B
8 9 3 e Ljava/security/GeneralSecurityException;
Exception table:
from to target type
5 6 7 Class java.security.GeneralSecurityException
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 4
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;
ldc " available"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
3: invokespecial javax.crypto.ShortBufferException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
invokevirtual sun.security.ec.ECDHKeyAgreement.engineGenerateSecret:()[B
astore 3
start local 3 5: aload 3
iconst_0
aload 1
iload 2
aload 3
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
6: aload 3
arraylength
ireturn
end local 3 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 sharedSecret [B
0 7 2 offset I
5 7 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 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"