abstract class com.microsoft.sqlserver.jdbc.BaseAttestationRequest
minor version: 0
major version: 59
flags: flags: (0x0420) ACC_SUPER, ACC_ABSTRACT
this_class: com.microsoft.sqlserver.jdbc.BaseAttestationRequest
super_class: java.lang.Object
{
protected static final byte[] ECDH_MAGIC;
descriptor: [B
flags: (0x001c) ACC_PROTECTED, ACC_STATIC, ACC_FINAL
protected static final int ENCLAVE_LENGTH;
descriptor: I
flags: (0x001c) ACC_PROTECTED, ACC_STATIC, ACC_FINAL
ConstantValue: 104
protected static final int BIG_INTEGER_SIZE;
descriptor: I
flags: (0x001c) ACC_PROTECTED, ACC_STATIC, ACC_FINAL
ConstantValue: 48
protected java.security.PrivateKey privateKey;
descriptor: Ljava/security/PrivateKey;
flags: (0x0004) ACC_PROTECTED
protected byte[] enclaveChallenge;
descriptor: [B
flags: (0x0004) ACC_PROTECTED
protected byte[] x;
descriptor: [B
flags: (0x0004) ACC_PROTECTED
protected byte[] y;
descriptor: [B
flags: (0x0004) ACC_PROTECTED
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: bipush 8
newarray 8
dup
iconst_0
bipush 69
bastore
dup
iconst_1
bipush 67
bastore
dup
iconst_2
bipush 75
bastore
dup
iconst_3
bipush 51
bastore
dup
iconst_4
bipush 48
bastore
putstatic com.microsoft.sqlserver.jdbc.BaseAttestationRequest.ECDH_MAGIC:[B
1: return
LocalVariableTable:
Start End Slot Name Signature
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/microsoft/sqlserver/jdbc/BaseAttestationRequest;
byte[] getBytes();
descriptor: ()[B
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aconst_null
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/microsoft/sqlserver/jdbc/BaseAttestationRequest;
Exceptions:
throws java.io.IOException
byte[] createSessionSecret(byte[]);
descriptor: ([B)[B
flags: (0x0000)
Code:
stack=9, locals=8, args_size=2
start local 0 start local 1 0: aload 1
ifnull 1
aload 1
arraylength
bipush 104
if_icmpeq 4
1: StackMap locals:
StackMap stack:
aconst_null
aload 0
2: ldc "R_MalformedECDHPublicKey"
invokestatic com.microsoft.sqlserver.jdbc.SQLServerResource.getResource:(Ljava/lang/String;)Ljava/lang/String;
ldc "0"
iconst_0
3: invokestatic com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError:(Lcom/microsoft/sqlserver/jdbc/SQLServerConnection;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Z)V
4: StackMap locals:
StackMap stack:
aload 1
invokestatic java.nio.ByteBuffer.wrap:([B)Ljava/nio/ByteBuffer;
astore 2
start local 2 5: bipush 8
newarray 8
astore 3
start local 3 6: aload 2
aload 3
invokevirtual java.nio.ByteBuffer.get:([B)Ljava/nio/ByteBuffer;
pop
7: aload 3
getstatic com.microsoft.sqlserver.jdbc.BaseAttestationRequest.ECDH_MAGIC:[B
invokestatic java.util.Arrays.equals:([B[B)Z
ifne 11
8: aconst_null
aload 0
ldc "R_MalformedECDHHeader"
invokestatic com.microsoft.sqlserver.jdbc.SQLServerResource.getResource:(Ljava/lang/String;)Ljava/lang/String;
9: ldc "0"
iconst_0
10: invokestatic com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError:(Lcom/microsoft/sqlserver/jdbc/SQLServerConnection;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Z)V
11: StackMap locals: java.nio.ByteBuffer byte[]
StackMap stack:
bipush 48
newarray 8
astore 4
start local 4 12: bipush 48
newarray 8
astore 5
start local 5 13: aload 2
aload 4
invokevirtual java.nio.ByteBuffer.get:([B)Ljava/nio/ByteBuffer;
pop
14: aload 2
aload 5
invokevirtual java.nio.ByteBuffer.get:([B)Ljava/nio/ByteBuffer;
pop
15: new java.security.spec.ECPublicKeySpec
dup
new java.security.spec.ECPoint
dup
new java.math.BigInteger
dup
iconst_1
aload 4
invokespecial java.math.BigInteger.<init>:(I[B)V
new java.math.BigInteger
dup
iconst_1
aload 5
invokespecial java.math.BigInteger.<init>:(I[B)V
invokespecial java.security.spec.ECPoint.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
16: aload 0
getfield com.microsoft.sqlserver.jdbc.BaseAttestationRequest.privateKey:Ljava/security/PrivateKey;
checkcast java.security.interfaces.ECPrivateKey
invokeinterface java.security.interfaces.ECPrivateKey.getParams:()Ljava/security/spec/ECParameterSpec;
17: invokespecial java.security.spec.ECPublicKeySpec.<init>:(Ljava/security/spec/ECPoint;Ljava/security/spec/ECParameterSpec;)V
astore 6
start local 6 18: ldc "ECDH"
invokestatic javax.crypto.KeyAgreement.getInstance:(Ljava/lang/String;)Ljavax/crypto/KeyAgreement;
astore 7
start local 7 19: aload 7
aload 0
getfield com.microsoft.sqlserver.jdbc.BaseAttestationRequest.privateKey:Ljava/security/PrivateKey;
invokevirtual javax.crypto.KeyAgreement.init:(Ljava/security/Key;)V
20: aload 7
ldc "EC"
invokestatic java.security.KeyFactory.getInstance:(Ljava/lang/String;)Ljava/security/KeyFactory;
aload 6
invokevirtual java.security.KeyFactory.generatePublic:(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;
iconst_1
invokevirtual javax.crypto.KeyAgreement.doPhase:(Ljava/security/Key;Z)Ljava/security/Key;
pop
21: ldc "SHA-256"
invokestatic java.security.MessageDigest.getInstance:(Ljava/lang/String;)Ljava/security/MessageDigest;
aload 7
invokevirtual javax.crypto.KeyAgreement.generateSecret:()[B
invokevirtual java.security.MessageDigest.digest:([B)[B
areturn
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 22 0 this Lcom/microsoft/sqlserver/jdbc/BaseAttestationRequest;
0 22 1 serverResponse [B
5 22 2 sr Ljava/nio/ByteBuffer;
6 22 3 magic [B
12 22 4 x [B
13 22 5 y [B
18 22 6 keySpec Ljava/security/spec/ECPublicKeySpec;
19 22 7 ka Ljavax/crypto/KeyAgreement;
Exceptions:
throws java.security.GeneralSecurityException, com.microsoft.sqlserver.jdbc.SQLServerException
MethodParameters:
Name Flags
serverResponse
void initBcryptECDH();
descriptor: ()V
flags: (0x0000)
Code:
stack=5, locals=5, args_size=1
start local 0 0: ldc "EC"
invokestatic java.security.KeyPairGenerator.getInstance:(Ljava/lang/String;)Ljava/security/KeyPairGenerator;
astore 1
start local 1 1: aload 1
new java.security.spec.ECGenParameterSpec
dup
ldc "secp384r1"
invokespecial java.security.spec.ECGenParameterSpec.<init>:(Ljava/lang/String;)V
invokevirtual java.security.KeyPairGenerator.initialize:(Ljava/security/spec/AlgorithmParameterSpec;)V
2: aload 1
invokevirtual java.security.KeyPairGenerator.generateKeyPair:()Ljava/security/KeyPair;
astore 2
start local 2 3: aload 2
invokevirtual java.security.KeyPair.getPublic:()Ljava/security/PublicKey;
checkcast java.security.interfaces.ECPublicKey
astore 3
start local 3 4: aload 0
aload 2
invokevirtual java.security.KeyPair.getPrivate:()Ljava/security/PrivateKey;
putfield com.microsoft.sqlserver.jdbc.BaseAttestationRequest.privateKey:Ljava/security/PrivateKey;
5: aload 3
invokeinterface java.security.interfaces.ECPublicKey.getW:()Ljava/security/spec/ECPoint;
astore 4
start local 4 6: aload 0
aload 0
aload 4
invokevirtual java.security.spec.ECPoint.getAffineX:()Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.toByteArray:()[B
invokevirtual com.microsoft.sqlserver.jdbc.BaseAttestationRequest.adjustBigInt:([B)[B
putfield com.microsoft.sqlserver.jdbc.BaseAttestationRequest.x:[B
7: aload 0
aload 0
aload 4
invokevirtual java.security.spec.ECPoint.getAffineY:()Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.toByteArray:()[B
invokevirtual com.microsoft.sqlserver.jdbc.BaseAttestationRequest.adjustBigInt:([B)[B
putfield com.microsoft.sqlserver.jdbc.BaseAttestationRequest.y:[B
end local 4 end local 3 end local 2 end local 1 8: goto 11
StackMap locals:
StackMap stack: java.lang.Exception
9: astore 1
start local 1 10: aconst_null
aload 0
aload 1
invokevirtual java.lang.Exception.getLocalizedMessage:()Ljava/lang/String;
ldc "0"
iconst_0
invokestatic com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError:(Lcom/microsoft/sqlserver/jdbc/SQLServerConnection;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Z)V
end local 1 11: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lcom/microsoft/sqlserver/jdbc/BaseAttestationRequest;
1 8 1 kpg Ljava/security/KeyPairGenerator;
3 8 2 kp Ljava/security/KeyPair;
4 8 3 publicKey Ljava/security/interfaces/ECPublicKey;
6 8 4 w Ljava/security/spec/ECPoint;
10 11 1 e Ljava/lang/Exception;
Exception table:
from to target type
0 8 9 Class java.security.GeneralSecurityException
0 8 9 Class java.io.IOException
Exceptions:
throws com.microsoft.sqlserver.jdbc.SQLServerException
private byte[] adjustBigInt(byte[]);
descriptor: ([B)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 1
iconst_0
baload
ifne 2
bipush 48
aload 1
arraylength
if_icmpge 2
1: aload 1
iconst_1
aload 1
arraylength
invokestatic java.util.Arrays.copyOfRange:([BII)[B
astore 1
2: StackMap locals:
StackMap stack:
aload 1
arraylength
bipush 48
if_icmpge 11
3: new java.io.ByteArrayOutputStream
dup
invokespecial java.io.ByteArrayOutputStream.<init>:()V
astore 2
start local 2 4: iconst_0
istore 3
start local 3 5: goto 8
6: StackMap locals: java.io.ByteArrayOutputStream int
StackMap stack:
aload 2
iconst_0
invokevirtual java.io.ByteArrayOutputStream.write:(I)V
7: iinc 3 1
StackMap locals:
StackMap stack:
8: iload 3
bipush 48
aload 1
arraylength
isub
if_icmplt 6
end local 3 9: aload 2
aload 1
invokevirtual java.io.ByteArrayOutputStream.write:([B)V
10: aload 2
invokevirtual java.io.ByteArrayOutputStream.toByteArray:()[B
astore 1
end local 2 11: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lcom/microsoft/sqlserver/jdbc/BaseAttestationRequest;
0 12 1 b [B
4 11 2 output Ljava/io/ByteArrayOutputStream;
5 9 3 i I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
}
SourceFile: "ISQLServerEnclaveProvider.java"