Uses of Class java.security.InvalidKeyException

Uses in package java.security

Constructors which throw type java.security.InvalidKeyException

SignedObject.SignedObject(Serializable object, PrivateKey signingKey, Signature signingEngine)
Constructs a new instance of SignedObject from a Serializable object.

Methods which throw type java.security.InvalidKeyException

void
Initializes this instance with the private key for signing purposes.
void
Initializes this instance with the private key and source of randomness for signing purposes.
void
Initializes this instance with the public key for verification purposes.
Key
Translates the key from an unknown or untrusted provider into a key for this key factory.
void
Initializes this class with the private key for signing purposes.
void
Initializes this class with the private key and source of randomness for signing purposes.
void
Initializes this instance with the public key for verification purposes.
void
Verify a signature with a designated Certificate.
Key
Translates the key from an unknown or untrusted provider into a key from this key factory.
boolean
SignedObject.verify(PublicKey verificationKey, Signature verificationEngine)
Verifies the encapsulated digital signature by checking that it was generated by the owner of a designated public key.

Uses in package gnu.java.security.jce.sig

Methods which throw type java.security.InvalidKeyException

Key
Key
Key

Uses in package gnu.javax.crypto.jce.sig

Methods which throw type java.security.InvalidKeyException

Key
Translates the key from an unknown or untrusted provider into a key for this key factory.

Uses in package gnu.javax.crypto.mode

Methods which throw type java.security.InvalidKeyException

void
BaseMode.init(Map<K,V> attributes)
Initialises the algorithm with designated attributes.
void
EAX.init(Map<K,V> attrib)
Initialises the algorithm with designated attributes.

Uses in package gnu.java.security.x509

Methods which throw type java.security.InvalidKeyException

void
void
void
void
X509CRL.verify(PublicKey key, String provider)

Uses in package gnu.javax.net.ssl.provider

Methods which throw type java.security.InvalidKeyException

void
@Override
@Override
@Override
@Override

Uses in package gnu.javax.crypto

Methods which throw type java.security.InvalidKeyException

int
void
RSACipherImpl.engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
void
RSACipherImpl.engineInit(int opmode, Key key, SecureRandom random)
void

Uses in package gnu.javax.crypto.jce.mac

Methods which throw type java.security.InvalidKeyException

void
Initialize (or re-initialize) this instance.
void
Initialize (or re-initialize) this instance.

Uses in package gnu.javax.crypto.jce.key

Methods which throw type java.security.InvalidKeyException

SecretKey
Translate a secret key into a different representation.

Uses in package java.security.cert

Methods which throw type java.security.InvalidKeyException

void
Verifies that this Certificate was properly signed with the PublicKey that corresponds to its private key.
void
Verifies that this CRL was properly signed with the PublicKey that corresponds to its private key.
void
Certificate.verify(PublicKey key, String sigProvider)
Verifies that this Certificate was properly signed with the PublicKey that corresponds to its private key and uses the signature engine provided by the provider.
void
X509CRL.verify(PublicKey key, String sigProvider)
Verifies that this CRL was properly signed with the PublicKey that corresponds to its private key and uses the signature engine provided by the provider.

Uses in package gnu.javax.crypto.jce

Methods which throw type java.security.InvalidKeyException

Key
DiffieHellmanImpl.engineDoPhase(Key incoming, boolean lastPhase)
SecretKey
void
void

Uses in package gnu.javax.crypto.kwa

Methods which throw type java.security.InvalidKeyException

void
void
void
void
Initializes this instance with the designated algorithm specific attributes.
void
Initializes this instance with the designated algorithm specific attributes.

Uses in package gnu.javax.net.ssl

Methods which throw type java.security.InvalidKeyException

void

Uses in package javax.crypto

Methods which throw type java.security.InvalidKeyException

Key
KeyAgreement.doPhase(Key key, boolean lastPhase)
Do a phase in the key agreement.
Key
KeyAgreementSpi.engineDoPhase(Key key, boolean lastPhase)
Do a phase in the key agreement.
SecretKey
Generate the shared secret and return it as a SecretKey.
int
Return the length of the given key in bits.

For compatibility this method is not declared abstract, and the default implementation will throw an UnsupportedOperationException.

void
CipherSpi.engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
Initializes this cipher with an operation mode, key, parameters, and source of randomness.
void
CipherSpi.engineInit(int opmode, Key key, SecureRandom random)
Initializes this cipher with an operation mode, key, and source of randomness.
void
CipherSpi.engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)
Initializes this cipher with an operation mode, key, parameters, and source of randomness.
void
Initialize this mechanism with a key.
void
Initialize this mechanism with a key and parameters.
void
Initialize this key agreement with a key and source of randomness.
void
Initialize this mechanism with a key and parameters.
void
Initialize (or re-initialize) this instance.
void
Initialize this key agreement with a key, parameters, and source of randomness.
SecretKey
Translate a secret key into a different representation.
Key
CipherSpi.engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType)
Unwraps a previously-wrapped key.

For compatibility this method is not declared abstract, and the default implementation will throw an UnsupportedOperationException.

byte[]
Wrap a key.

For compatibility this method is not declared abstract, and the default implementation will throw an UnsupportedOperationException.

SecretKey
Generate the shared secret and return it as an appropriate SecretKey.
Object
Unseal and deserialize this sealed object with the specified key.
Object
SealedObject.getObject(Key key, String provider)
Unseal and deserialize this sealed object with the specified key, using a cipher from the named provider.
void
Cipher.init(int opmode, Key key)
Initialize this cipher with the supplied key.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

If this cipher requires any random bytes (for example for an initilization vector) than the SecureRandom with the highest priority is used as the source of these bytes.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
Cipher.init(int opmode, Key key, AlgorithmParameters params)
Initialize this cipher with the supplied key and parameters.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

If this cipher requires any random bytes (for example for an initilization vector) then the SecureRandom with the highest priority is used as the source of these bytes.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
Cipher.init(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
Initialize this cipher with the supplied key, parameters, and source of randomness.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
Cipher.init(int opmode, Key key, SecureRandom random)
Initialize this cipher with the supplied key and source of randomness.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
Cipher.init(int opmode, Key key, AlgorithmParameterSpec params)
Initialize this cipher with the supplied key and parameters.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

If this cipher requires any random bytes (for example for an initilization vector) then the SecureRandom with the highest priority is used as the source of these bytes.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
Cipher.init(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)
Initialize this cipher with the supplied key, parameters, and source of randomness.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
Cipher.init(int opmode, Certificate certificate)
Initialize this cipher with the public key from the given certificate.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

As per the Java 1.4 specification, if cert is an instance of an X509Certificate and its key usage extension field is incompatible with opmode then an InvalidKeyException is thrown.

If this cipher requires any random bytes (for example for an initilization vector) than the SecureRandom with the highest priority is used as the source of these bytes.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
Cipher.init(int opmode, Certificate certificate, SecureRandom random)
Initialize this cipher with the public key from the given certificate and the specified source of randomness.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

As per the Java 1.4 specification, if cert is an instance of an X509Certificate and its key usage extension field is incompatible with opmode then an InvalidKeyException is thrown.

If this cipher requires any random bytes (for example for an initilization vector) than the SecureRandom with the highest priority is used as the source of these bytes.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
void
Initialize this key agreement with a key.
void
Mac.init(Key key)
Initialize this MAC with a key and no parameters.
void
void
Initialize this key agreement with a key and a source of randomness.
void
void
Initialize this key agreement with a key and parameters.
void
Initialize this MAC with a key and parameters.
void
Initialize this key agreement with a key, parameters, and source of randomness.
SecretKey
Translate a secret key into another form.
Key
Cipher.unwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType)
Unwrap a previously-wrapped key.
byte[]
Wrap a key.

Uses in package gnu.javax.crypto.jce.cipher

Methods which throw type java.security.InvalidKeyException

void
AESSpi.engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
void
Initializes this cipher with an operation mode, key, parameters, and source of randomness.
void
PBES2.engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
void
ARCFourSpi.engineInit(int mode, Key key, SecureRandom r)
Initializes this cipher with an operation mode, key, and source of randomness.
void
PBES2.engineInit(int opmode, Key key, SecureRandom random)
void
AESSpi.engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)
void
Initializes this cipher with an operation mode, key, parameters, and source of randomness.
void
PBES2.engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)

Uses in package gnu.javax.crypto.mac

Methods which throw type java.security.InvalidKeyException

void
BaseMac.init(Map<K,V> attributes)
Initialises the algorithm with designated attributes.
void
HMac.init(Map<K,V> attributes)
void
IMac.init(Map<K,V> attributes)
Initialises the algorithm with designated attributes.
void
OMAC.init(Map<K,V> attrib)
Initialises the algorithm with designated attributes.
void
TMMH16.init(Map<K,V> attributes)
void
UHash32.init(Map<K,V> attributes)
void
UMac32.init(Map<K,V> attributes)
Initialising a UMAC instance consists of defining values for the following parameters:
  1. Key Material: as the value of the attribute entry keyed by IMac.MAC_KEY_MATERIAL.

Uses in package gnu.javax.crypto.cipher

Classes derived from java.security.InvalidKeyException

class
Checked exception thrown to indicate that a weak key has been generated and or specified instead of a valid non-weak value.

Methods which throw type java.security.InvalidKeyException

void
BaseCipher.init(Map<K,V> attributes)
Initialises the algorithm with designated attributes.
void
Initialises the algorithm with designated attributes.
Object
Anubis.makeKey(byte[] uk, int bs)
Expands a user-supplied key material into a session key for a designated block size.
Object
Cast5.makeKey(byte[] uk, int bs)
Expands a user-supplied key material into a session key for a designated block size.
Object
DES.makeKey(byte[] kb, int bs)
Object
Khazad.makeKey(byte[] uk, int bs)
Expands a user-supplied key material into a session key for a designated block size.
Object
NullCipher.makeKey(byte[] uk, int bs)
Object
Rijndael.makeKey(byte[] k, int bs)
Expands a user-supplied key material into a session key for a designated block size.
Object
Serpent.makeKey(byte[] kb, int blockSize)
Object
Square.makeKey(byte[] uk, int bs)
Expands a user-supplied key material into a session key for a designated block size.
Object
TripleDES.makeKey(byte[] kb, int bs)
Object
Twofish.makeKey(byte[] k, int bs)
Expands a user-supplied key material into a session key for a designated block size.

Uses in package gnu.javax.crypto.keyring

Methods which throw type java.security.InvalidKeyException

void
Computes the mac over this envelope's data.
void
Verifies this entry's payload.

Uses in package javax.crypto.spec

Constructors which throw type java.security.InvalidKeyException

DESKeySpec.DESKeySpec(byte[] key)
Create a new DES key spec, copying the first 8 bytes from the byte array.
DESKeySpec.DESKeySpec(byte[] key, int offset)
Create a new DES key spec, starting at offset in the byte array.
Create a new DES-EDE key spec, copying the first 24 bytes from the byte array.
DESedeKeySpec.DESedeKeySpec(byte[] key, int offset)
Create a new DES-EDE key spec, starting at offset in the byte array.

Methods which throw type java.security.InvalidKeyException

boolean
DESedeKeySpec.isParityAdjusted(byte[] key, int offset)
Returns whether or not the given key is parity adjusted; i.e. every byte in the key has an odd number of "1" bits.
boolean
DESKeySpec.isParityAdjusted(byte[] key, int offset)
Returns whether or not the given key is parity adjusted; i.e. every byte in the key has an odd number of "1" bits.
boolean
DESKeySpec.isWeak(byte[] key, int offset)
Tests if the bytes between [offset, offset+7] constitute a weak or semi-weak DES key.

Uses in package gnu.javax.crypto.assembly

Methods which throw type java.security.InvalidKeyException

void
Cascade.init(Map<K,V> attributes)
Initialises the chain for operation with specific characteristics.
void
Stage.init(Map<K,V> attributes)
Initialises the stage for operation with specific characteristics.

Uses in package javax.security.cert

Methods which throw type java.security.InvalidKeyException

void
Verifies the signature of this certificate.
void
Certificate.verify(PublicKey key, String sigProvider)
Verifies the signature of this certificate, using the specified security provider.