public class com.google.crypto.tink.subtle.Kwp implements com.google.crypto.tink.KeyWrap
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.google.crypto.tink.subtle.Kwp
super_class: java.lang.Object
{
private final javax.crypto.SecretKey aesKey;
descriptor: Ljavax/crypto/SecretKey;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static final int MIN_WRAP_KEY_SIZE;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 16
static final int MAX_WRAP_KEY_SIZE;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 4096
static final int ROUNDS;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 6
static final byte[] PREFIX;
descriptor: [B
flags: (0x0018) ACC_STATIC, ACC_FINAL
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: ldc Lcom/google/crypto/tink/subtle/Kwp;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic com.google.crypto.tink.subtle.Kwp.$assertionsDisabled:Z
3: iconst_4
newarray 8
dup
iconst_0
bipush -90
bastore
dup
iconst_1
bipush 89
bastore
dup
iconst_2
bipush 89
bastore
dup
iconst_3
bipush -90
bastore
putstatic com.google.crypto.tink.subtle.Kwp.PREFIX:[B
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(byte[]);
descriptor: ([B)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 1
arraylength
bipush 16
if_icmpeq 3
aload 1
arraylength
bipush 32
if_icmpeq 3
2: new java.security.GeneralSecurityException
dup
ldc "Unsupported key length"
invokespecial java.security.GeneralSecurityException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: com.google.crypto.tink.subtle.Kwp byte[]
StackMap stack:
aload 0
new javax.crypto.spec.SecretKeySpec
dup
aload 1
ldc "AES"
invokespecial javax.crypto.spec.SecretKeySpec.<init>:([BLjava/lang/String;)V
putfield com.google.crypto.tink.subtle.Kwp.aesKey:Ljavax/crypto/SecretKey;
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/google/crypto/tink/subtle/Kwp;
0 5 1 key [B
Exceptions:
throws java.security.GeneralSecurityException
MethodParameters:
Name Flags
key final
private int wrappingSize(int);
descriptor: (I)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: bipush 7
iload 1
bipush 7
iadd
bipush 8
irem
isub
istore 2
start local 2 1: iload 1
iload 2
iadd
bipush 8
iadd
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/google/crypto/tink/subtle/Kwp;
0 2 1 inputSize I
1 2 2 paddingSize I
MethodParameters:
Name Flags
inputSize
private byte[] computeW(byte[], byte[]);
descriptor: ([B[B)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=12, args_size=3
start local 0 start local 1 start local 2 0: aload 2
arraylength
bipush 8
if_icmple 1
aload 2
arraylength
ldc 2147483631
if_icmpgt 1
aload 1
arraylength
bipush 8
if_icmpeq 2
1: StackMap locals:
StackMap stack:
new java.security.GeneralSecurityException
dup
ldc "computeW called with invalid parameters"
invokespecial java.security.GeneralSecurityException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
aload 2
arraylength
invokevirtual com.google.crypto.tink.subtle.Kwp.wrappingSize:(I)I
newarray 8
astore 3
start local 3 3: aload 1
iconst_0
aload 3
iconst_0
aload 1
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
4: aload 2
iconst_0
aload 3
bipush 8
aload 2
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
5: aload 3
arraylength
bipush 8
idiv
iconst_1
isub
istore 4
start local 4 6: getstatic com.google.crypto.tink.subtle.EngineFactory.CIPHER:Lcom/google/crypto/tink/subtle/EngineFactory;
ldc "AES/ECB/NoPadding"
invokevirtual com.google.crypto.tink.subtle.EngineFactory.getInstance:(Ljava/lang/String;)Ljava/lang/Object;
checkcast javax.crypto.Cipher
astore 5
start local 5 7: aload 5
iconst_1
aload 0
getfield com.google.crypto.tink.subtle.Kwp.aesKey:Ljavax/crypto/SecretKey;
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;)V
8: bipush 16
newarray 8
astore 6
start local 6 9: aload 3
iconst_0
aload 6
iconst_0
bipush 8
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
10: iconst_0
istore 7
start local 7 11: goto 28
12: StackMap locals: com.google.crypto.tink.subtle.Kwp byte[] byte[] byte[] int javax.crypto.Cipher byte[] int
StackMap stack:
iconst_0
istore 8
start local 8 13: goto 26
14: StackMap locals: int
StackMap stack:
aload 3
bipush 8
iload 8
iconst_1
iadd
imul
aload 6
bipush 8
bipush 8
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
15: aload 5
aload 6
iconst_0
bipush 16
aload 6
invokevirtual javax.crypto.Cipher.doFinal:([BII[B)I
istore 9
start local 9 16: getstatic com.google.crypto.tink.subtle.Kwp.$assertionsDisabled:Z
ifne 17
iload 9
bipush 16
if_icmpeq 17
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
17: StackMap locals: int
StackMap stack:
iload 7
iload 4
imul
iload 8
iadd
iconst_1
iadd
istore 10
start local 10 18: iconst_0
istore 11
start local 11 19: goto 23
20: StackMap locals: int int
StackMap stack:
aload 6
bipush 7
iload 11
isub
dup2
baload
iload 10
sipush 255
iand
i2b
ixor
i2b
bastore
21: iload 10
bipush 8
iushr
istore 10
22: iinc 11 1
StackMap locals:
StackMap stack:
23: iload 11
iconst_4
if_icmplt 20
end local 11 24: aload 6
bipush 8
aload 3
bipush 8
iload 8
iconst_1
iadd
imul
bipush 8
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
end local 10 end local 9 25: iinc 8 1
StackMap locals:
StackMap stack:
26: iload 8
iload 4
if_icmplt 14
end local 8 27: iinc 7 1
StackMap locals:
StackMap stack:
28: iload 7
bipush 6
if_icmplt 12
end local 7 29: aload 6
iconst_0
aload 3
iconst_0
bipush 8
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
30: aload 3
areturn
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 31 0 this Lcom/google/crypto/tink/subtle/Kwp;
0 31 1 iv [B
0 31 2 key [B
3 31 3 data [B
6 31 4 blocks I
7 31 5 aes Ljavax/crypto/Cipher;
9 31 6 block [B
11 29 7 i I
13 27 8 j I
16 25 9 length I
18 25 10 roundConst I
19 24 11 b I
Exceptions:
throws java.security.GeneralSecurityException
MethodParameters:
Name Flags
iv final
key final
private byte[] invertW(byte[]);
descriptor: ([B)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=10, args_size=2
start local 0 start local 1 0: aload 1
arraylength
bipush 24
if_icmplt 1
aload 1
arraylength
bipush 8
irem
ifeq 2
1: StackMap locals:
StackMap stack:
new java.security.GeneralSecurityException
dup
ldc "Incorrect data size"
invokespecial java.security.GeneralSecurityException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 1
aload 1
arraylength
invokestatic java.util.Arrays.copyOf:([BI)[B
astore 2
start local 2 3: aload 2
arraylength
bipush 8
idiv
iconst_1
isub
istore 3
start local 3 4: getstatic com.google.crypto.tink.subtle.EngineFactory.CIPHER:Lcom/google/crypto/tink/subtle/EngineFactory;
ldc "AES/ECB/NoPadding"
invokevirtual com.google.crypto.tink.subtle.EngineFactory.getInstance:(Ljava/lang/String;)Ljava/lang/Object;
checkcast javax.crypto.Cipher
astore 4
start local 4 5: aload 4
iconst_2
aload 0
getfield com.google.crypto.tink.subtle.Kwp.aesKey:Ljavax/crypto/SecretKey;
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;)V
6: bipush 16
newarray 8
astore 5
start local 5 7: aload 2
iconst_0
aload 5
iconst_0
bipush 8
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
8: iconst_5
istore 6
start local 6 9: goto 26
10: StackMap locals: com.google.crypto.tink.subtle.Kwp byte[] byte[] int javax.crypto.Cipher byte[] int
StackMap stack:
iload 3
iconst_1
isub
istore 7
start local 7 11: goto 24
12: StackMap locals: int
StackMap stack:
aload 2
bipush 8
iload 7
iconst_1
iadd
imul
aload 5
bipush 8
bipush 8
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
13: iload 6
iload 3
imul
iload 7
iadd
iconst_1
iadd
istore 8
start local 8 14: iconst_0
istore 9
start local 9 15: goto 19
16: StackMap locals: int int
StackMap stack:
aload 5
bipush 7
iload 9
isub
dup2
baload
iload 8
sipush 255
iand
i2b
ixor
i2b
bastore
17: iload 8
bipush 8
iushr
istore 8
18: iinc 9 1
StackMap locals:
StackMap stack:
19: iload 9
iconst_4
if_icmplt 16
end local 9 20: aload 4
aload 5
iconst_0
bipush 16
aload 5
invokevirtual javax.crypto.Cipher.doFinal:([BII[B)I
istore 9
start local 9 21: getstatic com.google.crypto.tink.subtle.Kwp.$assertionsDisabled:Z
ifne 22
iload 9
bipush 16
if_icmpeq 22
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
22: StackMap locals:
StackMap stack:
aload 5
bipush 8
aload 2
bipush 8
iload 7
iconst_1
iadd
imul
bipush 8
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
end local 9 end local 8 23: iinc 7 -1
StackMap locals:
StackMap stack:
24: iload 7
ifge 12
end local 7 25: iinc 6 -1
StackMap locals:
StackMap stack:
26: iload 6
ifge 10
end local 6 27: aload 5
iconst_0
aload 2
iconst_0
bipush 8
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
28: aload 2
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 29 0 this Lcom/google/crypto/tink/subtle/Kwp;
0 29 1 wrapped [B
3 29 2 data [B
4 29 3 blocks I
5 29 4 aes Ljavax/crypto/Cipher;
7 29 5 block [B
9 27 6 i I
11 25 7 j I
14 23 8 roundConst I
15 20 9 b I
21 23 9 length I
Exceptions:
throws java.security.GeneralSecurityException
MethodParameters:
Name Flags
wrapped final
public byte[] wrap(byte[]);
descriptor: ([B)[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=4, args_size=2
start local 0 start local 1 0: aload 1
arraylength
bipush 16
if_icmpge 2
1: new java.security.GeneralSecurityException
dup
ldc "Key size of key to wrap too small"
invokespecial java.security.GeneralSecurityException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 1
arraylength
sipush 4096
if_icmple 4
3: new java.security.GeneralSecurityException
dup
ldc "Key size of key to wrap too large"
invokespecial java.security.GeneralSecurityException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
bipush 8
newarray 8
astore 2
start local 2 5: getstatic com.google.crypto.tink.subtle.Kwp.PREFIX:[B
iconst_0
aload 2
iconst_0
getstatic com.google.crypto.tink.subtle.Kwp.PREFIX:[B
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
6: iconst_0
istore 3
start local 3 7: goto 10
8: StackMap locals: byte[] int
StackMap stack:
aload 2
iconst_4
iload 3
iadd
aload 1
arraylength
bipush 8
iconst_3
iload 3
isub
imul
ishr
sipush 255
iand
i2b
bastore
9: iinc 3 1
StackMap locals:
StackMap stack:
10: iload 3
iconst_4
if_icmplt 8
end local 3 11: aload 0
aload 2
aload 1
invokevirtual com.google.crypto.tink.subtle.Kwp.computeW:([B[B)[B
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lcom/google/crypto/tink/subtle/Kwp;
0 12 1 data [B
5 12 2 iv [B
7 11 3 i I
Exceptions:
throws java.security.GeneralSecurityException
MethodParameters:
Name Flags
data final
public byte[] unwrap(byte[]);
descriptor: ([B)[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=6, args_size=2
start local 0 start local 1 0: aload 1
arraylength
aload 0
bipush 16
invokevirtual com.google.crypto.tink.subtle.Kwp.wrappingSize:(I)I
if_icmpge 2
1: new java.security.GeneralSecurityException
dup
ldc "Wrapped key size is too small"
invokespecial java.security.GeneralSecurityException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 1
arraylength
aload 0
sipush 4096
invokevirtual com.google.crypto.tink.subtle.Kwp.wrappingSize:(I)I
if_icmple 4
3: new java.security.GeneralSecurityException
dup
ldc "Wrapped key size is too large"
invokespecial java.security.GeneralSecurityException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 1
arraylength
bipush 8
irem
ifeq 8
5: new java.security.GeneralSecurityException
dup
6: ldc "Wrapped key size must be a multiple of 8 bytes"
7: invokespecial java.security.GeneralSecurityException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual com.google.crypto.tink.subtle.Kwp.invertW:([B)[B
astore 2
start local 2 9: iconst_1
istore 3
start local 3 10: iconst_0
istore 4
start local 4 11: goto 15
12: StackMap locals: byte[] int int
StackMap stack:
getstatic com.google.crypto.tink.subtle.Kwp.PREFIX:[B
iload 4
baload
aload 2
iload 4
baload
if_icmpeq 14
13: iconst_0
istore 3
14: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
15: iload 4
iconst_4
if_icmplt 12
end local 4 16: iconst_0
istore 4
start local 4 17: iconst_4
istore 5
start local 5 18: goto 21
19: StackMap locals: int
StackMap stack:
iload 4
bipush 8
ishl
aload 2
iload 5
baload
sipush 255
iand
iadd
istore 4
20: iinc 5 1
StackMap locals:
StackMap stack:
21: iload 5
bipush 8
if_icmplt 19
end local 5 22: aload 0
iload 4
invokevirtual com.google.crypto.tink.subtle.Kwp.wrappingSize:(I)I
aload 2
arraylength
if_icmpeq 25
23: iconst_0
istore 3
24: goto 31
25: StackMap locals:
StackMap stack:
bipush 8
iload 4
iadd
istore 5
start local 5 26: goto 30
27: StackMap locals: int
StackMap stack:
aload 2
iload 5
baload
ifeq 29
28: iconst_0
istore 3
29: StackMap locals:
StackMap stack:
iinc 5 1
StackMap locals:
StackMap stack:
30: iload 5
aload 2
arraylength
if_icmplt 27
end local 5 31: StackMap locals:
StackMap stack:
iload 3
ifeq 33
32: aload 2
bipush 8
bipush 8
iload 4
iadd
invokestatic java.util.Arrays.copyOfRange:([BII)[B
areturn
33: StackMap locals:
StackMap stack:
new javax.crypto.BadPaddingException
dup
ldc "Invalid padding"
invokespecial javax.crypto.BadPaddingException.<init>:(Ljava/lang/String;)V
athrow
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 34 0 this Lcom/google/crypto/tink/subtle/Kwp;
0 34 1 data [B
9 34 2 unwrapped [B
10 34 3 ok Z
11 16 4 i I
17 34 4 encodedSize I
18 22 5 i I
26 31 5 j I
Exceptions:
throws java.security.GeneralSecurityException
MethodParameters:
Name Flags
data final
}
SourceFile: "Kwp.java"