Module io.github.mmm.crypto.bc
Class CryptoEllipticCurveBc
- java.lang.Object
-
- io.github.mmm.crypto.asymmetric.access.ec.bc.CryptoEllipticCurveBc
-
public abstract class CryptoEllipticCurveBc extends Object
Configuration for a specific elliptic curve based on bouncy castlesECParameterSpec.- Since:
- 1.0.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract BigIntegerdetermineCurveQ()intgetBitLength()intgetByteLength()static intgetByteLength(org.bouncycastle.jce.spec.ECParameterSpec ecParameters)StringgetCurveName()org.bouncycastle.jce.spec.ECParameterSpecgetEcParameters()BigIntegergetHalfN()BigIntegergetQ()
-
-
-
Method Detail
-
getCurveName
public String getCurveName()
- Returns:
- the curve name.
-
getEcParameters
public org.bouncycastle.jce.spec.ECParameterSpec getEcParameters()
- Returns:
- the
ECParameterSpec.
-
getQ
public BigInteger getQ()
- Returns:
- the Q value of the
curve.
-
determineCurveQ
protected abstract BigInteger determineCurveQ()
- Returns:
- the
Q value.
-
getHalfN
public BigInteger getHalfN()
- Returns:
- halfN
-
getBitLength
public int getBitLength()
- Returns:
- the length of the curve order and keys in bits.
-
getByteLength
public int getByteLength()
- Returns:
- the length of the curve order and keys in bytes.
-
getByteLength
public static int getByteLength(org.bouncycastle.jce.spec.ECParameterSpec ecParameters)
- Parameters:
ecParameters- theECParameterSpec.- Returns:
- the length of the curve order in bytes. This is also the length of the (compressed) keys except for a potential extra byte.
-
-