| Modifier and Type | Field and Description |
|---|---|
| private static volatile boolean | |
| private static volatile boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static TernaryPolynomial | Returns: a ternary polynomialwhether to create a sparse, SecureRandom random)SparseTernaryPolynomial or DenseTernaryPolynomialGenerates a "sparse" or "dense" polynomial containing numOnes ints equal to 1, numNegOnes int equal to -1, and the rest equal to 0. |
| public static int[] | Returns: an array of integersGenerates an array containing numOnes ints equal to 1, numNegOnes int equal to -1, and the rest equal to 0. |
| public static int | |
| public static boolean | Returns: true if 64-bit support detected, false otherwiseTakes an educated guess as to whether 64 bits are supported by the JVM. |
| public static int | |
| public static long | |
| public static byte[] | Returns: an array of lengthlengthReads a given number of bytes from an |
| IS_64_BIT_JVM | back to summary |
|---|---|
| private static volatile boolean IS_64_BIT_JVM | |
| IS_64_BITNESS_KNOWN | back to summary |
|---|---|
| private static volatile boolean IS_64_BITNESS_KNOWN | |
| Util | back to summary |
|---|---|
| public Util() | |
| generateRandomTernary | back to summary |
|---|---|
| public static TernaryPolynomial generateRandomTernary(int N, int numOnes, int numNegOnes, boolean sparse, SecureRandom random) Generates a "sparse" or "dense" polynomial containing numOnes ints equal to 1, numNegOnes int equal to -1, and the rest equal to 0.
| |
| generateRandomTernary | back to summary |
|---|---|
| public static int[] generateRandomTernary(int N, int numOnes, int numNegOnes, SecureRandom random) Generates an array containing numOnes ints equal to 1, numNegOnes int equal to -1, and the rest equal to 0.
| |
| invert | back to summary |
|---|---|
| public static int invert(int n, int modulus) Calculates the inverse of n mod modulus | |
| is64BitJVM | back to summary |
|---|---|
| public static boolean is64BitJVM() Takes an educated guess as to whether 64 bits are supported by the JVM.
| |
| pow | back to summary |
|---|---|
| public static int pow(int a, int b, int modulus) Calculates a^b mod modulus | |
| pow | back to summary |
|---|---|
| public static long pow(long a, int b, long modulus) Calculates a^b mod modulus | |
| readFullLength | back to summary |
|---|---|
| public static byte[] readFullLength(InputStream is, int length) throws IOException Reads a given number of bytes from an
| |