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 8
2: aload 1
checkcast java.security.spec.ECParameterSpec
astore 4
start local 4 3: aconst_null
aload 4
invokestatic sun.security.util.ECUtil.getECParameterSpec:(Ljava/security/Provider;Ljava/security/spec/ECParameterSpec;)Ljava/security/spec/ECParameterSpec;
astore 3
4: aload 3
ifnonnull 18
5: new java.security.InvalidAlgorithmParameterException
dup
6: new java.lang.StringBuilder
dup
ldc "Curve not supported: "
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;
7: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
end local 4 8: StackMap locals: java.security.spec.ECParameterSpec
StackMap stack:
aload 1
instanceof java.security.spec.ECGenParameterSpec
ifeq 15
9: aload 1
checkcast java.security.spec.ECGenParameterSpec
invokevirtual java.security.spec.ECGenParameterSpec.getName:()Ljava/lang/String;
astore 4
start local 4 10: aconst_null
aload 4
invokestatic sun.security.util.ECUtil.getECParameterSpec:(Ljava/security/Provider;Ljava/lang/String;)Ljava/security/spec/ECParameterSpec;
astore 3
11: aload 3
ifnonnull 18
12: new java.security.InvalidAlgorithmParameterException
dup
13: 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;
14: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
end local 4 15: StackMap locals:
StackMap stack:
new java.security.InvalidAlgorithmParameterException
dup
16: ldc "ECParameterSpec or ECGenParameterSpec required for EC"
17: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
18: StackMap locals:
StackMap stack:
aload 3
invokestatic sun.security.ec.ECKeyPairGenerator.ensureCurveIsSupported:(Ljava/security/spec/ECParameterSpec;)V
19: aload 0
aload 3
putfield sun.security.ec.ECKeyPairGenerator.params:Ljava/security/spec/AlgorithmParameterSpec;
20: aload 0
aload 3
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
putfield sun.security.ec.ECKeyPairGenerator.keySize:I
21: aload 0
aload 2
putfield sun.security.ec.ECKeyPairGenerator.random:Ljava/security/SecureRandom;
22: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 23 0 this Lsun/security/ec/ECKeyPairGenerator;
0 23 1 params Ljava/security/spec/AlgorithmParameterSpec;
0 23 2 random Ljava/security/SecureRandom;
1 23 3 ecSpec Ljava/security/spec/ECParameterSpec;
3 8 4 ecParams Ljava/security/spec/ECParameterSpec;
10 15 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=2, 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: goto 7
StackMap locals: java.security.spec.ECParameterSpec java.security.AlgorithmParameters
StackMap stack: java.security.spec.InvalidParameterSpecException
3: pop
4: new java.security.InvalidAlgorithmParameterException
dup
5: new java.lang.StringBuilder
dup
ldc "Curve not supported: "
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;
6: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack:
aload 0
invokestatic sun.security.ec.ECOperations.forParameters:(Ljava/security/spec/ECParameterSpec;)Ljava/util/Optional;
invokevirtual java.util.Optional.isEmpty:()Z
ifeq 11
8: new java.security.InvalidAlgorithmParameterException
dup
9: new java.lang.StringBuilder
dup
ldc "Curve not supported: "
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;
10: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
11: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 ecSpec Ljava/security/spec/ECParameterSpec;
1 12 1 ecParams Ljava/security/AlgorithmParameters;
Exception table:
from to target type
1 2 3 Class java.security.spec.InvalidParameterSpecException
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=2, args_size=1
start local 0 0: aload 0
getfield sun.security.ec.ECKeyPairGenerator.random:Ljava/security/SecureRandom;
ifnonnull 2
1: aload 0
invokestatic sun.security.jca.JCAUtil.getSecureRandom:()Ljava/security/SecureRandom;
putfield sun.security.ec.ECKeyPairGenerator.random:Ljava/security/SecureRandom;
2: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield sun.security.ec.ECKeyPairGenerator.random:Ljava/security/SecureRandom;
invokevirtual sun.security.ec.ECKeyPairGenerator.generateKeyPairImpl:(Ljava/security/SecureRandom;)Ljava/util/Optional;
astore 1
start local 1 3: aload 1
invokevirtual java.util.Optional.isPresent:()Z
ifeq 8
4: aload 1
invokevirtual java.util.Optional.get:()Ljava/lang/Object;
checkcast java.security.KeyPair
5: areturn
end local 1 6: StackMap locals:
StackMap stack: java.lang.Exception
astore 1
start local 1 7: new java.security.ProviderException
dup
aload 1
invokespecial java.security.ProviderException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 1 8: StackMap locals:
StackMap stack:
new java.security.ProviderException
dup
new java.lang.StringBuilder
dup
ldc "Curve not supported: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
9: aload 0
getfield sun.security.ec.ECKeyPairGenerator.params:Ljava/security/spec/AlgorithmParameterSpec;
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;
10: invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lsun/security/ec/ECKeyPairGenerator;
3 6 1 kp Ljava/util/Optional<Ljava/security/KeyPair;>;
7 8 1 ex Ljava/lang/Exception;
Exception table:
from to target type
2 5 6 Class java.lang.Exception
private byte[] generatePrivateScalar(java.security.SecureRandom, sun.security.ec.ECOperations, int);
descriptor: (Ljava/security/SecureRandom;Lsun/security/ec/ECOperations;I)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=7, args_size=4
start local 0 start local 1 start local 2 start local 3 0: sipush 128
istore 4
start local 4 1: iload 3
newarray 8
astore 5
start local 5 2: iconst_0
istore 6
start local 6 3: goto 9
4: StackMap locals: int byte[] int
StackMap stack:
aload 1
aload 5
invokevirtual java.security.SecureRandom.nextBytes:([B)V
5: aload 2
aload 5
invokevirtual sun.security.ec.ECOperations.seedToScalar:([B)[B
6: areturn
7: StackMap locals:
StackMap stack: sun.security.ec.ECOperations$IntermediateValueException
pop
8: iinc 6 1
StackMap locals:
StackMap stack:
9: iload 6
iload 4
if_icmplt 4
end local 6 10: new java.security.ProviderException
dup
new java.lang.StringBuilder
dup
ldc "Unable to produce private key after "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
11: iload 4
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " attempts"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
12: invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;)V
athrow
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 13 0 this Lsun/security/ec/ECKeyPairGenerator;
0 13 1 random Ljava/security/SecureRandom;
0 13 2 ecOps Lsun/security/ec/ECOperations;
0 13 3 seedSize I
1 13 4 numAttempts I
2 13 5 seedArr [B
3 10 6 i I
Exception table:
from to target type
5 6 7 Class sun.security.ec.ECOperations$IntermediateValueException
MethodParameters:
Name Flags
random
ecOps
seedSize
private java.util.Optional<java.security.KeyPair> generateKeyPairImpl(java.security.SecureRandom);
descriptor: (Ljava/security/SecureRandom;)Ljava/util/Optional;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=19, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.security.ec.ECKeyPairGenerator.params:Ljava/security/spec/AlgorithmParameterSpec;
checkcast java.security.spec.ECParameterSpec
astore 2
start local 2 1: aload 2
invokestatic sun.security.ec.ECOperations.forParameters:(Ljava/security/spec/ECParameterSpec;)Ljava/util/Optional;
astore 3
start local 3 2: aload 3
invokevirtual java.util.Optional.isEmpty:()Z
ifeq 4
3: invokestatic java.util.Optional.empty:()Ljava/util/Optional;
areturn
4: StackMap locals: java.security.spec.ECParameterSpec java.util.Optional
StackMap stack:
aload 3
invokevirtual java.util.Optional.get:()Ljava/lang/Object;
checkcast sun.security.ec.ECOperations
astore 4
start local 4 5: aload 4
invokevirtual sun.security.ec.ECOperations.getField:()Lsun/security/util/math/IntegerFieldModuloP;
astore 5
start local 5 6: aload 2
invokevirtual java.security.spec.ECParameterSpec.getOrder:()Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.bitLength:()I
istore 6
start local 6 7: iload 6
bipush 64
iadd
istore 7
start local 7 8: iload 7
bipush 7
iadd
bipush 8
idiv
istore 8
start local 8 9: aload 0
aload 1
aload 4
iload 8
invokevirtual sun.security.ec.ECKeyPairGenerator.generatePrivateScalar:(Ljava/security/SecureRandom;Lsun/security/ec/ECOperations;I)[B
astore 9
start local 9 10: aload 2
invokevirtual java.security.spec.ECParameterSpec.getGenerator:()Ljava/security/spec/ECPoint;
astore 10
start local 10 11: aload 5
aload 10
invokevirtual java.security.spec.ECPoint.getAffineX:()Ljava/math/BigInteger;
invokeinterface sun.security.util.math.IntegerFieldModuloP.getElement:(Ljava/math/BigInteger;)Lsun/security/util/math/ImmutableIntegerModuloP;
astore 11
start local 11 12: aload 5
aload 10
invokevirtual java.security.spec.ECPoint.getAffineY:()Ljava/math/BigInteger;
invokeinterface sun.security.util.math.IntegerFieldModuloP.getElement:(Ljava/math/BigInteger;)Lsun/security/util/math/ImmutableIntegerModuloP;
astore 12
start local 12 13: new sun.security.ec.point.AffinePoint
dup
aload 11
aload 12
invokespecial sun.security.ec.point.AffinePoint.<init>:(Lsun/security/util/math/ImmutableIntegerModuloP;Lsun/security/util/math/ImmutableIntegerModuloP;)V
astore 13
start local 13 14: aload 4
aload 13
aload 9
invokevirtual sun.security.ec.ECOperations.multiply:(Lsun/security/ec/point/AffinePoint;[B)Lsun/security/ec/point/MutablePoint;
astore 14
start local 14 15: aload 14
invokeinterface sun.security.ec.point.Point.asAffine:()Lsun/security/ec/point/AffinePoint;
astore 15
start local 15 16: new sun.security.ec.ECPrivateKeyImpl
dup
aload 9
aload 2
invokespecial sun.security.ec.ECPrivateKeyImpl.<init>:([BLjava/security/spec/ECParameterSpec;)V
astore 16
start local 16 17: new java.security.spec.ECPoint
dup
aload 15
invokevirtual sun.security.ec.point.AffinePoint.getX:()Lsun/security/util/math/ImmutableIntegerModuloP;
invokeinterface sun.security.util.math.ImmutableIntegerModuloP.asBigInteger:()Ljava/math/BigInteger;
18: aload 15
invokevirtual sun.security.ec.point.AffinePoint.getY:()Lsun/security/util/math/ImmutableIntegerModuloP;
invokeinterface sun.security.util.math.ImmutableIntegerModuloP.asBigInteger:()Ljava/math/BigInteger;
19: invokespecial java.security.spec.ECPoint.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
astore 17
start local 17 20: new sun.security.ec.ECPublicKeyImpl
dup
aload 17
aload 2
invokespecial sun.security.ec.ECPublicKeyImpl.<init>:(Ljava/security/spec/ECPoint;Ljava/security/spec/ECParameterSpec;)V
astore 18
start local 18 21: new java.security.KeyPair
dup
aload 18
aload 16
invokespecial java.security.KeyPair.<init>:(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V
invokestatic java.util.Optional.of:(Ljava/lang/Object;)Ljava/util/Optional;
areturn
end local 18 end local 17 end local 16 end local 15 end local 14 end local 13 end local 12 end local 11 end local 10 end local 9 end local 8 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 Lsun/security/ec/ECKeyPairGenerator;
0 22 1 random Ljava/security/SecureRandom;
1 22 2 ecParams Ljava/security/spec/ECParameterSpec;
2 22 3 opsOpt Ljava/util/Optional<Lsun/security/ec/ECOperations;>;
5 22 4 ops Lsun/security/ec/ECOperations;
6 22 5 field Lsun/security/util/math/IntegerFieldModuloP;
7 22 6 numBits I
8 22 7 seedBits I
9 22 8 seedSize I
10 22 9 privArr [B
11 22 10 genPoint Ljava/security/spec/ECPoint;
12 22 11 x Lsun/security/util/math/ImmutableIntegerModuloP;
13 22 12 y Lsun/security/util/math/ImmutableIntegerModuloP;
14 22 13 affGen Lsun/security/ec/point/AffinePoint;
15 22 14 pub Lsun/security/ec/point/Point;
16 22 15 affPub Lsun/security/ec/point/AffinePoint;
17 22 16 privateKey Ljava/security/PrivateKey;
20 22 17 w Ljava/security/spec/ECPoint;
21 22 18 publicKey Ljava/security/PublicKey;
Exceptions:
throws java.security.InvalidKeyException
Signature: (Ljava/security/SecureRandom;)Ljava/util/Optional<Ljava/security/KeyPair;>;
MethodParameters:
Name Flags
random
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
}
SourceFile: "ECKeyPairGenerator.java"
InnerClasses:
IntermediateValueException = sun.security.ec.ECOperations$IntermediateValueException of sun.security.ec.ECOperations