This class implements the NIST version as documented in "Addendum to NIST SP 800-38A, Recommendation for Block Cipher Modes of Operation: Three Variants of Ciphertext Stealing for CBC Mode"
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | NISTCTSBlockCipher(int
type of CTS mode (CS1, CS2, or CS3) type, BlockCipher the underlying block cipher used to create the CBC block cipher this cipher uses.. cipher)Create a buffered block cipher that uses NIST Cipher Text Stealing |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the number of output bytes copied to out.the array the block currently being held is copied into. out, int the offset at which the copying starts. outOff)Overrides org. |
| public int | Returns: the space required to accommodate a call to update and doFinal with len bytes of input.the length of the input. len)Overrides org. |
| public int | Returns: the space required to accommodate a call to update with len bytes of input.the length of the input. len)Overrides org. |
| public int | Returns: the number of output bytes copied to out.the input byte. in, byte[] the space for any output that might be produced. out, int the offset from which the output will be copied. outOff)Overrides org. |
| public int | Returns: the number of output bytes copied to out.the input byte array. in, int the offset at which the input data starts. inOff, int the number of bytes to be copied out of the input array. len, byte[] the space for any output that might be produced. out, int the offset from which the output will be copied. outOff)Overrides org. |
| blockSize | back to summary |
|---|---|
| private final int blockSize | |
| CS1 | back to summary |
|---|---|
| public static final int CS1 | |
| CS2 | back to summary |
|---|---|
| public static final int CS2 | |
| CS3 | back to summary |
|---|---|
| public static final int CS3 | |
| type | back to summary |
|---|---|
| private final int type | |
| NISTCTSBlockCipher | back to summary |
|---|---|
| public NISTCTSBlockCipher(int type, BlockCipher cipher) Create a buffered block cipher that uses NIST Cipher Text Stealing
| |
| doFinal | back to summary |
|---|---|
| public int doFinal(byte[] out, int outOff) throws DataLengthException, IllegalStateException, InvalidCipherTextException Overrides org. Process the last block in the buffer.
| |
| getOutputSize | back to summary |
|---|---|
| public int getOutputSize(int len) Overrides org. return the size of the output buffer required for an update plus a doFinal with an input of len bytes.
| |
| getUpdateOutputSize | back to summary |
|---|---|
| public int getUpdateOutputSize(int len) Overrides org. return the size of the output buffer required for an update an input of len bytes.
| |
| processByte | back to summary |
|---|---|
| public int processByte(byte in, byte[] out, int outOff) throws DataLengthException, IllegalStateException Overrides org. process a single byte, producing an output block if necessary.
| |
| processBytes | back to summary |
|---|---|
| public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) throws DataLengthException, IllegalStateException Overrides org. process an array of bytes, producing output if necessary.
| |