Top Description Inners Fields Constructors Methods
org.bouncycastle.crypto.general

public final Class EdEC

extends Object
Class Inheritance
Imports
java.security.AccessController, .PrivilegedAction, .SecureRandom, org.bouncycastle.crypto.Agreement, .AgreementFactory, .AsymmetricPrivateKey, .AsymmetricPublicKey, .CryptoServicesRegistrar, .InvalidSignatureException, .OutputSigner, .OutputVerifier, .PlainInputProcessingException, .UpdateOutputStream, org.bouncycastle.crypto.asymmetric.AsymmetricEdDSAPrivateKey, .AsymmetricEdDSAPublicKey, .AsymmetricKeyPair, .AsymmetricXDHPrivateKey, .AsymmetricXDHPublicKey, org.bouncycastle.crypto.fips.FipsSHS, .FipsStatus, .FipsUnapprovedOperationError, org.bouncycastle.crypto.internal.AsymmetricCipherKeyPair, .AsymmetricCipherKeyPairGenerator, .CipherParameters, .Digest, .KeyGenerationParameters, .RawAgreement, .Signer, .Xof, org.bouncycastle.crypto.internal.io.SignerOutputStream, org.bouncycastle.crypto.internal.params.AsymmetricKeyParameter, org.bouncycastle.crypto.internal.test.ConsistencyTest, org.bouncycastle.math.ec.rfc8032.Ed25519, .Ed448, org.bouncycastle.util.Arrays, org.bouncycastle.util.encoders.Hex

Source class for implementations of Edwards Elliptic Curve based algorithms.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
EdEC.EdDSAKeyPairGenerator

Edwards Curve DSA key pair generator.

public static class
EdEC.EdDSAOperatorFactory

Operator factory for creating Edwards Curve DSA based signing and verification operators.

public static class
EdEC.Parameters

Edwards Curve key pair generation parameters.

private static enum
public static class
EdEC.XDHAgreementFactory

Factory for Agreement operators based on Edwards Curve Diffie-Hellman.

public static class
EdEC.XDHKeyPairGenerator

Edwards Curve Diffie-Hellman key pair generator.

Field Summary

Modifier and TypeField and Description
private static final byte[]
public static final EdEC.Parameters
public static final int
public static final int
public static final EdEC.Parameters
public static final int
public static final int
public static final EdEC.Parameters
public static final EdEC.Parameters
public static final int
public static final int
private static final byte[]
private static final byte[]
public static final EdEC.Parameters
public static final int
public static final int
private static final byte[]
private static final byte[]
public static final byte[]

Constructor Summary

AccessConstructor and Description
private
EdEC()

Method Summary

Modifier and TypeMethod and Description
public static byte[]
computePublicData(Algorithm algorithm, byte[] secret)

private static AsymmetricKeyParameter
private static AsymmetricKeyParameter
private static AsymmetricKeyParameter
private static AsymmetricKeyParameter
private static boolean
private static boolean
private static void
private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databack to summary
private static final byte[] data
Ed25519back to summary
public static final EdEC.Parameters Ed25519
Ed25519_PRIVATE_KEY_SIZEback to summary
public static final int Ed25519_PRIVATE_KEY_SIZE
Ed25519_PUBLIC_KEY_SIZEback to summary
public static final int Ed25519_PUBLIC_KEY_SIZE
Ed448back to summary
public static final EdEC.Parameters Ed448
Ed448_PRIVATE_KEY_SIZEback to summary
public static final int Ed448_PRIVATE_KEY_SIZE
Ed448_PUBLIC_KEY_SIZEback to summary
public static final int Ed448_PUBLIC_KEY_SIZE
EdDSAback to summary
public static final EdEC.Parameters EdDSA
X25519back to summary
public static final EdEC.Parameters X25519
X25519_PRIVATE_KEY_SIZEback to summary
public static final int X25519_PRIVATE_KEY_SIZE
X25519_PUBLIC_KEY_SIZEback to summary
public static final int X25519_PUBLIC_KEY_SIZE
x25519Publicback to summary
private static final byte[] x25519Public
x25519Secretback to summary
private static final byte[] x25519Secret
X448back to summary
public static final EdEC.Parameters X448
X448_PRIVATE_KEY_SIZEback to summary
public static final int X448_PRIVATE_KEY_SIZE
X448_PUBLIC_KEY_SIZEback to summary
public static final int X448_PUBLIC_KEY_SIZE
x448Publicback to summary
private static final byte[] x448Public
x448Secretback to summary
private static final byte[] x448Secret
ZERO_CONTEXTback to summary
public static final byte[] ZERO_CONTEXT

Constructor Detail

EdECback to summary
private EdEC()

Method Detail

computePublicDataback to summary
public static byte[] computePublicData(Algorithm algorithm, byte[] secret)
getLwKeyback to summary
private static AsymmetricKeyParameter getLwKey(final AsymmetricEdDSAPrivateKey privKey)
getLwKeyback to summary
private static AsymmetricKeyParameter getLwKey(final AsymmetricEdDSAPublicKey pubKey)
getLwKeyback to summary
private static AsymmetricKeyParameter getLwKey(final AsymmetricXDHPrivateKey privKey)
getLwKeyback to summary
private static AsymmetricKeyParameter getLwKey(final AsymmetricXDHPublicKey pubKey)
isOkayAgreeingback to summary
private static boolean isOkayAgreeing(RawAgreement agreement, AsymmetricCipherKeyPair kp, CipherParameters testPriv, CipherParameters testPub)
isOkaySigningback to summary
private static boolean isOkaySigning(Signer signer, AsymmetricCipherKeyPair kp)
validateAgreementKeyPairback to summary
private static void validateAgreementKeyPair(AsymmetricCipherKeyPair kp)
validateSigningKeyPairback to summary
private static void validateSigningKeyPair(AsymmetricCipherKeyPair kp)
org.bouncycastle.crypto.general back to summary

public final Class EdEC.Algorithm

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final GeneralAlgorithm
public static final GeneralAlgorithm
public static final GeneralAlgorithm
public static final GeneralAlgorithm

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

Ed25519back to summary
public static final GeneralAlgorithm Ed25519
Ed448back to summary
public static final GeneralAlgorithm Ed448
X25519back to summary
public static final GeneralAlgorithm X25519
X448back to summary
public static final GeneralAlgorithm X448

Constructor Detail

Algorithmback to summary
private Algorithm()
org.bouncycastle.crypto.general back to summary

public final Class EdEC.EdDSAKeyPairGenerator

extends GuardedAsymmetricKeyPairGenerator
Class Inheritance

Edwards Curve DSA key pair generator.

Field Summary

Modifier and TypeField and Description
private final AsymmetricCipherKeyPairGenerator
private final EdEC.Variations

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected AsymmetricKeyPair<P extends AsymmetricPublicKey, S extends AsymmetricPrivateKey>
Inherited from org.bouncycastle.crypto.general.GuardedAsymmetricKeyPairGenerator:
generateKeyPairgetParameters

Field Detail

kpGenback to summary
private final AsymmetricCipherKeyPairGenerator kpGen
variationback to summary
private final EdEC.Variations variation

Constructor Detail

EdDSAKeyPairGeneratorback to summary
public EdDSAKeyPairGenerator(EdEC.Parameters keyGenParameters, SecureRandom random)

Method Detail

doGenerateKeyPairback to summary
protected AsymmetricKeyPair<P extends AsymmetricPublicKey, S extends AsymmetricPrivateKey> doGenerateKeyPair()

Implements abstract org.bouncycastle.crypto.general.GuardedAsymmetricKeyPairGenerator.doGenerateKeyPair.

Annotations
@Override
org.bouncycastle.crypto.general back to summary

public final Class EdEC.EdDSAOperatorFactory

extends GuardedSignatureOperatorFactory<EdEC.Parameters>
Class Inheritance

Operator factory for creating Edwards Curve DSA based signing and verification operators.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected OutputSigner<EdEC.Parameters>
protected OutputVerifier<EdEC.Parameters>
Inherited from org.bouncycastle.crypto.general.GuardedSignatureOperatorFactory:
createSignercreateVerifier

Constructor Detail

EdDSAOperatorFactoryback to summary
public EdDSAOperatorFactory()

Method Detail

doCreateSignerback to summary
protected OutputSigner<EdEC.Parameters> doCreateSigner(AsymmetricPrivateKey key, final EdEC.Parameters parameters)

Implements abstract org.bouncycastle.crypto.general.GuardedSignatureOperatorFactory.doCreateSigner.

Annotations
@Override
doCreateVerifierback to summary
protected OutputVerifier<EdEC.Parameters> doCreateVerifier(AsymmetricPublicKey key, final EdEC.Parameters parameters)

Implements abstract org.bouncycastle.crypto.general.GuardedSignatureOperatorFactory.doCreateVerifier.

Annotations
@Override
org.bouncycastle.crypto.general back to summary

public Class EdEC.Parameters

extends GeneralParameters<GeneralAlgorithm>
Class Inheritance

Edwards Curve key pair generation parameters.

Constructor Summary

AccessConstructor and Description
pack-priv
Parameters(GeneralAlgorithm
the EdEC domain parameters algorithm.
algorithm
)

Base constructor.

Method Summary

Inherited from org.bouncycastle.crypto.general.GeneralParameters:
getAlgorithm

Constructor Detail

Parametersback to summary
pack-priv Parameters(GeneralAlgorithm algorithm)

Base constructor.

Parameters
algorithm:GeneralAlgorithm

the EdEC domain parameters algorithm.

org.bouncycastle.crypto.general back to summary

private final Enum EdEC.Variations

extends Enum<EdEC.Variations>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final EdEC.Variations
public static final EdEC.Variations
public static final EdEC.Variations
public static final EdEC.Variations

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static EdEC.Variations
public static EdEC.Variations[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

Ed25519back to summary
public static final EdEC.Variations Ed25519
Ed448back to summary
public static final EdEC.Variations Ed448
X25519back to summary
public static final EdEC.Variations X25519
X448back to summary
public static final EdEC.Variations X448

Constructor Detail

Variationsback to summary
private Variations()

Method Detail

valueOfback to summary
public static EdEC.Variations valueOf(String name)
valuesback to summary
public static EdEC.Variations[] values()
org.bouncycastle.crypto.general back to summary

public final Class EdEC.XDHAgreementFactory

extends Object
implements AgreementFactory<EdEC.Parameters>
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.AgreementFactory

Factory for Agreement operators based on Edwards Curve Diffie-Hellman.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Agreement<EdEC.Parameters>
createAgreement(AsymmetricPrivateKey
the key to base the agreement on.
key
,
final EdEC.Parameters
agreement parameters.
parameters
)

Implements org.bouncycastle.crypto.AgreementFactory.createAgreement.

Return an initialised agreement set up for the passed in key.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

XDHAgreementFactoryback to summary
public XDHAgreementFactory()

Method Detail

createAgreementback to summary
public Agreement<EdEC.Parameters> createAgreement(AsymmetricPrivateKey key, final EdEC.Parameters parameters)

Implements org.bouncycastle.crypto.AgreementFactory.createAgreement.

Doc from org.bouncycastle.crypto.AgreementFactory.createAgreement.

Return an initialised agreement set up for the passed in key.

Parameters
key:AsymmetricPrivateKey

the key to base the agreement on.

parameters:EdEC.Parameters

agreement parameters.

Returns:Agreement<EdEC.Parameters>

an initialised Agreement.

org.bouncycastle.crypto.general back to summary

public final Class EdEC.XDHKeyPairGenerator

extends GuardedAsymmetricKeyPairGenerator
Class Inheritance

Edwards Curve Diffie-Hellman key pair generator.

Field Summary

Modifier and TypeField and Description
private final AsymmetricCipherKeyPairGenerator
private final EdEC.Variations

Constructor Summary

AccessConstructor and Description
public
XDHKeyPairGenerator(EdEC.Parameters keyGenParameters, SecureRandom random)

Method Summary

Modifier and TypeMethod and Description
protected AsymmetricKeyPair<P extends AsymmetricPublicKey, S extends AsymmetricPrivateKey>
Inherited from org.bouncycastle.crypto.general.GuardedAsymmetricKeyPairGenerator:
generateKeyPairgetParameters

Field Detail

kpGenback to summary
private final AsymmetricCipherKeyPairGenerator kpGen
variationback to summary
private final EdEC.Variations variation

Constructor Detail

XDHKeyPairGeneratorback to summary
public XDHKeyPairGenerator(EdEC.Parameters keyGenParameters, SecureRandom random)

Method Detail

doGenerateKeyPairback to summary
protected AsymmetricKeyPair<P extends AsymmetricPublicKey, S extends AsymmetricPrivateKey> doGenerateKeyPair()

Implements abstract org.bouncycastle.crypto.general.GuardedAsymmetricKeyPairGenerator.doGenerateKeyPair.

Annotations
@Override