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

public final Class Poly1305

extends Object
Class Inheritance
Imports
java.security.SecureRandom, org.bouncycastle.crypto.Algorithm, .IllegalKeyException, .SymmetricKey, .SymmetricSecretKey, org.bouncycastle.crypto.fips.FipsAES, org.bouncycastle.crypto.internal.BlockCipher, .EngineProvider, .KeyGenerationParameters, .Mac, .ValidatedSymmetricKey, org.bouncycastle.crypto.internal.params.KeyParameterImpl, .ParametersWithIV, org.bouncycastle.util.Arrays, org.bouncycastle.util.encoders.Hex

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final EngineProvider<T>
public static final GeneralAlgorithm
ALGORITHM

Raw Poly1305 algorithm, can be used for creating general purpose Poly1305 keys.

private static final EngineProvider<T>
private static final EngineProvider<T>
public static final Poly1305.AuthParameters
public static final Poly1305.AuthParameters
public static final Poly1305.AuthParameters
public static final Poly1305.AuthParameters
public static final Poly1305.AuthParameters
public static final Poly1305.AuthParameters
private static final EngineProvider<T>
private static final EngineProvider<T>
private static final EngineProvider<T>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static boolean
invalidKeySize(int keyLength)

private static ValidatedSymmetricKey
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AES_ENGINE_PROVIDERback to summary
private static final EngineProvider<T> AES_ENGINE_PROVIDER
ALGORITHMback to summary
public static final GeneralAlgorithm ALGORITHM

Raw Poly1305 algorithm, can be used for creating general purpose Poly1305 keys.

CAMILLIA_ENGINE_PROVIDERback to summary
private static final EngineProvider<T> CAMILLIA_ENGINE_PROVIDER
ENGINE_PROVIDERback to summary
private static final EngineProvider<T> ENGINE_PROVIDER
MACback to summary
public static final Poly1305.AuthParameters MAC
MACwithAESback to summary
public static final Poly1305.AuthParameters MACwithAES
MACwithCAMELLIAback to summary
public static final Poly1305.AuthParameters MACwithCAMELLIA
MACwithSEEDback to summary
public static final Poly1305.AuthParameters MACwithSEED
MACwithSerpentback to summary
public static final Poly1305.AuthParameters MACwithSerpent
MACwithTwofishback to summary
public static final Poly1305.AuthParameters MACwithTwofish
SEED_ENGINE_PROVIDERback to summary
private static final EngineProvider<T> SEED_ENGINE_PROVIDER
SERPENT_ENGINE_PROVIDERback to summary
private static final EngineProvider<T> SERPENT_ENGINE_PROVIDER
TWOFISH_ENGINE_PROVIDERback to summary
private static final EngineProvider<T> TWOFISH_ENGINE_PROVIDER

Constructor Detail

Poly1305back to summary
private Poly1305()

Method Detail

invalidKeySizeback to summary
private static boolean invalidKeySize(int keyLength)
validateKeyback to summary
private static ValidatedSymmetricKey validateKey(SymmetricKey key, Algorithm algorithm)
org.bouncycastle.crypto.general back to summary

public final Class Poly1305.AuthParameters

extends GeneralAuthParameters<Poly1305.AuthParameters>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final EngineProvider<T>
private final boolean
Inherited from org.bouncycastle.crypto.general.GeneralAuthParameters:
macLenInBits

Constructor Summary

AccessConstructor and Description
private
AuthParameters(GeneralAlgorithm algorithm, boolean ivRequired, byte[] iv, int tagLenInBits, EngineProvider<T> engineProvider)

pack-priv
AuthParameters(GeneralAlgorithm
algorithm mode.
algorithm
)

Base constructor - the algorithm, null IV.

pack-priv
AuthParameters(GeneralAlgorithm algorithm, EngineProvider<T> engineProvider)

Method Summary

Modifier and TypeMethod and Description
protected Poly1305.AuthParameters
create(GeneralAlgorithm algorithm, byte[] iv, int macSizeInBits)

Implements abstract org.bouncycastle.crypto.general.GeneralAuthParameters.create.

Inherited from org.bouncycastle.crypto.general.GeneralAuthParameters:
creategetMACSizeInBitswithIVwithMACSize

Field Detail

engineProviderback to summary
private final EngineProvider<T> engineProvider
ivRequiredback to summary
private final boolean ivRequired

Constructor Detail

AuthParametersback to summary
private AuthParameters(GeneralAlgorithm algorithm, boolean ivRequired, byte[] iv, int tagLenInBits, EngineProvider<T> engineProvider)
AuthParametersback to summary
pack-priv AuthParameters(GeneralAlgorithm algorithm)

Base constructor - the algorithm, null IV. In this case the tag length defaults to the 128.

Parameters
algorithm:GeneralAlgorithm

algorithm mode.

AuthParametersback to summary
pack-priv AuthParameters(GeneralAlgorithm algorithm, EngineProvider<T> engineProvider)

Method Detail

createback to summary
protected Poly1305.AuthParameters create(GeneralAlgorithm algorithm, byte[] iv, int macSizeInBits)

Implements abstract org.bouncycastle.crypto.general.GeneralAuthParameters.create.

org.bouncycastle.crypto.general back to summary

public final Class Poly1305.KeyGenerator

extends GuardedSymmetricKeyGenerator
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final GeneralAlgorithm
private static final int
private final SecureRandom

Constructor Summary

AccessConstructor and Description
public
public
KeyGenerator(GeneralParameters<T extends Algorithm> parameterSet, SecureRandom random)

private

Method Summary

Modifier and TypeMethod and Description
public SymmetricKey
Inherited from org.bouncycastle.crypto.general.GuardedSymmetricKeyGenerator:
generateKey

Field Detail

algorithmback to summary
private final GeneralAlgorithm algorithm
keySizeInBitsback to summary
private static final int keySizeInBits
randomback to summary
private final SecureRandom random

Constructor Detail

KeyGeneratorback to summary
public KeyGenerator(SecureRandom random)
KeyGeneratorback to summary
public KeyGenerator(GeneralParameters<T extends Algorithm> parameterSet, SecureRandom random)
KeyGeneratorback to summary
private KeyGenerator(GeneralAlgorithm algorithm, SecureRandom random)

Method Detail

doGenerateKeyback to summary
public SymmetricKey doGenerateKey()

Implements abstract org.bouncycastle.crypto.general.GuardedSymmetricKeyGenerator.doGenerateKey.

org.bouncycastle.crypto.general back to summary

public final Class Poly1305.MACOperatorFactory

extends GuardedMACOperatorFactory<Poly1305.AuthParameters>
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected int
protected Mac
Inherited from org.bouncycastle.crypto.general.GuardedMACOperatorFactory:
createOutputMACCalculator

Constructor Detail

MACOperatorFactoryback to summary
public MACOperatorFactory()

Method Detail

calculateMACSizeback to summary
protected int calculateMACSize(Poly1305.AuthParameters parameters)

Implements abstract org.bouncycastle.crypto.general.GuardedMACOperatorFactory.calculateMACSize.

Annotations
@Override
createMACback to summary
protected Mac createMAC(SymmetricKey key, final Poly1305.AuthParameters parameters)

Implements abstract org.bouncycastle.crypto.general.GuardedMACOperatorFactory.createMAC.

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

private final Class Poly1305.Poly1305EngineProvider

extends Object
implements EngineProvider<Mac>
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.crypto.general.Poly1305.Poly1305EngineProvider
All Implemented Interfaces
org.bouncycastle.crypto.internal.EngineProvider

Field Summary

Modifier and TypeField and Description
pack-priv static final byte[]
pack-priv static final byte[]
pack-priv static final byte[]

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Mac
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

inputback to summary
pack-priv static final byte[] input
keyback to summary
pack-priv static final byte[] key
outputback to summary
pack-priv static final byte[] output

Constructor Detail

Poly1305EngineProviderback to summary
private Poly1305EngineProvider()

Method Detail

createEngineback to summary
public Mac createEngine()

Implements org.bouncycastle.crypto.internal.EngineProvider.createEngine.

org.bouncycastle.crypto.general back to summary

private final Class Poly1305.Poly1305WithCipherEngineProvider

extends Object
implements EngineProvider<Mac>
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.crypto.general.Poly1305.Poly1305WithCipherEngineProvider
All Implemented Interfaces
org.bouncycastle.crypto.internal.EngineProvider

Field Summary

Modifier and TypeField and Description
private final BlockCipher
private static final byte[]
private static final byte[]
private static final byte[]
private final byte[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Mac
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

engineback to summary
private final BlockCipher engine
inputback to summary
private static final byte[] input
ivback to summary
private static final byte[] iv
keyback to summary
private static final byte[] key
outputback to summary
private final byte[] output

Constructor Detail

Poly1305WithCipherEngineProviderback to summary
public Poly1305WithCipherEngineProvider(BlockCipher engine, byte[] output)

Method Detail

createEngineback to summary
public Mac createEngine()

Implements org.bouncycastle.crypto.internal.EngineProvider.createEngine.