javax.crypto.spec
Class PBEParameterSpec

java.lang.Object
  |
  +--javax.crypto.spec.PBEParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec
Direct Known Subclasses:
IaikPBEParameterSpec

public class PBEParameterSpec
extends Object
implements AlgorithmParameterSpec

Specification for PBE (Password based encryption) parameters.


Attention:  This is not a SUN implementation!

This class has been developed by IAIK according to the documentation publically available.
For SUNīs documentation of this class see http://java.sun.com/security/JCE1.2/spec/apidoc/index.html


This class represents a parameter specification to be used by password-based encryption according to the PKCS#5 Password-Based Encryption Standard. PKCS#5 describes a method for encrypting a given message (octet string) with the DES algorithm in CBC mode using a secret key which is derived from a password with the MD5 or MD2 message-digest algorithm.

Password based encryption according to PKCS#5 uses an eight-octet string (salt value) and a positive integer (iteration count) as parameters. The salt value should be chosen independently from the password; a suggested way is to take the first eight octets of the message digest of the octet string resulting when concatenating the password and the message to be encrypted. The iteration count is used for varying the time to derive a DES key from the password. Therefore the password is concatenated with the salt value and repeatedly digested using the MD5 (MD2) algorithm iteration count times. (see http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-5.html)

Version:
File Revision 15
See Also:
AlgorithmParameterSpec, PBEKeySpec

Constructor Summary
PBEParameterSpec(byte[] salt, int iterationCount)
          Creates a PBE parameter specification from given salt and iteration count value.
 
Method Summary
 int getIterationCount()
          Returns the iteration count.
 byte[] getSalt()
          Returns the salt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBEParameterSpec

public PBEParameterSpec(byte[] salt,
                        int iterationCount)
Creates a PBE parameter specification from given salt and iteration count value.
Parameters:
salt - the salt value
iterationCount - the iteration count value
Method Detail

getSalt

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

getIterationCount

public int getIterationCount()
Returns the iteration count.
Returns:
the iteration count

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK