iaik.pkcs.pkcs1
Class RSAPssSaltParameterSpec

java.lang.Object
  |
  +--iaik.pkcs.pkcs1.PKCS1AlgorithmParameterSpec
        |
        +--iaik.pkcs.pkcs1.RSAPssSaltParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec
Direct Known Subclasses:
RSAPssParameterSpec

public class RSAPssSaltParameterSpec
extends PKCS1AlgorithmParameterSpec

Parameter specification to may be used for specifying the saltLength parameter for the PKCS#1v2.1 RSASSA-PSS signature algorithm.

According PKCS#1v2.1 RSASSA-PSS parameters consist of hash algorithm id, mask generation function id, salt length and trailer field:

 RSASSA-PSS-params :: = SEQUENCE {
      hashAlgorithm            [0] HashAlgorithm     DEFAULT sha1,
      maskGenerationAlgorithm  [1] MaskGenAlgorithm  DEFAULT mgf1SHA1,
      saltLength               [2] INTEGER           DEFAULT 20,
      trailerField             [3] TrailerField      DEFAULT trailerFieldBC
 }

 HashAlgorithm ::= AlgorithmIdentifer { {OAEP-PSSDigestAlgorithms} }

 MaskGenAlgorithm ::= AlgorithmIdentifier { {PKCS1MGFAlgorithms} }

 TrailerField ::= INTEGER { trailerFieldBC(1) }
 
The Java Cryptography Architecture, however, only allows to set the salt length as parameter and specifies all the other parameters by the algorithm standard name to be implemented by a corresponding PSS signature engine: A signature engine that implements the, for instance, "SHA1withRSAandMGF1" (in general: <digest>with<encryption>and<mgf>) PSS signature algorithm has to use SHA-1 as hash- and MGF1 as mask generation algorithm. The trailer field (0xBC) is fixed by the PKCS#1v2.1 standard and the salt length may be supplied as parameter (default 20 for the SHA-1 hash algorithm).

Version:
File Revision 11

Field Summary
static int DEFAULT_SALT_LENGTH
          Default salt length (20).
protected  int saltLength_
          Salt length.
 
Constructor Summary
RSAPssSaltParameterSpec()
          Creates a RSAPssSaltParameterSpec with the default salt length value (20).
RSAPssSaltParameterSpec(int saltLength)
          Creates a RSAPssSaltParameterSpec for the given salt length.
 
Method Summary
 int getSaltLength()
          Gets the salt length.
 String toString()
          Gets a String representation of this RSAPssSaltParameterSpec.
 
Methods inherited from class iaik.pkcs.pkcs1.PKCS1AlgorithmParameterSpec
getSecureRandom, setSecureRandom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_SALT_LENGTH

public static final int DEFAULT_SALT_LENGTH
Default salt length (20).

saltLength_

protected int saltLength_
Salt length.
Constructor Detail

RSAPssSaltParameterSpec

public RSAPssSaltParameterSpec()
Creates a RSAPssSaltParameterSpec with the default salt length value (20).

RSAPssSaltParameterSpec

public RSAPssSaltParameterSpec(int saltLength)
Creates a RSAPssSaltParameterSpec for the given salt length.
Parameters:
saltLength - the salt length value to be used.
Throws:
IllegalArgumentException - if saltLength < 0
Method Detail

getSaltLength

public int getSaltLength()
Gets the salt length.
Returns:
the salt length value

toString

public String toString()
Gets a String representation of this RSAPssSaltParameterSpec.
Overrides:
toString in class Object
Returns:
a string representation of this RSAPssSaltParameterSpec

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