public class org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement extends javax.crypto.KeyAgreementSpi
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement
super_class: javax.crypto.KeyAgreementSpi
{
private static final org.bouncycastle.asn1.x9.X9IntegerConverter converter;
descriptor: Lorg/bouncycastle/asn1/x9/X9IntegerConverter;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.Hashtable algorithms;
descriptor: Ljava/util/Hashtable;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private java.lang.String kaAlgorithm;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private java.math.BigInteger result;
descriptor: Ljava/math/BigInteger;
flags: (0x0002) ACC_PRIVATE
private org.bouncycastle.crypto.params.ECDomainParameters parameters;
descriptor: Lorg/bouncycastle/crypto/params/ECDomainParameters;
flags: (0x0002) ACC_PRIVATE
private org.bouncycastle.crypto.BasicAgreement agreement;
descriptor: Lorg/bouncycastle/crypto/BasicAgreement;
flags: (0x0002) ACC_PRIVATE
private org.bouncycastle.crypto.DerivationFunction kdf;
descriptor: Lorg/bouncycastle/crypto/DerivationFunction;
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=3, args_size=0
0: new org.bouncycastle.asn1.x9.X9IntegerConverter
dup
invokespecial org.bouncycastle.asn1.x9.X9IntegerConverter.<init>:()V
putstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.converter:Lorg/bouncycastle/asn1/x9/X9IntegerConverter;
1: new java.util.Hashtable
dup
invokespecial java.util.Hashtable.<init>:()V
putstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.algorithms:Ljava/util/Hashtable;
2: new java.lang.Integer
dup
sipush 128
invokespecial java.lang.Integer.<init>:(I)V
astore 0
start local 0 3: new java.lang.Integer
dup
sipush 192
invokespecial java.lang.Integer.<init>:(I)V
astore 1
start local 1 4: new java.lang.Integer
dup
sipush 256
invokespecial java.lang.Integer.<init>:(I)V
astore 2
start local 2 5: getstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.algorithms:Ljava/util/Hashtable;
getstatic org.bouncycastle.asn1.nist.NISTObjectIdentifiers.id_aes128_CBC:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
aload 0
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
6: getstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.algorithms:Ljava/util/Hashtable;
getstatic org.bouncycastle.asn1.nist.NISTObjectIdentifiers.id_aes192_CBC:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
aload 1
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
7: getstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.algorithms:Ljava/util/Hashtable;
getstatic org.bouncycastle.asn1.nist.NISTObjectIdentifiers.id_aes256_CBC:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
aload 2
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
8: getstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.algorithms:Ljava/util/Hashtable;
getstatic org.bouncycastle.asn1.nist.NISTObjectIdentifiers.id_aes128_wrap:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
aload 0
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
9: getstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.algorithms:Ljava/util/Hashtable;
getstatic org.bouncycastle.asn1.nist.NISTObjectIdentifiers.id_aes192_wrap:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
aload 1
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
10: getstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.algorithms:Ljava/util/Hashtable;
getstatic org.bouncycastle.asn1.nist.NISTObjectIdentifiers.id_aes256_wrap:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
aload 2
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
11: getstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.algorithms:Ljava/util/Hashtable;
getstatic org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers.id_alg_CMS3DESwrap:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
aload 1
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 2 end local 1 end local 0 12: return
LocalVariableTable:
Start End Slot Name Signature
3 12 0 i128 Ljava/lang/Integer;
4 12 1 i192 Ljava/lang/Integer;
5 12 2 i256 Ljava/lang/Integer;
private byte[] bigIntToBytes(java.math.BigInteger);
descriptor: (Ljava/math/BigInteger;)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: getstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.converter:Lorg/bouncycastle/asn1/x9/X9IntegerConverter;
aload 1
getstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.converter:Lorg/bouncycastle/asn1/x9/X9IntegerConverter;
aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.parameters:Lorg/bouncycastle/crypto/params/ECDomainParameters;
invokevirtual org.bouncycastle.crypto.params.ECDomainParameters.getG:()Lorg/bouncycastle/math/ec/ECPoint;
invokevirtual org.bouncycastle.math.ec.ECPoint.getX:()Lorg/bouncycastle/math/ec/ECFieldElement;
invokevirtual org.bouncycastle.asn1.x9.X9IntegerConverter.getByteLength:(Lorg/bouncycastle/math/ec/ECFieldElement;)I
invokevirtual org.bouncycastle.asn1.x9.X9IntegerConverter.integerToBytes:(Ljava/math/BigInteger;I)[B
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bouncycastle/jce/provider/asymmetric/ec/KeyAgreement;
0 1 1 r Ljava/math/BigInteger;
MethodParameters:
Name Flags
r
protected void <init>(java.lang.String, org.bouncycastle.crypto.BasicAgreement, org.bouncycastle.crypto.DerivationFunction);
descriptor: (Ljava/lang/String;Lorg/bouncycastle/crypto/BasicAgreement;Lorg/bouncycastle/crypto/DerivationFunction;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=4, 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 org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kaAlgorithm:Ljava/lang/String;
2: aload 0
aload 2
putfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.agreement:Lorg/bouncycastle/crypto/BasicAgreement;
3: aload 0
aload 3
putfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kdf:Lorg/bouncycastle/crypto/DerivationFunction;
4: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/bouncycastle/jce/provider/asymmetric/ec/KeyAgreement;
0 5 1 kaAlgorithm Ljava/lang/String;
0 5 2 agreement Lorg/bouncycastle/crypto/BasicAgreement;
0 5 3 kdf Lorg/bouncycastle/crypto/DerivationFunction;
MethodParameters:
Name Flags
kaAlgorithm
agreement
kdf
protected java.security.Key engineDoPhase(java.security.Key, boolean);
descriptor: (Ljava/security/Key;Z)Ljava/security/Key;
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=7, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.parameters:Lorg/bouncycastle/crypto/params/ECDomainParameters;
ifnonnull 2
1: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kaAlgorithm:Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " not initialised."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
iload 2
ifne 4
3: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kaAlgorithm:Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " can only be between two parties."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.agreement:Lorg/bouncycastle/crypto/BasicAgreement;
instanceof org.bouncycastle.crypto.agreement.ECMQVBasicAgreement
ifeq 16
5: aload 1
instanceof org.bouncycastle.jce.interfaces.MQVPublicKey
ifne 9
6: new java.security.InvalidKeyException
dup
new java.lang.StringBuilder
dup
aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kaAlgorithm:Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " key agreement requires "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
7: ldc Lorg/bouncycastle/jce/interfaces/MQVPublicKey;
invokestatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.getSimpleName:(Ljava/lang/Class;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " for doPhase"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
8: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals:
StackMap stack:
aload 1
checkcast org.bouncycastle.jce.interfaces.MQVPublicKey
astore 4
start local 4 10: aload 4
invokeinterface org.bouncycastle.jce.interfaces.MQVPublicKey.getStaticKey:()Ljava/security/PublicKey;
invokestatic org.bouncycastle.jce.provider.asymmetric.ec.ECUtil.generatePublicKeyParameter:(Ljava/security/PublicKey;)Lorg/bouncycastle/crypto/params/AsymmetricKeyParameter;
11: checkcast org.bouncycastle.crypto.params.ECPublicKeyParameters
astore 5
start local 5 12: aload 4
invokeinterface org.bouncycastle.jce.interfaces.MQVPublicKey.getEphemeralKey:()Ljava/security/PublicKey;
invokestatic org.bouncycastle.jce.provider.asymmetric.ec.ECUtil.generatePublicKeyParameter:(Ljava/security/PublicKey;)Lorg/bouncycastle/crypto/params/AsymmetricKeyParameter;
13: checkcast org.bouncycastle.crypto.params.ECPublicKeyParameters
astore 6
start local 6 14: new org.bouncycastle.crypto.params.MQVPublicParameters
dup
aload 5
aload 6
invokespecial org.bouncycastle.crypto.params.MQVPublicParameters.<init>:(Lorg/bouncycastle/crypto/params/ECPublicKeyParameters;Lorg/bouncycastle/crypto/params/ECPublicKeyParameters;)V
astore 3
end local 6 end local 5 end local 4 start local 3 15: goto 21
end local 3 16: StackMap locals:
StackMap stack:
aload 1
instanceof org.bouncycastle.jce.interfaces.ECPublicKey
ifne 20
17: new java.security.InvalidKeyException
dup
new java.lang.StringBuilder
dup
aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kaAlgorithm:Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " key agreement requires "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
18: ldc Lorg/bouncycastle/jce/interfaces/ECPublicKey;
invokestatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.getSimpleName:(Ljava/lang/Class;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " for doPhase"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
19: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
20: StackMap locals:
StackMap stack:
aload 1
checkcast java.security.PublicKey
invokestatic org.bouncycastle.jce.provider.asymmetric.ec.ECUtil.generatePublicKeyParameter:(Ljava/security/PublicKey;)Lorg/bouncycastle/crypto/params/AsymmetricKeyParameter;
astore 3
start local 3 21: StackMap locals: org.bouncycastle.crypto.CipherParameters
StackMap stack:
aload 0
aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.agreement:Lorg/bouncycastle/crypto/BasicAgreement;
aload 3
invokeinterface org.bouncycastle.crypto.BasicAgreement.calculateAgreement:(Lorg/bouncycastle/crypto/CipherParameters;)Ljava/math/BigInteger;
putfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.result:Ljava/math/BigInteger;
22: aconst_null
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 23 0 this Lorg/bouncycastle/jce/provider/asymmetric/ec/KeyAgreement;
0 23 1 key Ljava/security/Key;
0 23 2 lastPhase Z
15 16 3 pubKey Lorg/bouncycastle/crypto/CipherParameters;
21 23 3 pubKey Lorg/bouncycastle/crypto/CipherParameters;
10 15 4 mqvPubKey Lorg/bouncycastle/jce/interfaces/MQVPublicKey;
12 15 5 staticKey Lorg/bouncycastle/crypto/params/ECPublicKeyParameters;
14 15 6 ephemKey Lorg/bouncycastle/crypto/params/ECPublicKeyParameters;
Exceptions:
throws java.security.InvalidKeyException, java.lang.IllegalStateException
MethodParameters:
Name Flags
key
lastPhase
protected byte[] engineGenerateSecret();
descriptor: ()[B
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kdf:Lorg/bouncycastle/crypto/DerivationFunction;
ifnull 4
1: new java.lang.UnsupportedOperationException
dup
2: ldc "KDF can only be used when algorithm is known"
3: invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.result:Ljava/math/BigInteger;
invokevirtual org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.bigIntToBytes:(Ljava/math/BigInteger;)[B
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/bouncycastle/jce/provider/asymmetric/ec/KeyAgreement;
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
invokevirtual org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.engineGenerateSecret:()[B
astore 3
start local 3 1: aload 1
arraylength
iload 2
isub
aload 3
arraylength
if_icmpge 3
2: new javax.crypto.ShortBufferException
dup
new java.lang.StringBuilder
dup
aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kaAlgorithm:Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " key agreement: need "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 3
arraylength
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " bytes"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial javax.crypto.ShortBufferException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: byte[]
StackMap stack:
aload 3
iconst_0
aload 1
iload 2
aload 3
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
4: aload 3
arraylength
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/bouncycastle/jce/provider/asymmetric/ec/KeyAgreement;
0 5 1 sharedSecret [B
0 5 2 offset I
1 5 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=5, locals=6, args_size=2
start local 0 start local 1 0: aload 0
aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.result:Ljava/math/BigInteger;
invokevirtual org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.bigIntToBytes:(Ljava/math/BigInteger;)[B
astore 2
start local 2 1: aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kdf:Lorg/bouncycastle/crypto/DerivationFunction;
ifnull 10
2: getstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.algorithms:Ljava/util/Hashtable;
aload 1
invokevirtual java.util.Hashtable.containsKey:(Ljava/lang/Object;)Z
ifne 4
3: new java.security.NoSuchAlgorithmException
dup
new java.lang.StringBuilder
dup
ldc "unknown algorithm encountered: "
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;
invokespecial java.security.NoSuchAlgorithmException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals: byte[]
StackMap stack:
getstatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.algorithms:Ljava/util/Hashtable;
aload 1
invokevirtual java.util.Hashtable.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.Integer
invokevirtual java.lang.Integer.intValue:()I
istore 3
start local 3 5: new org.bouncycastle.crypto.agreement.kdf.DHKDFParameters
dup
new org.bouncycastle.asn1.DERObjectIdentifier
dup
aload 1
invokespecial org.bouncycastle.asn1.DERObjectIdentifier.<init>:(Ljava/lang/String;)V
iload 3
aload 2
invokespecial org.bouncycastle.crypto.agreement.kdf.DHKDFParameters.<init>:(Lorg/bouncycastle/asn1/DERObjectIdentifier;I[B)V
astore 4
start local 4 6: iload 3
bipush 8
idiv
newarray 8
astore 5
start local 5 7: aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kdf:Lorg/bouncycastle/crypto/DerivationFunction;
aload 4
invokeinterface org.bouncycastle.crypto.DerivationFunction.init:(Lorg/bouncycastle/crypto/DerivationParameters;)V
8: aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kdf:Lorg/bouncycastle/crypto/DerivationFunction;
aload 5
iconst_0
aload 5
arraylength
invokeinterface org.bouncycastle.crypto.DerivationFunction.generateBytes:([BII)I
pop
9: aload 5
astore 2
end local 5 end local 4 end local 3 10: StackMap locals:
StackMap stack:
new javax.crypto.spec.SecretKeySpec
dup
aload 2
aload 1
invokespecial javax.crypto.spec.SecretKeySpec.<init>:([BLjava/lang/String;)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/bouncycastle/jce/provider/asymmetric/ec/KeyAgreement;
0 11 1 algorithm Ljava/lang/String;
1 11 2 secret [B
5 10 3 keySize I
6 10 4 params Lorg/bouncycastle/crypto/agreement/kdf/DHKDFParameters;
7 10 5 keyBytes [B
Exceptions:
throws java.security.NoSuchAlgorithmException
MethodParameters:
Name Flags
algorithm
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=2, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
invokevirtual org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.initFromKey:(Ljava/security/Key;)V
1: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bouncycastle/jce/provider/asymmetric/ec/KeyAgreement;
0 2 1 key Ljava/security/Key;
0 2 2 params Ljava/security/spec/AlgorithmParameterSpec;
0 2 3 random Ljava/security/SecureRandom;
Exceptions:
throws java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException
MethodParameters:
Name Flags
key
params
random
protected void engineInit(java.security.Key, java.security.SecureRandom);
descriptor: (Ljava/security/Key;Ljava/security/SecureRandom;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokevirtual org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.initFromKey:(Ljava/security/Key;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bouncycastle/jce/provider/asymmetric/ec/KeyAgreement;
0 2 1 key Ljava/security/Key;
0 2 2 random Ljava/security/SecureRandom;
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
key
random
private void initFromKey(java.security.Key);
descriptor: (Ljava/security/Key;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.agreement:Lorg/bouncycastle/crypto/BasicAgreement;
instanceof org.bouncycastle.crypto.agreement.ECMQVBasicAgreement
ifeq 18
1: aload 1
instanceof org.bouncycastle.jce.interfaces.MQVPrivateKey
ifne 5
2: new java.security.InvalidKeyException
dup
new java.lang.StringBuilder
dup
aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kaAlgorithm:Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " key agreement requires "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
3: ldc Lorg/bouncycastle/jce/interfaces/MQVPrivateKey;
invokestatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.getSimpleName:(Ljava/lang/Class;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " for initialisation"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
4: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 1
checkcast org.bouncycastle.jce.interfaces.MQVPrivateKey
astore 2
start local 2 6: aload 2
invokeinterface org.bouncycastle.jce.interfaces.MQVPrivateKey.getStaticPrivateKey:()Ljava/security/PrivateKey;
invokestatic org.bouncycastle.jce.provider.asymmetric.ec.ECUtil.generatePrivateKeyParameter:(Ljava/security/PrivateKey;)Lorg/bouncycastle/crypto/params/AsymmetricKeyParameter;
7: checkcast org.bouncycastle.crypto.params.ECPrivateKeyParameters
astore 3
start local 3 8: aload 2
invokeinterface org.bouncycastle.jce.interfaces.MQVPrivateKey.getEphemeralPrivateKey:()Ljava/security/PrivateKey;
invokestatic org.bouncycastle.jce.provider.asymmetric.ec.ECUtil.generatePrivateKeyParameter:(Ljava/security/PrivateKey;)Lorg/bouncycastle/crypto/params/AsymmetricKeyParameter;
9: checkcast org.bouncycastle.crypto.params.ECPrivateKeyParameters
astore 4
start local 4 10: aconst_null
astore 5
start local 5 11: aload 2
invokeinterface org.bouncycastle.jce.interfaces.MQVPrivateKey.getEphemeralPublicKey:()Ljava/security/PublicKey;
ifnull 14
12: aload 2
invokeinterface org.bouncycastle.jce.interfaces.MQVPrivateKey.getEphemeralPublicKey:()Ljava/security/PublicKey;
invokestatic org.bouncycastle.jce.provider.asymmetric.ec.ECUtil.generatePublicKeyParameter:(Ljava/security/PublicKey;)Lorg/bouncycastle/crypto/params/AsymmetricKeyParameter;
13: checkcast org.bouncycastle.crypto.params.ECPublicKeyParameters
astore 5
14: StackMap locals: org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement java.security.Key org.bouncycastle.jce.interfaces.MQVPrivateKey org.bouncycastle.crypto.params.ECPrivateKeyParameters org.bouncycastle.crypto.params.ECPrivateKeyParameters org.bouncycastle.crypto.params.ECPublicKeyParameters
StackMap stack:
new org.bouncycastle.crypto.params.MQVPrivateParameters
dup
aload 3
aload 4
aload 5
invokespecial org.bouncycastle.crypto.params.MQVPrivateParameters.<init>:(Lorg/bouncycastle/crypto/params/ECPrivateKeyParameters;Lorg/bouncycastle/crypto/params/ECPrivateKeyParameters;Lorg/bouncycastle/crypto/params/ECPublicKeyParameters;)V
astore 6
start local 6 15: aload 0
aload 3
invokevirtual org.bouncycastle.crypto.params.ECPrivateKeyParameters.getParameters:()Lorg/bouncycastle/crypto/params/ECDomainParameters;
putfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.parameters:Lorg/bouncycastle/crypto/params/ECDomainParameters;
16: aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.agreement:Lorg/bouncycastle/crypto/BasicAgreement;
aload 6
invokeinterface org.bouncycastle.crypto.BasicAgreement.init:(Lorg/bouncycastle/crypto/CipherParameters;)V
end local 6 end local 5 end local 4 end local 3 end local 2 17: goto 25
18: StackMap locals: org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement java.security.Key
StackMap stack:
aload 1
instanceof org.bouncycastle.jce.interfaces.ECPrivateKey
ifne 22
19: new java.security.InvalidKeyException
dup
new java.lang.StringBuilder
dup
aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.kaAlgorithm:Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " key agreement requires "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
20: ldc Lorg/bouncycastle/jce/interfaces/ECPrivateKey;
invokestatic org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.getSimpleName:(Ljava/lang/Class;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " for initialisation"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
21: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
22: StackMap locals:
StackMap stack:
aload 1
checkcast java.security.PrivateKey
invokestatic org.bouncycastle.jce.provider.asymmetric.ec.ECUtil.generatePrivateKeyParameter:(Ljava/security/PrivateKey;)Lorg/bouncycastle/crypto/params/AsymmetricKeyParameter;
checkcast org.bouncycastle.crypto.params.ECPrivateKeyParameters
astore 2
start local 2 23: aload 0
aload 2
invokevirtual org.bouncycastle.crypto.params.ECPrivateKeyParameters.getParameters:()Lorg/bouncycastle/crypto/params/ECDomainParameters;
putfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.parameters:Lorg/bouncycastle/crypto/params/ECDomainParameters;
24: aload 0
getfield org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement.agreement:Lorg/bouncycastle/crypto/BasicAgreement;
aload 2
invokeinterface org.bouncycastle.crypto.BasicAgreement.init:(Lorg/bouncycastle/crypto/CipherParameters;)V
end local 2 25: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 26 0 this Lorg/bouncycastle/jce/provider/asymmetric/ec/KeyAgreement;
0 26 1 key Ljava/security/Key;
6 17 2 mqvPrivKey Lorg/bouncycastle/jce/interfaces/MQVPrivateKey;
8 17 3 staticPrivKey Lorg/bouncycastle/crypto/params/ECPrivateKeyParameters;
10 17 4 ephemPrivKey Lorg/bouncycastle/crypto/params/ECPrivateKeyParameters;
11 17 5 ephemPubKey Lorg/bouncycastle/crypto/params/ECPublicKeyParameters;
15 17 6 localParams Lorg/bouncycastle/crypto/params/MQVPrivateParameters;
23 25 2 privKey Lorg/bouncycastle/crypto/params/ECPrivateKeyParameters;
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
key
private static java.lang.String getSimpleName(java.lang.Class);
descriptor: (Ljava/lang/Class;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
astore 1
start local 1 1: aload 1
aload 1
bipush 46
invokevirtual java.lang.String.lastIndexOf:(I)I
iconst_1
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 clazz Ljava/lang/Class;
1 2 1 fullName Ljava/lang/String;
MethodParameters:
Name Flags
clazz
}
SourceFile: "KeyAgreement.java"
NestMembers:
org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement$DH org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement$DHC org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement$DHwithSHA1KDF org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement$MQV org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement$MQVwithSHA1KDF
InnerClasses:
public DH = org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement$DH of org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement
public DHC = org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement$DHC of org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement
public DHwithSHA1KDF = org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement$DHwithSHA1KDF of org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement
public MQV = org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement$MQV of org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement
public MQVwithSHA1KDF = org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement$MQVwithSHA1KDF of org.bouncycastle.jce.provider.asymmetric.ec.KeyAgreement