public class OwlCurve
extends java.lang.Object
In general, Owl can use any elliptic curve or prime order group that is suitable for public key cryptography.
See OwlCurves for convenient standard curves.
NIST publishes many curves with different forms and levels of security.
| Constructor and Description |
|---|
OwlCurve(java.math.BigInteger q,
java.math.BigInteger a,
java.math.BigInteger b,
java.math.BigInteger n,
java.math.BigInteger h,
java.math.BigInteger g_x,
java.math.BigInteger g_y)
Constructs a new
OwlCurve. |
| Modifier and Type | Method and Description |
|---|---|
java.math.BigInteger |
getA()
Get the curve coefficient a
|
java.math.BigInteger |
getB()
Get the curve coefficient b
|
ECCurve.AbstractFp |
getCurve()
Get the elliptic curve
|
ECPoint |
getG()
Get the base point G
|
java.math.BigInteger |
getH()
Get the co-factor h of the curve
|
java.math.BigInteger |
getN()
Get n, the order of the base point
|
java.math.BigInteger |
getQ()
Get the prime field modulus q of the curve
|
public OwlCurve(java.math.BigInteger q,
java.math.BigInteger a,
java.math.BigInteger b,
java.math.BigInteger n,
java.math.BigInteger h,
java.math.BigInteger g_x,
java.math.BigInteger g_y)
OwlCurve.
In general, you should use one of the pre-approved curves from
OwlCurves, rather than manually constructing one.
The following basic checks are performed:
The prime checks are performed using BigInteger.isProbablePrime(int),
and are therefore subject to the same probability guarantees.
These checks prevent trivial mistakes. However, due to the small uncertainties if p and q are not prime, advanced attacks are not prevented. Use it at your own risk.
q - The prime field modulusa - The curve coefficient ab - The curve coefficient bn - The order of the base point Gh - The co-factorg_x - The x coordinate of the base point Gg_y - The y coordinate of the base point Gjava.lang.NullPointerException - if any argument is nulljava.lang.IllegalArgumentException - if any of the above validations failpublic ECCurve.AbstractFp getCurve()
public ECPoint getG()
public java.math.BigInteger getA()
public java.math.BigInteger getB()
public java.math.BigInteger getN()
public java.math.BigInteger getH()
public java.math.BigInteger getQ()