프로퍼티 | 타입 | 설명 | |
---|---|---|---|
DHPrime1536 | System.Numerics.BigInteger | ||
DHPrime2048 | System.Numerics.BigInteger | ||
DHPrime768 | System.Numerics.BigInteger |
메소드 | 설명 | |
---|---|---|
CalcInverse ( System.Numerics.BigInteger n, System.Numerics.BigInteger prime ) : System.Numerics.BigInteger |
Returns the inverse of n modulo p.
|
|
DLEncrypt ( BigZp x, System.Numerics.BigInteger p ) : System.Numerics.BigInteger |
Discrete logarithm encryption.
|
|
ExtendedEuclidean ( System.Numerics.BigInteger a, System.Numerics.BigInteger b, System.Numerics.BigInteger &x, System.Numerics.BigInteger &y ) : System.Numerics.BigInteger |
Performs the Extended Euclidean algorithm and returns gcd(a,b). The function also returns integers x and y such that ax + by = gcd(a,b). If gcd(a,b) = 1, then x is a multiplicative inverse of "a mod b" and y is a multiplicative inverse of "b mod a".
|
|
ExtendedEuclidean ( int a, int b, int &x, int &y ) : int |
Performs the Extended Euclidean algorithm and returns gcd(a,b). The function also returns integers x and y such that ax + by = gcd(a,b). If gcd(a,b) = 1, then x is a multiplicative inverse of "a mod b" and y is a multiplicative inverse of "b mod a".
|
|
ExtendedEuclidean ( long a, long b, long &x, long &y ) : long |
Performs the Extended Euclidean algorithm and returns gcd(a,b). The function also returns integers x and y such that ax + by = gcd(a,b). If gcd(a,b) = 1, then x is a multiplicative inverse of "a mod b" and y is a multiplicative inverse of "b mod a".
|
|
GetBitDecomposition ( System.Numerics.BigInteger a, System.Numerics.BigInteger prime ) : List |
||
GetBitDecomposition ( System.Numerics.BigInteger a, System.Numerics.BigInteger prime, int length ) : List |
||
GetBitLength ( System.Numerics.BigInteger a ) : int |
Returns the actual number of bits of a byte array by ignoring trailing zeros in the binary representation.
|
|
GetBitLength ( byte a ) : int |
Returns the actual number of bits of a byte array by ignoring trailing zeros in the binary representation.
|
|
GetBitLength2 ( System.Numerics.BigInteger a ) : int | ||
GetFieldInverse ( int prime ) : int[] |
Returns an array containing inverses of all field elements.
|
|
GetFieldMinimumPrimitive ( int prime ) : int | ||
IsPrime ( int n ) : bool |
Performs a O(sqrt(|n|)) primality test, where |n| is the bit-length of the input.
|
|
MillerRabin ( System.Numerics.BigInteger n, int k ) : bool |
Implements the Miller-Rabin algorithm for fast compositeness test. Returns true if n is a composite number. If n is prime, returns false with high probability (this probability increases with k).
|
|
ModPow ( int powerBase, int exp, int prime ) : int |
Performs modular exponentiation.
|
|
ModSqrRoot ( System.Numerics.BigInteger val, System.Numerics.BigInteger prime ) : System.Numerics.BigInteger | ||
MultiplicativeInverse ( System.Numerics.BigInteger a, System.Numerics.BigInteger m ) : System.Numerics.BigInteger |
Returns the multiplicative inverse of a modulo m.
|
|
MultiplicativeInverse ( int a, int m ) : int |
Returns the multiplicative inverse of a modulo m.
|
|
MultiplicativeInverse ( long a, long m ) : long |
Returns the multiplicative inverse of a modulo m.
|
|
NextRandomBigInt ( |
Returns a random big integer in the specified range. This is based on a simple probabilistic algorithm.
|
public static CalcInverse ( System.Numerics.BigInteger n, System.Numerics.BigInteger prime ) : System.Numerics.BigInteger | ||
n | System.Numerics.BigInteger | |
prime | System.Numerics.BigInteger | |
리턴 | System.Numerics.BigInteger |
public static DLEncrypt ( BigZp x, System.Numerics.BigInteger p ) : System.Numerics.BigInteger | ||
x | BigZp | Value to be encrypted. |
p | System.Numerics.BigInteger | Prime modulus. Should be large enough (> 1024 bits) to ensure security. |
리턴 | System.Numerics.BigInteger |
public static ExtendedEuclidean ( System.Numerics.BigInteger a, System.Numerics.BigInteger b, System.Numerics.BigInteger &x, System.Numerics.BigInteger &y ) : System.Numerics.BigInteger | ||
a | System.Numerics.BigInteger | |
b | System.Numerics.BigInteger | |
x | System.Numerics.BigInteger | |
y | System.Numerics.BigInteger | |
리턴 | System.Numerics.BigInteger |
public static ExtendedEuclidean ( int a, int b, int &x, int &y ) : int | ||
a | int | |
b | int | |
x | int | |
y | int | |
리턴 | int |
public static ExtendedEuclidean ( long a, long b, long &x, long &y ) : long | ||
a | long | |
b | long | |
x | long | |
y | long | |
리턴 | long |
public static GetBitDecomposition ( System.Numerics.BigInteger a, System.Numerics.BigInteger prime ) : List |
||
a | System.Numerics.BigInteger | |
prime | System.Numerics.BigInteger | |
리턴 | List |
public static GetBitDecomposition ( System.Numerics.BigInteger a, System.Numerics.BigInteger prime, int length ) : List |
||
a | System.Numerics.BigInteger | |
prime | System.Numerics.BigInteger | |
length | int | |
리턴 | List |
public static GetBitLength ( System.Numerics.BigInteger a ) : int | ||
a | System.Numerics.BigInteger | |
리턴 | int |
public static GetBitLength2 ( System.Numerics.BigInteger a ) : int | ||
a | System.Numerics.BigInteger | |
리턴 | int |
public static GetFieldMinimumPrimitive ( int prime ) : int | ||
prime | int | |
리턴 | int |
public static MillerRabin ( System.Numerics.BigInteger n, int k ) : bool | ||
n | System.Numerics.BigInteger | |
k | int | |
리턴 | bool |
public static ModPow ( int powerBase, int exp, int prime ) : int | ||
powerBase | int | |
exp | int | |
prime | int | |
리턴 | int |
public static ModSqrRoot ( System.Numerics.BigInteger val, System.Numerics.BigInteger prime ) : System.Numerics.BigInteger | ||
val | System.Numerics.BigInteger | |
prime | System.Numerics.BigInteger | |
리턴 | System.Numerics.BigInteger |
public static MultiplicativeInverse ( System.Numerics.BigInteger a, System.Numerics.BigInteger m ) : System.Numerics.BigInteger | ||
a | System.Numerics.BigInteger | |
m | System.Numerics.BigInteger | |
리턴 | System.Numerics.BigInteger |
public static MultiplicativeInverse ( int a, int m ) : int | ||
a | int | |
m | int | |
리턴 | int |
public static MultiplicativeInverse ( long a, long m ) : long | ||
a | long | |
m | long | |
리턴 | long |
public static NextRandomBigInt ( |
||
rng | ||
minValue | System.Numerics.BigInteger | Inclusive lower bound. |
maxValue | System.Numerics.BigInteger | Exclusive upper bound. |
리턴 | System.Numerics.BigInteger |
public static BigInteger,System.Numerics DHPrime1536 | ||
리턴 | System.Numerics.BigInteger |
public static BigInteger,System.Numerics DHPrime2048 | ||
리턴 | System.Numerics.BigInteger |