|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.pkcs.pkcs1.MaskGenerationAlgorithmSpi
JCA compliant SPI class that provides the functionality of a PKCS#1v2.1 mask generation function.
Mask generation functions are used by the PKCS#1v2.1 PSS signature and OAEP encryption schemes:
A mask generation function takes an octet string of variable length and a desired output length as input, and outputs an octet string of the desired length. There may be restrictions on the length of the input and output octet strings, but such bounds are generally very large. Mask generation functions are deterministic; the octet string output is completely determined by the input octet string. The output of a mask generation function should be pseudorandom: Given one part of the output but not the input, it should be infeasible to predict another part of the output. The provable security of RSAES- OAEP and RSASSA-PSS relies on the random nature of the output of the mask generation function, which in turn relies on the random nature of the underlying hash.
MaskGenerationAlgorithm
Constructor Summary | |
protected |
MaskGenerationAlgorithmSpi()
Default constructor. |
Method Summary | |
Object |
clone()
Returns a clone if the implementation is cloneable. |
protected abstract AlgorithmParameters |
engineGetParameters()
SPI: Gets the algorithm parameters required by this MGF engine. |
protected abstract void |
engineMask(byte[] mgfSeed,
int mgfSeedOff,
int mgfSeedLen,
int maskLen,
byte[] dst,
int dstOff)
SPI: Uses the mask generation function to generate maskLen bytes from the supplied seed mgfSeed[mgfSeedOff:mgfSeedLen] and XORs the result with dst[off:maskLen]. |
protected abstract void |
engineReset()
SPE: Resets this engine to the state before engineMask has been called. |
protected abstract void |
engineSetParameters(AlgorithmParameters params)
SPI: Sets any algorithm parameters required by this MGF engine. |
protected abstract void |
engineSetParameters(AlgorithmParameterSpec paramSpec)
SPI: Sets any algorithm parameters required by this MGF engine. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected MaskGenerationAlgorithmSpi()
Method Detail |
protected abstract void engineSetParameters(AlgorithmParameterSpec paramSpec) throws InvalidAlgorithmParameterException
paramSpec
- the parameters to be setInvalidAlgorithmParameterException
- if the parameters are inappropriate for
this engine or are invalidprotected abstract void engineSetParameters(AlgorithmParameters params) throws InvalidAlgorithmParameterException
params
- the parameters to be setInvalidAlgorithmParameterException
- if the parameters are inappropriate for
this engine or are invalidprotected abstract AlgorithmParameters engineGetParameters()
protected abstract void engineMask(byte[] mgfSeed, int mgfSeedOff, int mgfSeedLen, int maskLen, byte[] dst, int dstOff)
mgfSeed
- the seed from which the mask is generatedmgfSeedOff
- the offest indicating the start position within the seed arraymgfSeedLen
- the actual number of seed bytesmaskLen
- the number of required mask bytesdst
- the destination array to which to XOR the mask resultdstOff
- the offset indicating the start position within the destination arrayprotected abstract void engineReset()
engineMask
has been called.public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- if this is called
on an implementation that does not support Cloneable
.
|
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). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |