Skip navigation links

Oracle Fusion Middleware Crypto Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10668-05


oracle.security.crypto.core
Class PBEAlgorithmIdentifier

java.lang.Object
  extended by oracle.security.crypto.core.AlgorithmIdentifier
      extended by oracle.security.crypto.core.PBEAlgorithmIdentifier

All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, ASN1Object, Streamable

public class PBEAlgorithmIdentifier
extends AlgorithmIdentifier

An Algorithm Identifier used for Password Based Encryption operations.

See Also:
PBE, PKCS5PBE, PKCS12PBE, Serialized Form

Field Summary
static int DEFAULT_ITER_COUNT
          Default password-based key derivation iteration count is 1024.
static int DEFAULT_SALT_LEN
          Default password-based key derivation salt length is 8 bytes.
static ASN1ObjectID id_PBES2
          OID for PKCS#5 that identifies the PBES2 encryption scheme
static ASN1ObjectID id_PBKDF2
          OID for PKCS#5 that identifies the PBKDF2 key derivation function
static ASN1ObjectID pbeWithMD2AndDES_CBC
          OID for PKCS#5 PBE MD2 with DES CBC algorithm
static ASN1ObjectID pbeWithMD2AndRC2_CBC
          OID for PKCS#5 PBE MD2 with RC2 CBC algorithm
static ASN1ObjectID pbeWithMD5AndDES_CBC
          OID for PKCS#5 PBE MD5 with DES CBC algorithm
static ASN1ObjectID pbeWithMD5AndRC2_CBC
          OID for PKCS#5 PBE MD5 with RC2 CBC algorithm
static ASN1ObjectID pbeWithSHA1AndDES_CBC
          OID for PKCS#5 PBE SHA1 with DES CBC algorithm
static ASN1ObjectID pbeWithSHA1AndRC2_CBC
          OID for PKCS#5 PBE SHA1 with RC2 CBC algorithm
static ASN1ObjectID pbeWithSHAAnd128BitRC2_CBC
          OID for PKCS#12 PBE SHA1 with RC2 CBC 128 bits algorithm
static ASN1ObjectID pbeWithSHAAnd128BitRC4
          OID for PKCS#12 PBE SHA1 with RC4 128 bits algorithm
static ASN1ObjectID pbeWithSHAAnd2_KeyTripleDES_CBC
          OID for PKCS#12 PBE SHA1 with Triple DES CBC 112 bits algorithm
static ASN1ObjectID pbeWithSHAAnd3_KeyTripleDES_CBC
          OID for PKCS#12 PBE SHA1 with Triple DES CBC 168 bits algorithm
static ASN1ObjectID pbeWithSHAAnd40BitRC2_CBC
          OID for PKCS#12 PBE SHA1 with RC2 CBC 40 bits algorithm
static ASN1ObjectID pbeWithSHAAnd40BitRC4
          OID for PKCS#12 PBE SHA1 with RC4 40 bits algorithm
static ASN1ObjectID pkcs12PBEids
          OID for PKCS#12 PBE algorithms
static ASN1ObjectID pkcs5
          OID for PKCS#5 PBE algorithms

 

Constructor Summary
PBEAlgorithmIdentifier()
          Empty constructor.
PBEAlgorithmIdentifier(ASN1ObjectID oid)
          Creates an PBEAlgorithmIdentifier used with the PBES1 encryption scheme using the default salt size and the default iteration count.
PBEAlgorithmIdentifier(ASN1ObjectID oid, byte[] salt, int iterationCount)
          Creates an PBEAlgorithmIdentifier used with the PBES1 encryption scheme.
PBEAlgorithmIdentifier(ASN1ObjectID oid, RandomBitsSource rbs)
          Creates an PBEAlgorithmIdentifier used with the PBES1 encryption scheme using the default salt size and the default iteration count.
PBEAlgorithmIdentifier(byte[] salt, int iterationCount, AlgorithmIdentifier cipherAlgID)
          Creates an PBEAlgorithmIdentifier used with the PBES2 encryption scheme.
PBEAlgorithmIdentifier(byte[] salt, int iterationCount, int keyLength, AlgorithmIdentifier prfAlgID, AlgorithmIdentifier cipherAlgID)
          Creates an PBEAlgorithmIdentifier used with the PBES2 encryption scheme.
PBEAlgorithmIdentifier(java.io.InputStream is)
          Creates a new PBEAlgorithmIdentifier from the given input stream.

 

Method Summary
 java.lang.Object clone()
          Clone this Algorithm Identifier.
 AlgorithmIdentifier getEncryptionScheme()
          Returns the The algorithm that identifies the underlying encryption scheme in case of a PBES2 algorithm or null otherwise.
 int getIterationCount()
          Returns the iteration count value.
 int getKeyLength()
          Returns the key length if set in case of the PBSE2 algorithm.
 AlgorithmIdentifier getPseudorandomFunc()
          Returns the The algorithm that identifies the underlying pseudorandom function in case of a PBES2 algorithm or null otherwise.
 byte[] getSalt()
          Returns the salt value.
 void input(java.io.InputStream is)
          Reads in a PBEAlgorithmIdentifier object from the given input stream.

 

Methods inherited from class oracle.security.crypto.core.AlgorithmIdentifier
equals, getOID, getParameters, hashCode, length, output, readExternal, toString, writeExternal

 

Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

pkcs5

public static final ASN1ObjectID pkcs5
OID for PKCS#5 PBE algorithms

pbeWithMD2AndDES_CBC

public static final ASN1ObjectID pbeWithMD2AndDES_CBC
OID for PKCS#5 PBE MD2 with DES CBC algorithm

pbeWithMD2AndRC2_CBC

public static final ASN1ObjectID pbeWithMD2AndRC2_CBC
OID for PKCS#5 PBE MD2 with RC2 CBC algorithm

pbeWithMD5AndDES_CBC

public static final ASN1ObjectID pbeWithMD5AndDES_CBC
OID for PKCS#5 PBE MD5 with DES CBC algorithm

pbeWithMD5AndRC2_CBC

public static final ASN1ObjectID pbeWithMD5AndRC2_CBC
OID for PKCS#5 PBE MD5 with RC2 CBC algorithm

pbeWithSHA1AndDES_CBC

public static final ASN1ObjectID pbeWithSHA1AndDES_CBC
OID for PKCS#5 PBE SHA1 with DES CBC algorithm

pbeWithSHA1AndRC2_CBC

public static final ASN1ObjectID pbeWithSHA1AndRC2_CBC
OID for PKCS#5 PBE SHA1 with RC2 CBC algorithm

id_PBKDF2

public static final ASN1ObjectID id_PBKDF2
OID for PKCS#5 that identifies the PBKDF2 key derivation function

id_PBES2

public static final ASN1ObjectID id_PBES2
OID for PKCS#5 that identifies the PBES2 encryption scheme

pkcs12PBEids

public static final ASN1ObjectID pkcs12PBEids
OID for PKCS#12 PBE algorithms

pbeWithSHAAnd128BitRC4

public static final ASN1ObjectID pbeWithSHAAnd128BitRC4
OID for PKCS#12 PBE SHA1 with RC4 128 bits algorithm

pbeWithSHAAnd40BitRC4

public static final ASN1ObjectID pbeWithSHAAnd40BitRC4
OID for PKCS#12 PBE SHA1 with RC4 40 bits algorithm

pbeWithSHAAnd3_KeyTripleDES_CBC

public static final ASN1ObjectID pbeWithSHAAnd3_KeyTripleDES_CBC
OID for PKCS#12 PBE SHA1 with Triple DES CBC 168 bits algorithm

pbeWithSHAAnd2_KeyTripleDES_CBC

public static final ASN1ObjectID pbeWithSHAAnd2_KeyTripleDES_CBC
OID for PKCS#12 PBE SHA1 with Triple DES CBC 112 bits algorithm

pbeWithSHAAnd128BitRC2_CBC

public static final ASN1ObjectID pbeWithSHAAnd128BitRC2_CBC
OID for PKCS#12 PBE SHA1 with RC2 CBC 128 bits algorithm

pbeWithSHAAnd40BitRC2_CBC

public static final ASN1ObjectID pbeWithSHAAnd40BitRC2_CBC
OID for PKCS#12 PBE SHA1 with RC2 CBC 40 bits algorithm

DEFAULT_SALT_LEN

public static final int DEFAULT_SALT_LEN
Default password-based key derivation salt length is 8 bytes.
See Also:
Constant Field Values

DEFAULT_ITER_COUNT

public static final int DEFAULT_ITER_COUNT
Default password-based key derivation iteration count is 1024.
See Also:
Constant Field Values

Constructor Detail

PBEAlgorithmIdentifier

public PBEAlgorithmIdentifier(ASN1ObjectID oid)
                       throws AlgorithmIdentifierException
Creates an PBEAlgorithmIdentifier used with the PBES1 encryption scheme using the default salt size and the default iteration count.
Parameters:
oid - The object identifier of the algorithm identifier.
Throws:
AlgorithmIdentifierException

PBEAlgorithmIdentifier

public PBEAlgorithmIdentifier(ASN1ObjectID oid,
                              RandomBitsSource rbs)
                       throws AlgorithmIdentifierException
Creates an PBEAlgorithmIdentifier used with the PBES1 encryption scheme using the default salt size and the default iteration count.
Parameters:
oid - The object identifier of the algorithm identifier.
rbs - The RandomBitsSource to use to generate the salt.
Throws:
AlgorithmIdentifierException

PBEAlgorithmIdentifier

public PBEAlgorithmIdentifier(ASN1ObjectID oid,
                              byte[] salt,
                              int iterationCount)
                       throws AlgorithmIdentifierException
Creates an PBEAlgorithmIdentifier used with the PBES1 encryption scheme.
Parameters:
oid - The object identifier of the algorithm identifier.
salt - The salt that will be part of the parameters of the algorithm.
iterationCount - The iteration count.
Throws:
AlgorithmIdentifierException

PBEAlgorithmIdentifier

public PBEAlgorithmIdentifier(byte[] salt,
                              int iterationCount,
                              int keyLength,
                              AlgorithmIdentifier prfAlgID,
                              AlgorithmIdentifier cipherAlgID)
                       throws AlgorithmIdentifierException
Creates an PBEAlgorithmIdentifier used with the PBES2 encryption scheme. The object identifier of the algorithm will be id_PBES2.
Parameters:
salt - The salt that will be part of the parameters of the algorithm.
iterationCount - The iteration count.
keyLength - The length of the key generated by the pseudorandom function.
prfAlgID - The algorithm that identifies the underlying pseudorandom function.
cipherAlgID - The algorithm that identifies the underlying encryption scheme.
Throws:
AlgorithmIdentifierException

PBEAlgorithmIdentifier

public PBEAlgorithmIdentifier(byte[] salt,
                              int iterationCount,
                              AlgorithmIdentifier cipherAlgID)
                       throws AlgorithmIdentifierException
Creates an PBEAlgorithmIdentifier used with the PBES2 encryption scheme. The object identifier of the algorithm will be id_PBES2. The underlying pseudorandom function is AlgID.hmacWithSHA1.
Parameters:
salt - The salt that will be part of the parameters of the algorithm.
iterationCount - The iteration count.
cipherAlgID - The algorithm that identifies the underlying encryption scheme.
Throws:
AlgorithmIdentifierException

PBEAlgorithmIdentifier

public PBEAlgorithmIdentifier()
                       throws java.io.IOException
Empty constructor.
Throws:
java.io.IOException

PBEAlgorithmIdentifier

public PBEAlgorithmIdentifier(java.io.InputStream is)
                       throws java.io.IOException
Creates a new PBEAlgorithmIdentifier from the given input stream.
Throws:
java.io.IOException

Method Detail

getSalt

public byte[] getSalt()
Returns the salt value.

getIterationCount

public int getIterationCount()
Returns the iteration count value.

getKeyLength

public int getKeyLength()
Returns the key length if set in case of the PBSE2 algorithm.

getPseudorandomFunc

public AlgorithmIdentifier getPseudorandomFunc()
Returns the The algorithm that identifies the underlying pseudorandom function in case of a PBES2 algorithm or null otherwise.

getEncryptionScheme

public AlgorithmIdentifier getEncryptionScheme()
Returns the The algorithm that identifies the underlying encryption scheme in case of a PBES2 algorithm or null otherwise.

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Reads in a PBEAlgorithmIdentifier object from the given input stream.
Specified by:
input in interface Streamable
Overrides:
input in class AlgorithmIdentifier
Parameters:
is - The input stream.
Throws:
java.io.IOException - If an I/O error occurs.

clone

public java.lang.Object clone()
Clone this Algorithm Identifier.
Overrides:
clone in class AlgorithmIdentifier
Returns:
A clone of this object.

Skip navigation links

Oracle Fusion Middleware Crypto Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10668-05


Copyright © 2005, 2013, Oracle. All rights reserved.