Class SqrtRatio
- java.lang.Object
-
- org.bouncycastle.crypto.hash2curve.impl.SqrtRatio
-
public class SqrtRatio extends java.lang.ObjectThe result of a sqrt_ratio calculation
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSqrtRatio(boolean isQR, java.math.BigInteger ratio)Constructs an instance of SqrtRatio representing the result of a square root ratio computation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigIntegergetRatio()Retrieves the ratio value resulting from the square root ratio computation.booleanisQR()Checks whether the computed value is a quadratic residue (QR) modulo a specific field.
-
-
-
Constructor Detail
-
SqrtRatio
protected SqrtRatio(boolean isQR, java.math.BigInteger ratio)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 Detail
-
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
public java.math.BigInteger getRatio()
Retrieves the ratio value resulting from the square root ratio computation.- Returns:
- the ratio value as a BigInteger.
-
-