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

pack-priv Class Utils

extends Object
Class Inheritance
Imports
java.security.AccessController, .Permission, .PrivilegedAction, .Provider, .SecureRandom, .SecureRandomSpi, java.util.concurrent.atomic.AtomicLong, org.bouncycastle.crypto.Algorithm, .CryptoServicesRegistrar, org.bouncycastle.crypto.internal.ValidatedSymmetricKey, org.bouncycastle.crypto.internal.params.AEADParameters, .KeyParameter, .KeyParameterImpl, .ParametersWithIV, org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider, org.bouncycastle.math.ec.ECCurve, org.bouncycastle.util.Pack

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
pack-priv static final SecureRandom

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
approvedModeCheck(boolean approvedMode, FipsAlgorithm algorithm)

pack-priv static void
checkPermission(final Permission permission)

pack-priv static AEADParameters
getAEADParameters(ValidatedSymmetricKey sKey, byte[] nonce, int tagLen)

public static int
pack-priv static int
getDefaultMacSize(Algorithm algorithm, int blockSize)

public static int
pack-priv static KeyParameter
pack-priv static ParametersWithIV
pack-priv static void
validateKeyGenRandom(SecureRandom random, int securityStrength, FipsAlgorithm algorithm)

pack-priv static void
validateKeyPairGenRandom(SecureRandom random, int securityStrength, FipsAlgorithm algorithm)

pack-priv static void
pack-priv static void
validateRandom(SecureRandom random, FipsAlgorithm algorithm, String message)

pack-priv static void
validateRandom(SecureRandom random, int securityStrength, FipsAlgorithm algorithm, String message)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

testRandomback to summary
pack-priv static final SecureRandom testRandom

Constructor Detail

Utilsback to summary
pack-priv Utils()

Method Detail

approvedModeCheckback to summary
pack-priv static void approvedModeCheck(boolean approvedMode, FipsAlgorithm algorithm)
checkPermissionback to summary
pack-priv static void checkPermission(final Permission permission)
getAEADParametersback to summary
pack-priv static AEADParameters getAEADParameters(ValidatedSymmetricKey sKey, byte[] nonce, int tagLen)
getAsymmetricSecurityStrengthback to summary
public static int getAsymmetricSecurityStrength(int sizeInBits)
getDefaultMacSizeback to summary
pack-priv static int getDefaultMacSize(Algorithm algorithm, int blockSize)
getECCurveSecurityStrengthback to summary
public static int getECCurveSecurityStrength(ECCurve curve)
getKeyParameterback to summary
pack-priv static KeyParameter getKeyParameter(ValidatedSymmetricKey sKey)
getParametersWithIVback to summary
pack-priv static ParametersWithIV getParametersWithIV(ValidatedSymmetricKey sKey, byte[] iv)
validateKeyGenRandomback to summary
pack-priv static void validateKeyGenRandom(SecureRandom random, int securityStrength, FipsAlgorithm algorithm)
validateKeyPairGenRandomback to summary
pack-priv static void validateKeyPairGenRandom(SecureRandom random, int securityStrength, FipsAlgorithm algorithm)
validateRandomback to summary
pack-priv static void validateRandom(SecureRandom random, String message)
validateRandomback to summary
pack-priv static void validateRandom(SecureRandom random, FipsAlgorithm algorithm, String message)
validateRandomback to summary
pack-priv static void validateRandom(SecureRandom random, int securityStrength, FipsAlgorithm algorithm, String message)
org.bouncycastle.crypto.fips back to summary

private Class Utils.TestSecureRandom

extends SecureRandom
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.security.SecureRandom:
generateSeedgetAlgorithmgetInstancegetInstancegetInstancegetInstancegetInstancegetInstancegetInstanceStronggetParametersgetProvidergetSeednextnextBytesnextBytesreseedreseedsetSeedsetSeedtoString

Constructor Detail

TestSecureRandomback to summary
public TestSecureRandom()
org.bouncycastle.crypto.fips back to summary

private Class Utils.TestSecureRandom.RandomProvider

extends Provider
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Constructor Detail

RandomProviderback to summary
pack-priv RandomProvider()
org.bouncycastle.crypto.fips back to summary

private Class Utils.TestSecureRandom.RandomSpi

extends SecureRandomSpi
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final AtomicLong

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected byte[]
engineGenerateSeed(int
the number of seed bytes to generate.
numBytes
)

Implements abstract java.security.SecureRandomSpi.engineGenerateSeed.

Returns the given number of seed bytes.
protected void
engineNextBytes(byte[]
the array to be filled in with random bytes.
bytes
)

Implements abstract java.security.SecureRandomSpi.engineNextBytes.

Generates a user-specified number of random bytes.
protected void
engineSetSeed(byte[]
the seed.
bytes
)

Implements abstract java.security.SecureRandomSpi.engineSetSeed.

Reseeds this random object with the given seed.
Inherited from java.security.SecureRandomSpi:
engineGetParametersengineNextBytesengineReseedtoString

Field Detail

counterback to summary
private final AtomicLong counter

Constructor Detail

RandomSpiback to summary
private RandomSpi()

Method Detail

engineGenerateSeedback to summary
protected byte[] engineGenerateSeed(int numBytes)

Implements abstract java.security.SecureRandomSpi.engineGenerateSeed.

Doc from java.security.SecureRandomSpi.engineGenerateSeed.

Returns the given number of seed bytes. This call may be used to seed other random number generators.

Parameters
numBytes:int

the number of seed bytes to generate.

Returns:byte[]

the seed bytes.

Annotations
@Override
engineNextBytesback to summary
protected void engineNextBytes(byte[] bytes)

Implements abstract java.security.SecureRandomSpi.engineNextBytes.

Doc from java.security.SecureRandomSpi.engineNextBytes.

Generates a user-specified number of random bytes.

Some random number generators can only generate a limited amount of random bytes per invocation. If the size of bytes is greater than this limit, the implementation should invoke its generation process multiple times to completely fill the buffer before returning from this method.

Parameters
bytes:byte[]

the array to be filled in with random bytes.

Annotations
@Override
engineSetSeedback to summary
protected void engineSetSeed(byte[] bytes)

Implements abstract java.security.SecureRandomSpi.engineSetSeed.

Doc from java.security.SecureRandomSpi.engineSetSeed.

Reseeds this random object with the given seed. The seed supplements, rather than replaces, the existing seed. Thus, repeated calls are guaranteed never to reduce randomness.

Parameters
bytes:byte[]

the seed.

Annotations
@Override