final class sun.security.pkcs11.P11KeyAgreement extends javax.crypto.KeyAgreementSpi
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: sun.security.pkcs11.P11KeyAgreement
super_class: javax.crypto.KeyAgreementSpi
{
private final sun.security.pkcs11.Token token;
descriptor: Lsun/security/pkcs11/Token;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String algorithm;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final long mechanism;
descriptor: J
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private sun.security.pkcs11.P11Key privateKey;
descriptor: Lsun/security/pkcs11/P11Key;
flags: (0x0002) ACC_PRIVATE
private java.math.BigInteger publicValue;
descriptor: Ljava/math/BigInteger;
flags: (0x0002) ACC_PRIVATE
private int secretLen;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private javax.crypto.KeyAgreement multiPartyAgreement;
descriptor: Ljavax/crypto/KeyAgreement;
flags: (0x0002) ACC_PRIVATE
void <init>(sun.security.pkcs11.Token, java.lang.String, long);
descriptor: (Lsun/security/pkcs11/Token;Ljava/lang/String;J)V
flags: (0x0000)
Code:
stack=3, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial javax.crypto.KeyAgreementSpi.<init>:()V
1: aload 0
aload 1
putfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
2: aload 0
aload 2
putfield sun.security.pkcs11.P11KeyAgreement.algorithm:Ljava/lang/String;
3: aload 0
lload 3
putfield sun.security.pkcs11.P11KeyAgreement.mechanism:J
4: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lsun/security/pkcs11/P11KeyAgreement;
0 5 1 token Lsun/security/pkcs11/Token;
0 5 2 algorithm Ljava/lang/String;
0 5 3 mechanism J
MethodParameters:
Name Flags
token
algorithm
mechanism
protected void engineInit(java.security.Key, java.security.SecureRandom);
descriptor: (Ljava/security/Key;Ljava/security/SecureRandom;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, 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 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
aload 1
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.algorithm:Ljava/lang/String;
invokestatic sun.security.pkcs11.P11KeyFactory.convertKey:(Lsun/security/pkcs11/Token;Ljava/security/Key;Ljava/lang/String;)Lsun/security/pkcs11/P11Key;
putfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
5: aload 0
aconst_null
putfield sun.security.pkcs11.P11KeyAgreement.publicValue:Ljava/math/BigInteger;
6: aload 0
aconst_null
putfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
7: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lsun/security/pkcs11/P11KeyAgreement;
0 8 1 key Ljava/security/Key;
0 8 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.pkcs11.P11KeyAgreement.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/pkcs11/P11KeyAgreement;
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=4, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
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.pkcs11.P11KeyAgreement.publicValue:Ljava/math/BigInteger;
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:
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
ifnonnull 5
iload 2
ifne 16
5: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
ifnonnull 15
6: aload 0
7: ldc "DH"
invokestatic sun.security.pkcs11.P11Util.getSunJceProvider:()Ljava/security/Provider;
8: invokestatic javax.crypto.KeyAgreement.getInstance:(Ljava/lang/String;Ljava/security/Provider;)Ljavax/crypto/KeyAgreement;
putfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
9: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
invokevirtual javax.crypto.KeyAgreement.init:(Ljava/security/Key;)V
10: goto 15
StackMap locals:
StackMap stack: java.security.NoSuchAlgorithmException
11: astore 3
start local 3 12: new java.security.InvalidKeyException
dup
13: ldc "Could not initialize multi party agreement"
aload 3
14: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 15: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
aload 1
iload 2
invokevirtual javax.crypto.KeyAgreement.doPhase:(Ljava/security/Key;Z)Ljava/security/Key;
areturn
16: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.PublicKey
ifeq 18
17: aload 1
invokeinterface java.security.Key.getAlgorithm:()Ljava/lang/String;
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.algorithm:Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 21
18: StackMap locals:
StackMap stack:
new java.security.InvalidKeyException
dup
19: ldc "Key must be a PublicKey with algorithm DH"
20: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
21: StackMap locals:
StackMap stack:
aload 1
instanceof javax.crypto.interfaces.DHPublicKey
ifeq 29
22: aload 1
checkcast javax.crypto.interfaces.DHPublicKey
astore 6
start local 6 23: aload 6
invokestatic sun.security.util.KeyUtil.validate:(Ljava/security/Key;)V
24: aload 6
invokeinterface javax.crypto.interfaces.DHPublicKey.getY:()Ljava/math/BigInteger;
astore 5
start local 5 25: aload 6
invokeinterface javax.crypto.interfaces.DHPublicKey.getParams:()Ljavax/crypto/spec/DHParameterSpec;
astore 7
start local 7 26: aload 7
invokevirtual javax.crypto.spec.DHParameterSpec.getP:()Ljava/math/BigInteger;
astore 3
start local 3 27: aload 7
invokevirtual javax.crypto.spec.DHParameterSpec.getG:()Ljava/math/BigInteger;
astore 4
end local 7 end local 6 start local 4 28: goto 40
end local 5 end local 4 end local 3 29: StackMap locals:
StackMap stack:
new sun.security.pkcs11.P11DHKeyFactory
dup
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
ldc "DH"
invokespecial sun.security.pkcs11.P11DHKeyFactory.<init>:(Lsun/security/pkcs11/Token;Ljava/lang/String;)V
astore 6
start local 6 30: aload 6
31: aload 1
ldc Ljavax/crypto/spec/DHPublicKeySpec;
32: invokevirtual sun.security.pkcs11.P11DHKeyFactory.engineGetKeySpec:(Ljava/security/Key;Ljava/lang/Class;)Ljava/security/spec/KeySpec;
checkcast javax.crypto.spec.DHPublicKeySpec
astore 7
start local 7 33: aload 7
invokestatic sun.security.util.KeyUtil.validate:(Ljava/security/spec/KeySpec;)V
34: aload 7
invokevirtual javax.crypto.spec.DHPublicKeySpec.getY:()Ljava/math/BigInteger;
astore 5
start local 5 35: aload 7
invokevirtual javax.crypto.spec.DHPublicKeySpec.getP:()Ljava/math/BigInteger;
astore 3
start local 3 36: aload 7
invokevirtual javax.crypto.spec.DHPublicKeySpec.getG:()Ljava/math/BigInteger;
astore 4
end local 7 start local 4 37: goto 40
end local 5 end local 4 end local 3 StackMap locals: sun.security.pkcs11.P11KeyAgreement java.security.Key int top top top sun.security.pkcs11.P11DHKeyFactory
StackMap stack: java.security.spec.InvalidKeySpecException
38: astore 7
start local 7 39: new java.security.InvalidKeyException
dup
ldc "Could not obtain key values"
aload 7
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 7 end local 6 start local 3 start local 4 start local 5 40: StackMap locals: sun.security.pkcs11.P11KeyAgreement java.security.Key int java.math.BigInteger java.math.BigInteger java.math.BigInteger
StackMap stack:
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
instanceof javax.crypto.interfaces.DHPrivateKey
ifeq 48
41: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
checkcast javax.crypto.interfaces.DHPrivateKey
astore 6
start local 6 42: aload 6
invokeinterface javax.crypto.interfaces.DHPrivateKey.getParams:()Ljavax/crypto/spec/DHParameterSpec;
astore 7
start local 7 43: aload 3
aload 7
invokevirtual javax.crypto.spec.DHParameterSpec.getP:()Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.equals:(Ljava/lang/Object;)Z
ifeq 45
44: aload 4
aload 7
invokevirtual javax.crypto.spec.DHParameterSpec.getG:()Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.equals:(Ljava/lang/Object;)Z
ifne 48
45: StackMap locals: javax.crypto.interfaces.DHPrivateKey javax.crypto.spec.DHParameterSpec
StackMap stack:
new java.security.InvalidKeyException
dup
46: ldc "PublicKey DH parameters must match PrivateKey DH parameters"
47: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
end local 7 end local 6 48: StackMap locals:
StackMap stack:
aload 0
aload 5
putfield sun.security.pkcs11.P11KeyAgreement.publicValue:Ljava/math/BigInteger;
49: aload 0
aload 3
invokevirtual java.math.BigInteger.bitLength:()I
bipush 7
iadd
iconst_3
ishr
putfield sun.security.pkcs11.P11KeyAgreement.secretLen:I
50: 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 51 0 this Lsun/security/pkcs11/P11KeyAgreement;
0 51 1 key Ljava/security/Key;
0 51 2 lastPhase Z
12 15 3 e Ljava/security/NoSuchAlgorithmException;
27 29 3 p Ljava/math/BigInteger;
36 38 3 p Ljava/math/BigInteger;
40 51 3 p Ljava/math/BigInteger;
28 29 4 g Ljava/math/BigInteger;
37 38 4 g Ljava/math/BigInteger;
40 51 4 g Ljava/math/BigInteger;
25 29 5 y Ljava/math/BigInteger;
35 38 5 y Ljava/math/BigInteger;
40 51 5 y Ljava/math/BigInteger;
23 28 6 dhKey Ljavax/crypto/interfaces/DHPublicKey;
26 28 7 params Ljavax/crypto/spec/DHParameterSpec;
30 40 6 kf Lsun/security/pkcs11/P11DHKeyFactory;
33 37 7 spec Ljavax/crypto/spec/DHPublicKeySpec;
39 40 7 e Ljava/security/spec/InvalidKeySpecException;
42 48 6 dhKey Ljavax/crypto/interfaces/DHPrivateKey;
43 48 7 params Ljavax/crypto/spec/DHParameterSpec;
Exception table:
from to target type
6 10 11 Class java.security.NoSuchAlgorithmException
30 37 38 Class java.security.spec.InvalidKeySpecException
Exceptions:
throws java.security.InvalidKeyException, java.lang.IllegalStateException
MethodParameters:
Name Flags
key
lastPhase
protected byte[] engineGenerateSecret();
descriptor: ()[B
flags: (0x0004) ACC_PROTECTED
Code:
stack=9, locals=11, args_size=1
start local 0 0: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
ifnull 4
1: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
invokevirtual javax.crypto.KeyAgreement.generateSecret:()[B
astore 1
start local 1 2: aload 0
aconst_null
putfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
3: aload 1
areturn
end local 1 4: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
ifnull 5
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.publicValue:Ljava/math/BigInteger;
ifnonnull 6
5: StackMap locals:
StackMap stack:
new java.lang.IllegalStateException
dup
ldc "Not initialized correctly"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
aconst_null
astore 1
start local 1 7: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
invokevirtual sun.security.pkcs11.P11Key.getKeyID:()J
lstore 2
start local 2 8: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
invokevirtual sun.security.pkcs11.Token.getOpSession:()Lsun/security/pkcs11/Session;
astore 1
9: iconst_2
anewarray sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
iconst_0
10: new sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
lconst_0
ldc 4
invokespecial sun.security.pkcs11.wrapper.CK_ATTRIBUTE.<init>:(JJ)V
aastore
dup
iconst_1
11: new sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
ldc 256
ldc 16
invokespecial sun.security.pkcs11.wrapper.CK_ATTRIBUTE.<init>:(JJ)V
aastore
12: astore 4
start local 4 13: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
14: ldc "generate"
ldc 4
ldc 16
aload 4
15: invokevirtual sun.security.pkcs11.Token.getAttributes:(Ljava/lang/String;JJ[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
astore 4
16: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
getfield sun.security.pkcs11.Token.p11:Lsun/security/pkcs11/wrapper/PKCS11;
aload 1
invokevirtual sun.security.pkcs11.Session.id:()J
17: new sun.security.pkcs11.wrapper.CK_MECHANISM
dup
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.mechanism:J
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.publicValue:Ljava/math/BigInteger;
invokespecial sun.security.pkcs11.wrapper.CK_MECHANISM.<init>:(JLjava/math/BigInteger;)V
lload 2
18: aload 4
19: invokevirtual sun.security.pkcs11.wrapper.PKCS11.C_DeriveKey:(JLsun/security/pkcs11/wrapper/CK_MECHANISM;J[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)J
lstore 5
start local 5 20: iconst_1
anewarray sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
iconst_0
21: new sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
ldc 17
invokespecial sun.security.pkcs11.wrapper.CK_ATTRIBUTE.<init>:(J)V
aastore
22: astore 4
23: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
getfield sun.security.pkcs11.Token.p11:Lsun/security/pkcs11/wrapper/PKCS11;
aload 1
invokevirtual sun.security.pkcs11.Session.id:()J
lload 5
aload 4
invokevirtual sun.security.pkcs11.wrapper.PKCS11.C_GetAttributeValue:(JJ[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)V
24: aload 4
iconst_0
aaload
invokevirtual sun.security.pkcs11.wrapper.CK_ATTRIBUTE.getByteArray:()[B
astore 7
start local 7 25: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
getfield sun.security.pkcs11.Token.p11:Lsun/security/pkcs11/wrapper/PKCS11;
aload 1
invokevirtual sun.security.pkcs11.Session.id:()J
lload 5
invokevirtual sun.security.pkcs11.wrapper.PKCS11.C_DestroyObject:(JJ)V
26: aload 7
arraylength
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.secretLen:I
if_icmpne 32
27: aload 7
astore 10
28: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
invokevirtual sun.security.pkcs11.P11Key.releaseKeyID:()V
29: aload 0
aconst_null
putfield sun.security.pkcs11.P11KeyAgreement.publicValue:Ljava/math/BigInteger;
30: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
aload 1
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
31: aload 10
areturn
32: StackMap locals: sun.security.pkcs11.P11KeyAgreement sun.security.pkcs11.Session long sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] long byte[]
StackMap stack:
aload 7
arraylength
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.secretLen:I
if_icmple 34
33: new java.security.ProviderException
dup
ldc "generated secret is out-of-range"
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;)V
athrow
34: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.secretLen:I
newarray 8
astore 8
start local 8 35: aload 7
iconst_0
aload 8
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.secretLen:I
aload 7
arraylength
isub
36: aload 7
arraylength
37: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
38: aload 8
astore 10
39: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
invokevirtual sun.security.pkcs11.P11Key.releaseKeyID:()V
40: aload 0
aconst_null
putfield sun.security.pkcs11.P11KeyAgreement.publicValue:Ljava/math/BigInteger;
41: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
aload 1
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
42: aload 10
areturn
end local 8 end local 7 end local 5 end local 4 43: StackMap locals: sun.security.pkcs11.P11KeyAgreement sun.security.pkcs11.Session long
StackMap stack: sun.security.pkcs11.wrapper.PKCS11Exception
astore 4
start local 4 44: new java.security.ProviderException
dup
ldc "Could not derive key"
aload 4
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 4 45: StackMap locals:
StackMap stack: java.lang.Throwable
astore 9
46: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
invokevirtual sun.security.pkcs11.P11Key.releaseKeyID:()V
47: aload 0
aconst_null
putfield sun.security.pkcs11.P11KeyAgreement.publicValue:Ljava/math/BigInteger;
48: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
aload 1
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
49: aload 9
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 50 0 this Lsun/security/pkcs11/P11KeyAgreement;
2 4 1 val [B
7 50 1 session Lsun/security/pkcs11/Session;
8 50 2 privKeyID J
13 43 4 attributes [Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
20 43 5 keyID J
25 43 7 secret [B
35 43 8 newSecret [B
44 45 4 e Lsun/security/pkcs11/wrapper/PKCS11Exception;
Exception table:
from to target type
8 28 43 Class sun.security.pkcs11.wrapper.PKCS11Exception
32 39 43 Class sun.security.pkcs11.wrapper.PKCS11Exception
8 28 45 any
32 39 45 any
43 45 45 any
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: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
ifnull 4
1: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
aload 1
iload 2
invokevirtual javax.crypto.KeyAgreement.generateSecret:([BI)I
istore 3
start local 3 2: aload 0
aconst_null
putfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
3: iload 3
ireturn
end local 3 4: StackMap locals:
StackMap stack:
iload 2
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.secretLen:I
iadd
aload 1
arraylength
if_icmple 8
5: 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.pkcs11.P11KeyAgreement.secretLen:I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
6: 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;
7: invokespecial javax.crypto.ShortBufferException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
aload 0
invokevirtual sun.security.pkcs11.P11KeyAgreement.engineGenerateSecret:()[B
astore 3
start local 3 9: aload 3
iconst_0
aload 1
iload 2
aload 3
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
10: aload 3
arraylength
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lsun/security/pkcs11/P11KeyAgreement;
0 11 1 sharedSecret [B
0 11 2 offset I
2 4 3 n I
9 11 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=6, locals=5, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
ifnull 4
1: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
aload 1
invokevirtual javax.crypto.KeyAgreement.generateSecret:(Ljava/lang/String;)Ljavax/crypto/SecretKey;
astore 2
start local 2 2: aload 0
aconst_null
putfield sun.security.pkcs11.P11KeyAgreement.multiPartyAgreement:Ljavax/crypto/KeyAgreement;
3: aload 2
areturn
end local 2 4: StackMap locals:
StackMap stack:
aload 1
ifnonnull 6
5: new java.security.NoSuchAlgorithmException
dup
ldc "Algorithm must not be null"
invokespecial java.security.NoSuchAlgorithmException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
aload 1
ldc "TlsPremasterSecret"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 8
7: aload 0
aload 1
invokevirtual sun.security.pkcs11.P11KeyAgreement.nativeGenerateSecret:(Ljava/lang/String;)Ljavax/crypto/SecretKey;
areturn
8: StackMap locals:
StackMap stack:
aload 1
ldc "TlsPremasterSecret"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifne 13
9: getstatic sun.security.pkcs11.P11KeyAgreement$AllowKDF.VALUE:Z
ifne 13
10: new java.security.NoSuchAlgorithmException
dup
new java.lang.StringBuilder
dup
ldc "Unsupported secret key algorithm: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
11: aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
12: invokespecial java.security.NoSuchAlgorithmException.<init>:(Ljava/lang/String;)V
athrow
13: StackMap locals:
StackMap stack:
aload 0
invokevirtual sun.security.pkcs11.P11KeyAgreement.engineGenerateSecret:()[B
astore 2
start local 2 14: aload 1
ldc "DES"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 17
15: bipush 8
istore 3
start local 3 16: goto 29
end local 3 StackMap locals: byte[]
StackMap stack:
17: aload 1
ldc "DESede"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 20
18: bipush 24
istore 3
start local 3 19: goto 29
end local 3 StackMap locals:
StackMap stack:
20: aload 1
ldc "Blowfish"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 23
21: bipush 56
aload 2
arraylength
invokestatic java.lang.Math.min:(II)I
istore 3
start local 3 22: goto 29
end local 3 StackMap locals:
StackMap stack:
23: aload 1
ldc "TlsPremasterSecret"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 26
24: aload 2
arraylength
istore 3
start local 3 25: goto 29
end local 3 26: StackMap locals:
StackMap stack:
new java.security.NoSuchAlgorithmException
dup
27: new java.lang.StringBuilder
dup
ldc "Unknown algorithm "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
28: invokespecial java.security.NoSuchAlgorithmException.<init>:(Ljava/lang/String;)V
athrow
start local 3 29: StackMap locals: int
StackMap stack:
aload 2
arraylength
iload 3
if_icmpge 31
30: new java.security.InvalidKeyException
dup
ldc "Secret too short"
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
31: StackMap locals:
StackMap stack:
aload 1
ldc "DES"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifne 33
32: aload 1
ldc "DESede"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 38
33: StackMap locals:
StackMap stack:
iconst_0
istore 4
start local 4 34: goto 37
35: StackMap locals: int
StackMap stack:
aload 2
iload 4
invokestatic sun.security.pkcs11.P11SecretKeyFactory.fixDESParity:([BI)V
36: iinc 4 8
StackMap locals:
StackMap stack:
37: iload 4
iload 3
if_icmplt 35
end local 4 38: StackMap locals:
StackMap stack:
new javax.crypto.spec.SecretKeySpec
dup
aload 2
iconst_0
iload 3
aload 1
invokespecial javax.crypto.spec.SecretKeySpec.<init>:([BIILjava/lang/String;)V
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 39 0 this Lsun/security/pkcs11/P11KeyAgreement;
0 39 1 algorithm Ljava/lang/String;
2 4 2 key Ljavax/crypto/SecretKey;
14 39 2 secret [B
16 17 3 keyLen I
19 20 3 keyLen I
22 23 3 keyLen I
25 26 3 keyLen I
29 39 3 keyLen I
34 38 4 i I
Exceptions:
throws java.lang.IllegalStateException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException
MethodParameters:
Name Flags
algorithm
private javax.crypto.SecretKey nativeGenerateSecret(java.lang.String);
descriptor: (Ljava/lang/String;)Ljavax/crypto/SecretKey;
flags: (0x0002) ACC_PRIVATE
Code:
stack=9, locals=17, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
ifnull 1
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.publicValue:Ljava/math/BigInteger;
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:
ldc 16
lstore 2
start local 2 3: aconst_null
astore 4
start local 4 4: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
invokevirtual sun.security.pkcs11.P11Key.getKeyID:()J
lstore 5
start local 5 5: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
invokevirtual sun.security.pkcs11.Token.getObjSession:()Lsun/security/pkcs11/Session;
astore 4
6: iconst_2
anewarray sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
iconst_0
7: new sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
lconst_0
ldc 4
invokespecial sun.security.pkcs11.wrapper.CK_ATTRIBUTE.<init>:(JJ)V
aastore
dup
iconst_1
8: new sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
ldc 256
lload 2
invokespecial sun.security.pkcs11.wrapper.CK_ATTRIBUTE.<init>:(JJ)V
aastore
9: astore 7
start local 7 10: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
11: ldc "generate"
ldc 4
lload 2
aload 7
12: invokevirtual sun.security.pkcs11.Token.getAttributes:(Ljava/lang/String;JJ[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
astore 7
13: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
getfield sun.security.pkcs11.Token.p11:Lsun/security/pkcs11/wrapper/PKCS11;
aload 4
invokevirtual sun.security.pkcs11.Session.id:()J
14: new sun.security.pkcs11.wrapper.CK_MECHANISM
dup
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.mechanism:J
aload 0
getfield sun.security.pkcs11.P11KeyAgreement.publicValue:Ljava/math/BigInteger;
invokespecial sun.security.pkcs11.wrapper.CK_MECHANISM.<init>:(JLjava/math/BigInteger;)V
lload 5
15: aload 7
16: invokevirtual sun.security.pkcs11.wrapper.PKCS11.C_DeriveKey:(JLsun/security/pkcs11/wrapper/CK_MECHANISM;J[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)J
lstore 8
start local 8 17: iconst_1
anewarray sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
iconst_0
18: new sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
ldc 353
invokespecial sun.security.pkcs11.wrapper.CK_ATTRIBUTE.<init>:(J)V
aastore
19: astore 10
start local 10 20: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
getfield sun.security.pkcs11.Token.p11:Lsun/security/pkcs11/wrapper/PKCS11;
aload 4
invokevirtual sun.security.pkcs11.Session.id:()J
lload 8
aload 10
invokevirtual sun.security.pkcs11.wrapper.PKCS11.C_GetAttributeValue:(JJ[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)V
21: aload 10
iconst_0
aaload
invokevirtual sun.security.pkcs11.wrapper.CK_ATTRIBUTE.getLong:()J
l2i
istore 11
start local 11 22: aload 4
lload 8
aload 1
iload 11
iconst_3
ishl
aload 7
23: invokestatic sun.security.pkcs11.P11Key.secretKey:(Lsun/security/pkcs11/Session;JLjava/lang/String;I[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)Ljavax/crypto/SecretKey;
astore 12
start local 12 24: ldc "RAW"
aload 12
invokeinterface javax.crypto.SecretKey.getFormat:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 29
25: aload 12
invokeinterface javax.crypto.SecretKey.getEncoded:()[B
astore 13
start local 13 26: aload 13
invokestatic sun.security.util.KeyUtil.trimZeroes:([B)[B
astore 14
start local 14 27: aload 13
aload 14
if_acmpeq 29
28: new javax.crypto.spec.SecretKeySpec
dup
aload 14
aload 1
invokespecial javax.crypto.spec.SecretKeySpec.<init>:([BLjava/lang/String;)V
astore 12
end local 14 end local 13 29: StackMap locals: sun.security.pkcs11.P11KeyAgreement java.lang.String long sun.security.pkcs11.Session long sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] long sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] int javax.crypto.SecretKey
StackMap stack:
aload 12
astore 16
30: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
invokevirtual sun.security.pkcs11.P11Key.releaseKeyID:()V
31: aload 0
aconst_null
putfield sun.security.pkcs11.P11KeyAgreement.publicValue:Ljava/math/BigInteger;
32: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
aload 4
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
33: aload 16
areturn
end local 12 end local 11 end local 10 end local 8 end local 7 34: StackMap locals: sun.security.pkcs11.P11KeyAgreement java.lang.String long sun.security.pkcs11.Session long
StackMap stack: sun.security.pkcs11.wrapper.PKCS11Exception
astore 7
start local 7 35: new java.security.InvalidKeyException
dup
ldc "Could not derive key"
aload 7
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 7 36: StackMap locals:
StackMap stack: java.lang.Throwable
astore 15
37: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.privateKey:Lsun/security/pkcs11/P11Key;
invokevirtual sun.security.pkcs11.P11Key.releaseKeyID:()V
38: aload 0
aconst_null
putfield sun.security.pkcs11.P11KeyAgreement.publicValue:Ljava/math/BigInteger;
39: aload 0
getfield sun.security.pkcs11.P11KeyAgreement.token:Lsun/security/pkcs11/Token;
aload 4
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
40: aload 15
athrow
end local 5 end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 41 0 this Lsun/security/pkcs11/P11KeyAgreement;
0 41 1 algorithm Ljava/lang/String;
3 41 2 keyType J
4 41 4 session Lsun/security/pkcs11/Session;
5 41 5 privKeyID J
10 34 7 attributes [Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
17 34 8 keyID J
20 34 10 lenAttributes [Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
22 34 11 keyLen I
24 34 12 key Ljavax/crypto/SecretKey;
26 29 13 keyBytes [B
27 29 14 newBytes [B
35 36 7 e Lsun/security/pkcs11/wrapper/PKCS11Exception;
Exception table:
from to target type
5 30 34 Class sun.security.pkcs11.wrapper.PKCS11Exception
5 30 36 any
34 36 36 any
Exceptions:
throws java.lang.IllegalStateException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException
MethodParameters:
Name Flags
algorithm
}
SourceFile: "P11KeyAgreement.java"
NestMembers:
sun.security.pkcs11.P11KeyAgreement$AllowKDF
InnerClasses:
private AllowKDF = sun.security.pkcs11.P11KeyAgreement$AllowKDF of sun.security.pkcs11.P11KeyAgreement