public final class sun.security.ec.ECKeyPairGenerator extends java.security.KeyPairGeneratorSpi
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: sun.security.ec.ECKeyPairGenerator
super_class: java.security.KeyPairGeneratorSpi
{
private static final int KEY_SIZE_MIN;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 112
private static final int KEY_SIZE_MAX;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 571
private java.security.SecureRandom random;
descriptor: Ljava/security/SecureRandom;
flags: (0x0002) ACC_PRIVATE
private int keySize;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private java.security.spec.AlgorithmParameterSpec params;
descriptor: Ljava/security/spec/AlgorithmParameterSpec;
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.security.KeyPairGeneratorSpi.<init>:()V
1: aload 0
aconst_null
putfield sun.security.ec.ECKeyPairGenerator.params:Ljava/security/spec/AlgorithmParameterSpec;
2: aload 0
getstatic sun.security.util.SecurityProviderConstants.DEF_EC_KEY_SIZE:I
aconst_null
invokevirtual sun.security.ec.ECKeyPairGenerator.initialize:(ILjava/security/SecureRandom;)V
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lsun/security/ec/ECKeyPairGenerator;
public void initialize(int, java.security.SecureRandom);
descriptor: (ILjava/security/SecureRandom;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
iload 1
invokevirtual sun.security.ec.ECKeyPairGenerator.checkKeySize:(I)V
1: aload 0
aconst_null
iload 1
invokestatic sun.security.util.ECUtil.getECParameterSpec:(Ljava/security/Provider;I)Ljava/security/spec/ECParameterSpec;
putfield sun.security.ec.ECKeyPairGenerator.params:Ljava/security/spec/AlgorithmParameterSpec;
2: aload 0
getfield sun.security.ec.ECKeyPairGenerator.params:Ljava/security/spec/AlgorithmParameterSpec;
ifnonnull 6
3: new java.security.InvalidParameterException
dup
4: new java.lang.StringBuilder
dup
ldc "No EC parameters available for key size "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 1
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " bits"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
5: invokespecial java.security.InvalidParameterException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
aload 0
aload 2
putfield sun.security.ec.ECKeyPairGenerator.random:Ljava/security/SecureRandom;
7: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lsun/security/ec/ECKeyPairGenerator;
0 8 1 keySize I
0 8 2 random Ljava/security/SecureRandom;
MethodParameters:
Name Flags
keySize
random
public void initialize(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom);
descriptor: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aconst_null
astore 3
start local 3 1: aload 1
instanceof java.security.spec.ECParameterSpec
ifeq 9
2: aconst_null
3: aload 1
checkcast java.security.spec.ECParameterSpec
4: invokestatic sun.security.util.ECUtil.getECParameterSpec:(Ljava/security/Provider;Ljava/security/spec/ECParameterSpec;)Ljava/security/spec/ECParameterSpec;
astore 3
5: aload 3
ifnonnull 19
6: new java.security.InvalidAlgorithmParameterException
dup
7: new java.lang.StringBuilder
dup
ldc "Unsupported curve: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
8: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals: java.security.spec.ECParameterSpec
StackMap stack:
aload 1
instanceof java.security.spec.ECGenParameterSpec
ifeq 16
10: aload 1
checkcast java.security.spec.ECGenParameterSpec
invokevirtual java.security.spec.ECGenParameterSpec.getName:()Ljava/lang/String;
astore 4
start local 4 11: aconst_null
aload 4
invokestatic sun.security.util.ECUtil.getECParameterSpec:(Ljava/security/Provider;Ljava/lang/String;)Ljava/security/spec/ECParameterSpec;
astore 3
12: aload 3
ifnonnull 19
13: new java.security.InvalidAlgorithmParameterException
dup
14: new java.lang.StringBuilder
dup
ldc "Unknown curve name: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 4
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
15: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
end local 4 16: StackMap locals:
StackMap stack:
new java.security.InvalidAlgorithmParameterException
dup
17: ldc "ECParameterSpec or ECGenParameterSpec required for EC"
18: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
19: StackMap locals:
StackMap stack:
aload 3
invokestatic sun.security.ec.ECKeyPairGenerator.ensureCurveIsSupported:(Ljava/security/spec/ECParameterSpec;)V
20: aload 0
aload 3
putfield sun.security.ec.ECKeyPairGenerator.params:Ljava/security/spec/AlgorithmParameterSpec;
21: aload 0
22: aload 0
getfield sun.security.ec.ECKeyPairGenerator.params:Ljava/security/spec/AlgorithmParameterSpec;
checkcast java.security.spec.ECParameterSpec
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
23: putfield sun.security.ec.ECKeyPairGenerator.keySize:I
24: aload 0
aload 2
putfield sun.security.ec.ECKeyPairGenerator.random:Ljava/security/SecureRandom;
25: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 26 0 this Lsun/security/ec/ECKeyPairGenerator;
0 26 1 params Ljava/security/spec/AlgorithmParameterSpec;
0 26 2 random Ljava/security/SecureRandom;
1 26 3 ecSpec Ljava/security/spec/ECParameterSpec;
11 16 4 name Ljava/lang/String;
Exceptions:
throws java.security.InvalidAlgorithmParameterException
MethodParameters:
Name Flags
params
random
private static void ensureCurveIsSupported(java.security.spec.ECParameterSpec);
descriptor: (Ljava/security/spec/ECParameterSpec;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: aconst_null
invokestatic sun.security.util.ECUtil.getECParameters:(Ljava/security/Provider;)Ljava/security/AlgorithmParameters;
astore 1
start local 1 1: aload 1
aload 0
invokevirtual java.security.AlgorithmParameters.init:(Ljava/security/spec/AlgorithmParameterSpec;)V
2: aload 1
invokevirtual java.security.AlgorithmParameters.getEncoded:()[B
astore 2
start local 2 3: goto 10
end local 2 StackMap locals: java.security.spec.ECParameterSpec java.security.AlgorithmParameters
StackMap stack: java.security.spec.InvalidParameterSpecException
4: pop
5: new java.security.InvalidAlgorithmParameterException
dup
6: new java.lang.StringBuilder
dup
ldc "Unsupported curve: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.Object.toString:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
7: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack: java.io.IOException
astore 3
start local 3 9: new java.lang.RuntimeException
dup
aload 3
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 3 start local 2 10: StackMap locals: byte[]
StackMap stack:
aload 2
invokestatic sun.security.ec.ECKeyPairGenerator.isCurveSupported:([B)Z
ifne 14
11: new java.security.InvalidAlgorithmParameterException
dup
12: new java.lang.StringBuilder
dup
ldc "Unsupported curve: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.security.AlgorithmParameters.toString:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
13: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
14: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 ecSpec Ljava/security/spec/ECParameterSpec;
1 15 1 ecParams Ljava/security/AlgorithmParameters;
3 4 2 encodedParams [B
10 15 2 encodedParams [B
9 10 3 ex Ljava/io/IOException;
Exception table:
from to target type
1 3 4 Class java.security.spec.InvalidParameterSpecException
1 3 8 Class java.io.IOException
Exceptions:
throws java.security.InvalidAlgorithmParameterException
MethodParameters:
Name Flags
ecSpec
public java.security.KeyPair generateKeyPair();
descriptor: ()Ljava/security/KeyPair;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=8, args_size=1
start local 0 0: aconst_null
aload 0
getfield sun.security.ec.ECKeyPairGenerator.params:Ljava/security/spec/AlgorithmParameterSpec;
checkcast java.security.spec.ECParameterSpec
invokestatic sun.security.util.ECUtil.encodeECParameterSpec:(Ljava/security/Provider;Ljava/security/spec/ECParameterSpec;)[B
1: astore 1
start local 1 2: aload 0
getfield sun.security.ec.ECKeyPairGenerator.keySize:I
bipush 7
iadd
iconst_3
ishr
iconst_1
iadd
iconst_2
imul
newarray 8
astore 2
start local 2 3: aload 0
getfield sun.security.ec.ECKeyPairGenerator.random:Ljava/security/SecureRandom;
ifnonnull 5
4: aload 0
invokestatic sun.security.jca.JCAUtil.getSecureRandom:()Ljava/security/SecureRandom;
putfield sun.security.ec.ECKeyPairGenerator.random:Ljava/security/SecureRandom;
5: StackMap locals: byte[] byte[]
StackMap stack:
aload 0
getfield sun.security.ec.ECKeyPairGenerator.random:Ljava/security/SecureRandom;
aload 2
invokevirtual java.security.SecureRandom.nextBytes:([B)V
6: aload 0
getfield sun.security.ec.ECKeyPairGenerator.keySize:I
aload 1
aload 2
invokestatic sun.security.ec.ECKeyPairGenerator.generateECKeyPair:(I[B[B)[Ljava/lang/Object;
astore 3
start local 3 7: new java.math.BigInteger
dup
iconst_1
aload 3
iconst_0
aaload
checkcast byte[]
invokespecial java.math.BigInteger.<init>:(I[B)V
astore 4
start local 4 8: new sun.security.ec.ECPrivateKeyImpl
dup
aload 4
aload 0
getfield sun.security.ec.ECKeyPairGenerator.params:Ljava/security/spec/AlgorithmParameterSpec;
checkcast java.security.spec.ECParameterSpec
invokespecial sun.security.ec.ECPrivateKeyImpl.<init>:(Ljava/math/BigInteger;Ljava/security/spec/ECParameterSpec;)V
9: astore 5
start local 5 10: aload 3
iconst_1
aaload
checkcast byte[]
11: aload 0
getfield sun.security.ec.ECKeyPairGenerator.params:Ljava/security/spec/AlgorithmParameterSpec;
checkcast java.security.spec.ECParameterSpec
invokevirtual java.security.spec.ECParameterSpec.getCurve:()Ljava/security/spec/EllipticCurve;
12: invokestatic sun.security.util.ECUtil.decodePoint:([BLjava/security/spec/EllipticCurve;)Ljava/security/spec/ECPoint;
astore 6
start local 6 13: new sun.security.ec.ECPublicKeyImpl
dup
aload 6
aload 0
getfield sun.security.ec.ECKeyPairGenerator.params:Ljava/security/spec/AlgorithmParameterSpec;
checkcast java.security.spec.ECParameterSpec
invokespecial sun.security.ec.ECPublicKeyImpl.<init>:(Ljava/security/spec/ECPoint;Ljava/security/spec/ECParameterSpec;)V
14: astore 7
start local 7 15: new java.security.KeyPair
dup
aload 7
aload 5
invokespecial java.security.KeyPair.<init>:(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V
16: areturn
end local 7 end local 6 end local 5 end local 4 end local 3 17: StackMap locals:
StackMap stack: java.lang.Exception
astore 3
start local 3 18: new java.security.ProviderException
dup
aload 3
invokespecial java.security.ProviderException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lsun/security/ec/ECKeyPairGenerator;
2 19 1 encodedParams [B
3 19 2 seed [B
7 17 3 keyBytes [Ljava/lang/Object;
8 17 4 s Ljava/math/BigInteger;
10 17 5 privateKey Ljava/security/PrivateKey;
13 17 6 w Ljava/security/spec/ECPoint;
15 17 7 publicKey Ljava/security/PublicKey;
18 19 3 e Ljava/lang/Exception;
Exception table:
from to target type
6 16 17 Class java.lang.Exception
private void checkKeySize(int);
descriptor: (I)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: iload 1
bipush 112
if_icmpge 4
1: new java.security.InvalidParameterException
dup
2: ldc "Key size must be at least 112 bits"
3: invokespecial java.security.InvalidParameterException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
iload 1
sipush 571
if_icmple 8
5: new java.security.InvalidParameterException
dup
6: ldc "Key size must be at most 571 bits"
7: invokespecial java.security.InvalidParameterException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
aload 0
iload 1
putfield sun.security.ec.ECKeyPairGenerator.keySize:I
9: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lsun/security/ec/ECKeyPairGenerator;
0 10 1 keySize I
Exceptions:
throws java.security.InvalidParameterException
MethodParameters:
Name Flags
keySize
private static native boolean isCurveSupported(byte[]);
descriptor: ([B)Z
flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
MethodParameters:
Name Flags
encodedParams
private static native java.lang.Object[] generateECKeyPair(int, byte[], byte[]);
descriptor: (I[B[B)[Ljava/lang/Object;
flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.security.GeneralSecurityException
MethodParameters:
Name Flags
keySize
encodedParams
seed
}
SourceFile: "ECKeyPairGenerator.java"