Class Curve25519
- java.lang.Object
-
- org.bouncycastle.math.ec.ECCurve
-
- org.bouncycastle.math.ec.ECCurve.AbstractFp
-
- org.bouncycastle.math.ec.custom.djb.Curve25519
-
public class Curve25519 extends ECCurve.AbstractFp
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bouncycastle.math.ec.ECCurve
ECCurve.AbstractF2m, ECCurve.AbstractFp, ECCurve.Config, ECCurve.F2m, ECCurve.Fp
-
-
Field Summary
Fields Modifier and Type Field Description protected Curve25519Pointinfinitystatic java.math.BigIntegerq-
Fields inherited from class org.bouncycastle.math.ec.ECCurve
a, b, cofactor, coord, COORD_AFFINE, COORD_HOMOGENEOUS, COORD_JACOBIAN, COORD_JACOBIAN_CHUDNOVSKY, COORD_JACOBIAN_MODIFIED, COORD_LAMBDA_AFFINE, COORD_LAMBDA_PROJECTIVE, COORD_SKEWED, endomorphism, field, multiplier, order
-
-
Constructor Summary
Constructors Constructor Description Curve25519()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ECCurvecloneCurve()ECLookupTablecreateCacheSafeLookupTable(ECPoint[] points, int off, int len)Create a cache-safe lookup table for the specified sequence of points.protected ECPointcreateRawPoint(ECFieldElement x, ECFieldElement y)protected ECPointcreateRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs)ECFieldElementfromBigInteger(java.math.BigInteger x)intgetFieldSize()ECPointgetInfinity()java.math.BigIntegergetQ()ECFieldElementrandomFieldElement(java.security.SecureRandom r)ECFieldElementrandomFieldElementMult(java.security.SecureRandom r)booleansupportsCoordinateSystem(int coord)-
Methods inherited from class org.bouncycastle.math.ec.ECCurve.AbstractFp
decompressPoint, isValidFieldElement
-
Methods inherited from class org.bouncycastle.math.ec.ECCurve
checkPoint, checkPoints, checkPoints, configure, createDefaultMultiplier, createPoint, decodePoint, equals, equals, getA, getAffinePointEncodingLength, getAllCoordinateSystems, getB, getCofactor, getCoordinateSystem, getEndomorphism, getField, getFieldElementEncodingLength, getMultiplier, getOrder, getPreCompInfo, hashCode, importPoint, normalizeAll, normalizeAll, precompute, validatePoint
-
-
-
-
Field Detail
-
q
public static final java.math.BigInteger q
-
infinity
protected Curve25519Point infinity
-
-
Method Detail
-
cloneCurve
protected ECCurve cloneCurve()
- Specified by:
cloneCurvein classECCurve
-
supportsCoordinateSystem
public boolean supportsCoordinateSystem(int coord)
- Overrides:
supportsCoordinateSystemin classECCurve
-
getQ
public java.math.BigInteger getQ()
-
getFieldSize
public int getFieldSize()
- Specified by:
getFieldSizein classECCurve
-
fromBigInteger
public ECFieldElement fromBigInteger(java.math.BigInteger x)
- Specified by:
fromBigIntegerin classECCurve
-
createRawPoint
protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y)
- Specified by:
createRawPointin classECCurve
-
createRawPoint
protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs)
- Specified by:
createRawPointin classECCurve
-
getInfinity
public ECPoint getInfinity()
- Specified by:
getInfinityin classECCurve
-
createCacheSafeLookupTable
public ECLookupTable createCacheSafeLookupTable(ECPoint[] points, int off, int len)
Description copied from class:ECCurveCreate a cache-safe lookup table for the specified sequence of points. All the points MUST belong to thisECCurveinstance, and MUST already be normalized.- Overrides:
createCacheSafeLookupTablein classECCurve
-
randomFieldElement
public ECFieldElement randomFieldElement(java.security.SecureRandom r)
- Overrides:
randomFieldElementin classECCurve.AbstractFp
-
randomFieldElementMult
public ECFieldElement randomFieldElementMult(java.security.SecureRandom r)
- Overrides:
randomFieldElementMultin classECCurve.AbstractFp
-
-