Module io.github.mmm.crypto.bc
Class Curve25519<S extends SignatureEcBc>
- java.lang.Object
-
- io.github.mmm.crypto.CryptoAccess
-
- io.github.mmm.crypto.asymmetric.access.AsymmetricAccess<S,org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey,org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey,AsymmetricKeyPairEcBc,AsymmetricKeyCreatorEcBc>
-
- io.github.mmm.crypto.asymmetric.access.ec.bc.AsymmetricAccessEcBc<S>
-
- io.github.mmm.crypto.asymmetric.access.ec.bc.Curve25519<S>
-
- Type Parameters:
S
- type ofSignatureEcBc
.
- All Implemented Interfaces:
AbstractCryptoFactory
,AsymmetricCryptorFactory<org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey,org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey>
,AsymmetricKeyCreatorFactory<AsymmetricKeyCreatorEcBc>
,SignatureFactory<S>
,SignatureProcessorFactory<S,org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey,org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey>
,CryptorFactory
,HashFactory
,KeyCreatorFactory
public class Curve25519<S extends SignatureEcBc> extends AsymmetricAccessEcBc<S>
AsymmetricAccessEcBc
forCurve25519
.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static CryptoEllipticCurveBc
CURVE
Theelliptic curve
.static String
CURVE_NAME
Thecurve name
.-
Fields inherited from class io.github.mmm.crypto.asymmetric.access.ec.bc.AsymmetricAccessEcBc
ecParameters
-
Fields inherited from class io.github.mmm.crypto.asymmetric.access.AsymmetricAccess
cryptorConfig, randomFactory
-
-
Constructor Summary
Constructors Constructor Description Curve25519(SignatureFactoryEcBc<S> signatureFactory, HashConfig hashConfig, RandomFactory randomFactory)
The constructor.Curve25519(SignatureConfig<S> signatureConfig, AsymmetricCryptorConfigEcIes<org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey,org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey> cryptorConfig, RandomFactory randomFactory)
The constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <S extends SignatureEcBc>
Curve25519<S>of(SignatureFactoryEcBc<S> signatureFactory, HashConfig hashConfig, RandomFactory randomFactory)
static Curve25519<SignatureEcBcPlain>
ofPlain(HashConfig hashConfig)
static Curve25519<SignatureEcBcPlain>
ofPlain(String hashAlgorithm)
static Curve25519<SignatureEcBcWithRecoveryId>
ofRecoveryId(HashConfig hashConfig)
static Curve25519<SignatureEcBcWithRecoveryId>
ofRecoveryId(String hashAlgorithm)
-
Methods inherited from class io.github.mmm.crypto.asymmetric.access.ec.bc.AsymmetricAccessEcBc
newKeyCreator
-
Methods inherited from class io.github.mmm.crypto.asymmetric.access.AsymmetricAccess
createSignature, getCryptorConfig, getSignatureConfig, getSignatureFactoryWithoutHash, newDecryptor, newDecryptorUnsafe, newEncryptor, newEncryptorUnsafe, newHashCreator, newSigner, newVerifier
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.mmm.crypto.asymmetric.sign.SignatureProcessorFactory
newSignerUnsafe, newVerifierUnsafe
-
-
-
-
Field Detail
-
CURVE_NAME
public static final String CURVE_NAME
Thecurve name
.- See Also:
- Constant Field Values
-
CURVE
public static final CryptoEllipticCurveBc CURVE
Theelliptic curve
.
-
-
Constructor Detail
-
Curve25519
public Curve25519(SignatureConfig<S> signatureConfig, AsymmetricCryptorConfigEcIes<org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey,org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey> cryptorConfig, RandomFactory randomFactory)
The constructor.- Parameters:
signatureConfig
- theSignatureConfig
.cryptorConfig
- theAsymmetricCryptorConfigEcIes
.randomFactory
- the optionalRandomFactory
.
-
Curve25519
public Curve25519(SignatureFactoryEcBc<S> signatureFactory, HashConfig hashConfig, RandomFactory randomFactory)
The constructor.- Parameters:
signatureFactory
- theSignatureFactoryEcBc
.hashConfig
- theHashConfig
for the hash used for signatures.randomFactory
- theRandomFactory
.
-
-
Method Detail
-
ofPlain
public static Curve25519<SignatureEcBcPlain> ofPlain(String hashAlgorithm)
- Parameters:
hashAlgorithm
- thealgorithm
for the hash used for signatures.- Returns:
- a
Curve25519
instance for plain signature.
-
ofPlain
public static Curve25519<SignatureEcBcPlain> ofPlain(HashConfig hashConfig)
- Parameters:
hashConfig
- theHashConfig
for the hash used for signatures.- Returns:
- a
Curve25519
instance for plain signature.
-
ofRecoveryId
public static Curve25519<SignatureEcBcWithRecoveryId> ofRecoveryId(String hashAlgorithm)
- Parameters:
hashAlgorithm
- thealgorithm
for the hash used for signatures.- Returns:
- a
Curve25519
instance for signature withrecovery ID
.
-
ofRecoveryId
public static Curve25519<SignatureEcBcWithRecoveryId> ofRecoveryId(HashConfig hashConfig)
- Parameters:
hashConfig
- theHashConfig
for the hash used for signatures.- Returns:
- a
Curve25519
instance for signature withrecovery ID
.
-
of
public static <S extends SignatureEcBc> Curve25519<S> of(SignatureFactoryEcBc<S> signatureFactory, HashConfig hashConfig, RandomFactory randomFactory)
- Type Parameters:
S
- type ofsignature
.- Parameters:
signatureFactory
- theSignatureFactoryEcBc
.hashConfig
- theHashConfig
for the hash used for signatures.randomFactory
- theRandomFactory
.- Returns:
- a
Curve25519
instance for the given parameters.
-
-