Class SqrtRatio
java.lang.Object
org.bouncycastle.crypto.hash2curve.impl.SqrtRatio
The result of a sqrt_ratio calculation
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSqrtRatio(boolean isQR, BigInteger ratio) Constructs an instance of SqrtRatio representing the result of a square root ratio computation. -
Method Summary
-
Constructor Details
-
SqrtRatio
Constructs an instance of SqrtRatio representing the result of a square root ratio computation.- Parameters:
isQR- A boolean flag indicating whether the computed value is a quadratic residue (QR) modulo a specific field. This helps determine if the ratio under consideration has a valid square root.ratio- The ratio value resulting from the square root ratio computation.
-
-
Method Details
-
isQR
public boolean isQR()Checks whether the computed value is a quadratic residue (QR) modulo a specific field.- Returns:
- true if the computed value is a quadratic residue (QR); false otherwise.
-
getRatio
Retrieves the ratio value resulting from the square root ratio computation.- Returns:
- the ratio value as a BigInteger.
-