| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private int | |
| private long | |
| private long | |
| private static final int | |
| private int | |
| private byte[] | |
| private int | |
| private BlockCipher | |
| private byte[] | |
| private GCMExponentiator | |
| private boolean | |
| private byte[] | |
| private byte[] | |
| private boolean | |
| private byte[] | |
| private byte[] | |
| private byte[] | |
| private int | |
| private GCMMultiplier | |
| private byte[] | |
| private byte[] | |
| private byte[] | |
| private byte[] | |
| private long |
| Access | Constructor and Description |
|---|---|
| public | GCMBlockCipher(BlockCipher
the base cipher. c)
Deprecated
use the GCMBlockCipher.newInstance() static method.
Base constructor - GCM mode over base cipher c. |
| public | GCMBlockCipher(BlockCipher
the base cipher. c, GCMMultiplier the GCM multiplier to use. m)
Deprecated
use the CBCBlockCipher.newInstance() static method.
Base constructor - GCM mode over base cipher c over base multiplier m. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| public int | doFinal(byte[]
space for any resulting output data. out, int offset into out to start copying the data at. outOff)Implements org. Finish the operation either appending or verifying the MAC at the end of the data. |
| private void | |
| public String | getAlgorithmName()
Implements org. Return the name of the algorithm. |
| public byte[] | getMac()
Implements org. Return the value of the MAC associated with the last stream processed. |
| private void | |
| public int | getOutputSize(int
the length of the input. len)Implements org. return the size of the output buffer required for a processBytes plus a doFinal with an input of len bytes. |
| public BlockCipher | getUnderlyingCipher()
Implements org. return the |
| public int | getUpdateOutputSize(int
the length of the input. len)Implements org. return the size of the output buffer required for a processBytes an input of len bytes. |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | init(boolean
true if we are setting up for encryption, false otherwise. forEncryption, CipherParameters the necessary parameters for the underlying cipher to be initialised. params)Implements org. Note MAC sizes from 32 bits to 128 bits (must be a multiple of 8) are supported. |
| private void | |
| public static GCMModeCipher | newInstance(BlockCipher
the base cipher for the GCM mode. cipher)Return a new GCM mode cipher based on the passed in base cipher |
| public static GCMModeCipher | newInstance(BlockCipher
the base cipher for the GCM mode. cipher, GCMMultiplier the GCM multiplier to use. m)Return a new GCM mode cipher based on the passed in base cipher and multiplier. |
| public void | processAADByte(byte
the byte to be processed. in)Implements org. Add a single byte to the associated data check. |
| public void | processAADBytes(byte[]
the input byte array. in, int the offset into the in array where the data to be processed starts. inOff, int the number of bytes to be processed. len)Implements org. Add a sequence of bytes to the associated data check. |
| public int | processByte(byte
the byte to be processed. in, byte[] the output buffer the processed byte goes into. out, int the offset into the output byte array the processed data starts at. outOff)Implements org. encrypt/decrypt a single byte. |
| public int | processBytes(byte[]
the input byte array. in, int the offset into the in array where the data to be processed starts. inOff, int the number of bytes to be processed. len, byte[] the output buffer the processed bytes go into. out, int the offset into the output byte array the processed data starts at. outOff)Implements org. process a block of bytes from in putting the result into out. |
| private void | |
| public void | |
| private void |
| atBlock | back to summary |
|---|---|
| private byte[] atBlock | |
| atBlockPos | back to summary |
|---|---|
| private int atBlockPos | |
| atLength | back to summary |
|---|---|
| private long atLength | |
| atLengthPre | back to summary |
|---|---|
| private long atLengthPre | |
| BLOCK_SIZE | back to summary |
|---|---|
| private static final int BLOCK_SIZE | |
| blocksRemaining | back to summary |
|---|---|
| private int blocksRemaining | |
| bufBlock | back to summary |
|---|---|
| private byte[] bufBlock | |
| bufOff | back to summary |
|---|---|
| private int bufOff | |
| cipher | back to summary |
|---|---|
| private BlockCipher cipher | |
| counter | back to summary |
|---|---|
| private byte[] counter | |
| exp | back to summary |
|---|---|
| private GCMExponentiator exp | |
| forEncryption | back to summary |
|---|---|
| private boolean forEncryption | |
| H | back to summary |
|---|---|
| private byte[] H | |
| initialAssociatedText | back to summary |
|---|---|
| private byte[] initialAssociatedText | |
| initialised | back to summary |
|---|---|
| private boolean initialised | |
| J0 | back to summary |
|---|---|
| private byte[] J0 | |
| lastKey | back to summary |
|---|---|
| private byte[] lastKey | |
| macBlock | back to summary |
|---|---|
| private byte[] macBlock | |
| macSize | back to summary |
|---|---|
| private int macSize | |
| multiplier | back to summary |
|---|---|
| private GCMMultiplier multiplier | |
| nonce | back to summary |
|---|---|
| private byte[] nonce | |
| S | back to summary |
|---|---|
| private byte[] S | |
| S_at | back to summary |
|---|---|
| private byte[] S_at | |
| S_atPre | back to summary |
|---|---|
| private byte[] S_atPre | |
| totalLength | back to summary |
|---|---|
| private long totalLength | |
| GCMBlockCipher | back to summary |
|---|---|
| public GCMBlockCipher(BlockCipher c)
Deprecated use the GCMBlockCipher.newInstance() static method. Base constructor - GCM mode over base cipher c.
| |
| GCMBlockCipher | back to summary |
|---|---|
| public GCMBlockCipher(BlockCipher c, GCMMultiplier m)
Deprecated use the CBCBlockCipher.newInstance() static method. Base constructor - GCM mode over base cipher c over base multiplier m.
| |
| checkStatus | back to summary |
|---|---|
| private void checkStatus() | |
| decryptBlock | back to summary |
|---|---|
| private void decryptBlock(byte[] buf, int bufOff, byte[] out, int outOff) | |
| doFinal | back to summary |
|---|---|
| public int doFinal(byte[] out, int outOff) throws IllegalStateException, InvalidCipherTextException Implements org. Doc from org. Finish the operation either appending or verifying the MAC at the end of the data.
| |
| encryptBlock | back to summary |
|---|---|
| private void encryptBlock(byte[] buf, int bufOff, byte[] out, int outOff) | |
| getAlgorithmName | back to summary |
|---|---|
| public String getAlgorithmName() Implements org. Doc from org. Return the name of the algorithm.
| |
| getMac | back to summary |
|---|---|
| public byte[] getMac() Implements org. Doc from org. Return the value of the MAC associated with the last stream processed.
| |
| getNextCTRBlock | back to summary |
|---|---|
| private void getNextCTRBlock(byte[] block) | |
| getOutputSize | back to summary |
|---|---|
| public int getOutputSize(int len) Implements org. Doc from org. return the size of the output buffer required for a processBytes plus a doFinal with an input of len bytes.
The returned size may be dependent on the initialisation of this cipher
and may not be accurate once subsequent input data is processed - this method
should be invoked immediately prior to a call to final processing of input data
and a call to
| |
| getUnderlyingCipher | back to summary |
|---|---|
| public BlockCipher getUnderlyingCipher() Implements org. Doc from org. return the
| |
| getUpdateOutputSize | back to summary |
|---|---|
| public int getUpdateOutputSize(int len) Implements org. Doc from org. return the size of the output buffer required for a processBytes an input of len bytes. The returned size may be dependent on the initialisation of this cipher and may not be accurate once subsequent input data is processed - this method should be invoked immediately prior to input data being processed.
| |
| gHASH | back to summary |
|---|---|
| private void gHASH(byte[] Y, byte[] b, int len) | |
| gHASHBlock | back to summary |
|---|---|
| private void gHASHBlock(byte[] Y, byte[] b) | |
| gHASHBlock | back to summary |
|---|---|
| private void gHASHBlock(byte[] Y, byte[] b, int off) | |
| gHASHPartial | back to summary |
|---|---|
| private void gHASHPartial(byte[] Y, byte[] b, int off, int len) | |
| init | back to summary |
|---|---|
| public void init(boolean forEncryption, CipherParameters params) throws IllegalArgumentException Implements org. Note MAC sizes from 32 bits to 128 bits (must be a multiple of 8) are supported. The default is 128 bits. Sizes less than 96 are not recommended, but are supported for specialized applications.
| |
| initCipher | back to summary |
|---|---|
| private void initCipher() | |
| newInstance | back to summary |
|---|---|
| public static GCMModeCipher newInstance(BlockCipher cipher) Return a new GCM mode cipher based on the passed in base cipher
| |
| newInstance | back to summary |
|---|---|
| public static GCMModeCipher newInstance(BlockCipher cipher, GCMMultiplier m) Return a new GCM mode cipher based on the passed in base cipher and multiplier.
| |
| processAADByte | back to summary |
|---|---|
| public void processAADByte(byte in) Implements org. Doc from org. Add a single byte to the associated data check.
| |
| processAADBytes | back to summary |
|---|---|
| public void processAADBytes(byte[] in, int inOff, int len) Implements org. Doc from org. Add a sequence of bytes to the associated data check.
| |
| processByte | back to summary |
|---|---|
| public int processByte(byte in, byte[] out, int outOff) throws DataLengthException Implements org. Doc from org. encrypt/decrypt a single byte.
| |
| processBytes | back to summary |
|---|---|
| public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) throws DataLengthException Implements org. Doc from org. process a block of bytes from in putting the result into out.
| |
| processPartial | back to summary |
|---|---|
| private void processPartial(byte[] buf, int off, int len, byte[] out, int outOff) | |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Doc from org. Reset the cipher. After resetting the cipher is in the same state as it was after the last init (if there was one). | |
| reset | back to summary |
|---|---|
| private void reset(boolean clearMac) | |