crypto/crypto/cdsa/utils/ristretto_utils library
Constants
Properties
- invSqrt → BigInt
-
The modular inverse of the square root (1/sqrt(a*d)) in the Ristretto255 curve field.
final
- mask255 → BigInt
-
A mask for the least significant 255 bits, used for bitwise operations.
final
- minusOneSq → BigInt
-
The square of -1 in the Ristretto255 curve field.
final
- oneMinusDSq → BigInt
-
The value 1 - d^2 in the Ristretto255 curve field.
final
- sqrtAdMinusOne → BigInt
-
The value (a*d) - 1 in the Ristretto255 curve field.
final
- sqrtM1 → BigInt
-
Helper methods for Ristretto255 operations.
The square root of -1 in the Ristretto255 curve field.
final
Functions
-
add(
List< int> scalar1, List<int> scalar2) → List<int> - Adds two scalar values represented as List
-
isOdd(
BigInt num, BigInt modulo) → bool - Check if a BigInt number is odd with respect to a given modulo.
-
mul(
List< int> scalar1, List<int> scalar2) → List<int> - Multiplies two scalar values represented as List
-
neg(
List< int> scalar) → List<int> - Negates a scalar value and returns the result as a List
-
positiveMod(
BigInt a, BigInt b) → BigInt - Calculates the positive remainder of two BigInt values.
-
sqrtUV(
BigInt u, BigInt v) → Tuple< bool, BigInt> - sqrt u/v
-
sub(
List< int> scalar1, List<int> scalar2) → List<int> - Subtracts one scalar value from another and returns the result as a List