public final class org.bouncycastle.util.BigIntegers
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.bouncycastle.util.BigIntegers
super_class: java.lang.Object
{
public static final java.math.BigInteger ZERO;
descriptor: Ljava/math/BigInteger;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final java.math.BigInteger ONE;
descriptor: Ljava/math/BigInteger;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
private static final java.math.BigInteger TWO;
descriptor: Ljava/math/BigInteger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.math.BigInteger THREE;
descriptor: Ljava/math/BigInteger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final int MAX_ITERATIONS;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 1000
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: lconst_0
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
putstatic org.bouncycastle.util.BigIntegers.ZERO:Ljava/math/BigInteger;
1: lconst_1
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
putstatic org.bouncycastle.util.BigIntegers.ONE:Ljava/math/BigInteger;
2: ldc 2
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
putstatic org.bouncycastle.util.BigIntegers.TWO:Ljava/math/BigInteger;
3: ldc 3
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
putstatic org.bouncycastle.util.BigIntegers.THREE:Ljava/math/BigInteger;
4: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
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 Lorg/bouncycastle/util/BigIntegers;
public static byte[] asUnsignedByteArray(java.math.BigInteger);
descriptor: (Ljava/math/BigInteger;)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=3, args_size=1
start local 0 0: aload 0
invokevirtual java.math.BigInteger.toByteArray:()[B
astore 1
start local 1 1: aload 1
iconst_0
baload
ifne 5
2: aload 1
arraylength
iconst_1
isub
newarray 8
astore 2
start local 2 3: aload 1
iconst_1
aload 2
iconst_0
aload 2
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
4: aload 2
areturn
end local 2 5: StackMap locals: byte[]
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 value Ljava/math/BigInteger;
1 6 1 bytes [B
3 5 2 tmp [B
MethodParameters:
Name Flags
value
public static byte[] asUnsignedByteArray(int, java.math.BigInteger);
descriptor: (ILjava/math/BigInteger;)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=6, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.math.BigInteger.toByteArray:()[B
astore 2
start local 2 1: aload 2
arraylength
iload 0
if_icmpne 3
2: aload 2
areturn
3: StackMap locals: byte[]
StackMap stack:
aload 2
iconst_0
baload
ifne 4
iconst_1
goto 5
StackMap locals:
StackMap stack:
4: iconst_0
StackMap locals:
StackMap stack: int
5: istore 3
start local 3 6: aload 2
arraylength
iload 3
isub
istore 4
start local 4 7: iload 4
iload 0
if_icmple 9
8: new java.lang.IllegalArgumentException
dup
ldc "standard length exceeded for value"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals: int int
StackMap stack:
iload 0
newarray 8
astore 5
start local 5 10: aload 2
iload 3
aload 5
aload 5
arraylength
iload 4
isub
iload 4
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
11: aload 5
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 12 0 length I
0 12 1 value Ljava/math/BigInteger;
1 12 2 bytes [B
6 12 3 start I
7 12 4 count I
10 12 5 tmp [B
MethodParameters:
Name Flags
length
value
public static java.math.BigInteger createRandomInRange(java.math.BigInteger, java.math.BigInteger, java.security.SecureRandom);
descriptor: (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/SecureRandom;)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
istore 3
start local 3 1: iload 3
iflt 5
2: iload 3
ifle 4
3: new java.lang.IllegalArgumentException
dup
ldc "'min' may not be greater than 'max'"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals: int
StackMap stack:
aload 0
areturn
5: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.math.BigInteger.bitLength:()I
aload 1
invokevirtual java.math.BigInteger.bitLength:()I
iconst_2
idiv
if_icmple 7
6: getstatic org.bouncycastle.util.BigIntegers.ZERO:Ljava/math/BigInteger;
aload 1
aload 0
invokevirtual java.math.BigInteger.subtract:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
aload 2
invokestatic org.bouncycastle.util.BigIntegers.createRandomInRange:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/SecureRandom;)Ljava/math/BigInteger;
aload 0
invokevirtual java.math.BigInteger.add:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
areturn
7: StackMap locals:
StackMap stack:
iconst_0
istore 4
start local 4 8: goto 13
9: StackMap locals: int
StackMap stack:
aload 1
invokevirtual java.math.BigInteger.bitLength:()I
aload 2
invokestatic org.bouncycastle.util.BigIntegers.createRandomBigInteger:(ILjava/security/SecureRandom;)Ljava/math/BigInteger;
astore 5
start local 5 10: aload 5
aload 0
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
iflt 12
aload 5
aload 1
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
ifgt 12
11: aload 5
areturn
end local 5 12: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
13: iload 4
sipush 1000
if_icmplt 9
end local 4 14: aload 1
aload 0
invokevirtual java.math.BigInteger.subtract:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.bitLength:()I
iconst_1
isub
aload 2
invokestatic org.bouncycastle.util.BigIntegers.createRandomBigInteger:(ILjava/security/SecureRandom;)Ljava/math/BigInteger;
aload 0
invokevirtual java.math.BigInteger.add:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 min Ljava/math/BigInteger;
0 15 1 max Ljava/math/BigInteger;
0 15 2 random Ljava/security/SecureRandom;
1 15 3 cmp I
8 14 4 i I
10 12 5 x Ljava/math/BigInteger;
MethodParameters:
Name Flags
min
max
random
public static java.math.BigInteger fromUnsignedByteArray(byte[]);
descriptor: ([B)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: new java.math.BigInteger
dup
iconst_1
aload 0
invokespecial java.math.BigInteger.<init>:(I[B)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 buf [B
MethodParameters:
Name Flags
buf
public static java.math.BigInteger fromUnsignedByteArray(byte[], int, int);
descriptor: ([BII)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
astore 3
start local 3 1: iload 1
ifne 2
iload 2
aload 0
arraylength
if_icmpeq 4
2: StackMap locals: byte[]
StackMap stack:
iload 2
newarray 8
astore 3
3: aload 0
iload 1
aload 3
iconst_0
iload 2
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
4: StackMap locals:
StackMap stack:
new java.math.BigInteger
dup
iconst_1
aload 3
invokespecial java.math.BigInteger.<init>:(I[B)V
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 buf [B
0 5 1 off I
0 5 2 length I
1 5 3 mag [B
MethodParameters:
Name Flags
buf
off
length
public static int getUnsignedByteLength(java.math.BigInteger);
descriptor: (Ljava/math/BigInteger;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual java.math.BigInteger.bitLength:()I
bipush 7
iadd
bipush 8
idiv
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 n Ljava/math/BigInteger;
MethodParameters:
Name Flags
n
public static java.math.BigInteger createRandomBigInteger(int, java.security.SecureRandom);
descriptor: (ILjava/security/SecureRandom;)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: new java.math.BigInteger
dup
iconst_1
iload 0
aload 1
invokestatic org.bouncycastle.util.BigIntegers.createRandom:(ILjava/security/SecureRandom;)[B
invokespecial java.math.BigInteger.<init>:(I[B)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 bitLength I
0 1 1 random Ljava/security/SecureRandom;
MethodParameters:
Name Flags
bitLength
random
public static java.math.BigInteger createRandomPrime(int, int, java.security.SecureRandom);
descriptor: (IILjava/security/SecureRandom;)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=7, args_size=3
start local 0 start local 1 start local 2 0: iload 0
iconst_2
if_icmpge 2
1: new java.lang.IllegalArgumentException
dup
ldc "bitLength < 2"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
iload 0
iconst_2
if_icmpne 6
3: aload 2
invokevirtual java.security.SecureRandom.nextInt:()I
ifge 4
getstatic org.bouncycastle.util.BigIntegers.TWO:Ljava/math/BigInteger;
goto 5
StackMap locals:
StackMap stack:
4: getstatic org.bouncycastle.util.BigIntegers.THREE:Ljava/math/BigInteger;
StackMap locals:
StackMap stack: java.math.BigInteger
5: areturn
6: StackMap locals:
StackMap stack:
iload 0
aload 2
invokestatic org.bouncycastle.util.BigIntegers.createRandom:(ILjava/security/SecureRandom;)[B
astore 4
start local 4 7: bipush 8
aload 4
arraylength
imul
iload 0
isub
istore 5
start local 5 8: iconst_1
bipush 7
iload 5
isub
ishl
i2b
istore 6
start local 6 9: aload 4
iconst_0
dup2
baload
iload 6
ior
i2b
bastore
10: aload 4
aload 4
arraylength
iconst_1
isub
dup2
baload
iconst_1
ior
i2b
bastore
11: new java.math.BigInteger
dup
iconst_1
aload 4
invokespecial java.math.BigInteger.<init>:(I[B)V
astore 3
end local 6 end local 5 end local 4 start local 3 12: aload 3
iload 1
invokevirtual java.math.BigInteger.isProbablePrime:(I)Z
ifeq 6
13: aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 bitLength I
0 14 1 certainty I
0 14 2 random Ljava/security/SecureRandom;
12 14 3 rv Ljava/math/BigInteger;
7 12 4 base [B
8 12 5 xBits I
9 12 6 lead B
MethodParameters:
Name Flags
bitLength
certainty
random
private static byte[] createRandom(int, java.security.SecureRandom);
descriptor: (ILjava/security/SecureRandom;)[B
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: iload 0
iconst_1
if_icmpge 2
1: new java.lang.IllegalArgumentException
dup
ldc "bitLength must be at least 1"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
iload 0
bipush 7
iadd
bipush 8
idiv
istore 2
start local 2 3: iload 2
newarray 8
astore 3
start local 3 4: aload 1
aload 3
invokevirtual java.security.SecureRandom.nextBytes:([B)V
5: bipush 8
iload 2
imul
iload 0
isub
istore 4
start local 4 6: aload 3
iconst_0
dup2
baload
sipush 255
iload 4
iushr
i2b
iand
i2b
bastore
7: aload 3
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 bitLength I
0 8 1 random Ljava/security/SecureRandom;
3 8 2 nBytes I
4 8 3 rv [B
6 8 4 xBits I
Exceptions:
throws java.lang.IllegalArgumentException
MethodParameters:
Name Flags
bitLength
random
}
SourceFile: "BigIntegers.java"