| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | CipherHelper.
This class provides a truncated inputstream needed by WrapToken. |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| private final int | |
| private static final int | |
| private final byte[] | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private final int | |
| private final int | |
| private static final byte[] | ZERO_IV
A zero initial vector to be used for checksum calculation and for DesCbc application data encryption/decryption. |
| private static final byte[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | aes128Decrypt(WrapToken_v2 token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart, int key_usage)
|
| private byte[] | aes128Encrypt(byte[] confounder, byte[] tokenHeader, byte[] plaintext, int start, int len, int key_usage)
|
| private void | aes128Sha2Decrypt(WrapToken_v2 token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart, int key_usage)
|
| private byte[] | aes128Sha2Encrypt(byte[] confounder, byte[] tokenHeader, byte[] plaintext, int start, int len, int key_usage)
|
| private void | aes256Decrypt(WrapToken_v2 token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart, int key_usage)
|
| private byte[] | aes256Encrypt(byte[] confounder, byte[] tokenHeader, byte[] plaintext, int start, int len, int key_usage)
|
| private void | aes256Sha2Decrypt(WrapToken_v2 token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart, int key_usage)
|
| private byte[] | aes256Sha2Encrypt(byte[] confounder, byte[] tokenHeader, byte[] plaintext, int start, int len, int key_usage)
|
| private void | arcFourDecrypt(WrapToken token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart)
|
| private byte[] | arcFourEncrypt(WrapToken token, byte[] confounder, byte[] plaintext, int start, int len, byte[] padding)
|
| pack-priv byte[] | calculateChecksum(int alg, byte[] header, byte[] trailer, byte[] data, int start, int len, int tokenId)
|
| pack-priv byte[] | |
| pack-priv void | |
| pack-priv void | decryptData(WrapToken_v2 token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart, int key_usage)
|
| pack-priv void | |
| pack-priv void | decryptData(WrapToken_v2 token, InputStream cipherStream, int cLen, byte[] plaintext, int pStart, int key_usage)
|
| pack-priv byte[] | |
| private void | des3KdDecrypt(WrapToken token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart)
|
| private byte[] | |
| private void | desCbcDecrypt(WrapToken token, byte[]
the DES key to use key, byte[] the encrypted data cipherText, int the offset for the encrypted data offset, int the length of the encrypted data len, byte[] the output buffer where the application data
should be written dataOutBuf, int the offset where the application data should
be written. dataOffset)Helper routine to decrypt fromm a byte array and write the application data straight to an output array with minimal buffer copies. |
| private void | desCbcDecrypt(WrapToken token, byte[]
the DES key to use key, InputStream the InputStream from which the cipher text should be
read is, int the length of the ciphertext data len, byte[] the output buffer where the application data
should be written dataOutBuf, int the offset where the application data should
be written. dataOffset)Helper routine to decrypt from an InputStream and write the application data straight to an output array with minimal buffer copies. |
| pack-priv void | encryptData(WrapToken token, byte[] confounder, byte[] plaintext, int start, int len, byte[] padding, OutputStream os)
|
| pack-priv byte[] | encryptData(WrapToken_v2 token, byte[] confounder, byte[] tokenHeader, byte[] plaintext, int start, int len, int key_usage)
|
| pack-priv void | encryptData(WrapToken token, byte[] confounder, byte[] plaintext, int pStart, int pLen, byte[] padding, byte[] ciphertext, int cStart)
|
| pack-priv int | encryptData(WrapToken_v2 token, byte[] confounder, byte[] tokenHeader, byte[] plaintext, int pStart, int pLen, byte[] ciphertext, int cStart, int key_usage)
|
| pack-priv byte[] | |
| pack-priv int | |
| private byte[] | getDesCbcChecksum(byte[]
the bytes for the DES key key, byte[] a header to process first before the data is. header, byte[] the data to checksum data, int the offset where the data begins offset, int the length of the data len)Computes the DesCbc checksum based on the algorithm published in FIPS Publication 113. |
| private static byte[] | |
| pack-priv int | |
| private Cipher | getInitializedDes(boolean
true if encryption is desired, false is decryption
is desired. encryptMode, byte[] the bytes for the DES key key, byte[] the initial vector bytes ivBytes)Obtains an initialized DES cipher. |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv boolean |
| AES_IV_SIZE | back to summary |
|---|---|
| private static final int AES_IV_SIZE | |
| DES_CHECKSUM_SIZE | back to summary |
|---|---|
| private static final int DES_CHECKSUM_SIZE | |
| DES_IV_SIZE | back to summary |
|---|---|
| private static final int DES_IV_SIZE | |
| etype | back to summary |
|---|---|
| private final int etype | |
| HMAC_CHECKSUM_SIZE | back to summary |
|---|---|
| private static final int HMAC_CHECKSUM_SIZE | |
| keybytes | back to summary |
|---|---|
| private final byte[] keybytes | |
| KG_USAGE_SEAL | back to summary |
|---|---|
| private static final int KG_USAGE_SEAL | |
| KG_USAGE_SEQ | back to summary |
|---|---|
| private static final int KG_USAGE_SEQ | |
| KG_USAGE_SIGN | back to summary |
|---|---|
| private static final int KG_USAGE_SIGN | |
| KG_USAGE_SIGN_MS | back to summary |
|---|---|
| private static final int KG_USAGE_SIGN_MS | |
| sealAlg | back to summary |
|---|---|
| private final int sealAlg | |
| sgnAlg | back to summary |
|---|---|
| private final int sgnAlg | |
| ZERO_IV | back to summary |
|---|---|
| private static final byte[] ZERO_IV A zero initial vector to be used for checksum calculation and for DesCbc application data encryption/decryption. | |
| ZERO_IV_AES | back to summary |
|---|---|
| private static final byte[] ZERO_IV_AES | |
| CipherHelper | back to summary |
|---|---|
| pack-priv CipherHelper(EncryptionKey key) throws GSSException | |
| aes128Decrypt | back to summary |
|---|---|
| private void aes128Decrypt(WrapToken_v2 token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart, int key_usage) throws GSSException | |
| aes128Encrypt | back to summary |
|---|---|
| private byte[] aes128Encrypt(byte[] confounder, byte[] tokenHeader, byte[] plaintext, int start, int len, int key_usage) throws GSSException | |
| aes128Sha2Decrypt | back to summary |
|---|---|
| private void aes128Sha2Decrypt(WrapToken_v2 token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart, int key_usage) throws GSSException | |
| aes128Sha2Encrypt | back to summary |
|---|---|
| private byte[] aes128Sha2Encrypt(byte[] confounder, byte[] tokenHeader, byte[] plaintext, int start, int len, int key_usage) throws GSSException | |
| aes256Decrypt | back to summary |
|---|---|
| private void aes256Decrypt(WrapToken_v2 token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart, int key_usage) throws GSSException | |
| aes256Encrypt | back to summary |
|---|---|
| private byte[] aes256Encrypt(byte[] confounder, byte[] tokenHeader, byte[] plaintext, int start, int len, int key_usage) throws GSSException | |
| aes256Sha2Decrypt | back to summary |
|---|---|
| private void aes256Sha2Decrypt(WrapToken_v2 token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart, int key_usage) throws GSSException | |
| aes256Sha2Encrypt | back to summary |
|---|---|
| private byte[] aes256Sha2Encrypt(byte[] confounder, byte[] tokenHeader, byte[] plaintext, int start, int len, int key_usage) throws GSSException | |
| arcFourDecrypt | back to summary |
|---|---|
| private void arcFourDecrypt(WrapToken token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart) throws GSSException | |
| arcFourEncrypt | back to summary |
|---|---|
| private byte[] arcFourEncrypt(WrapToken token, byte[] confounder, byte[] plaintext, int start, int len, byte[] padding) throws GSSException | |
| calculateChecksum | back to summary |
|---|---|
pack-priv byte[] calculateChecksum(int alg, byte[] header, byte[] trailer, byte[] data, int start, int len, int tokenId) throws GSSException
| |
| calculateChecksum | back to summary |
|---|---|
| pack-priv byte[] calculateChecksum(byte[] header, byte[] data, int start, int len, int key_usage) throws GSSException | |
| decryptData | back to summary |
|---|---|
| pack-priv void decryptData(WrapToken token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart) throws GSSException | |
| decryptData | back to summary |
|---|---|
| pack-priv void decryptData(WrapToken_v2 token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart, int key_usage) throws GSSException | |
| decryptData | back to summary |
|---|---|
| pack-priv void decryptData(WrapToken token, InputStream cipherStream, int cLen, byte[] plaintext, int pStart) throws GSSException, IOException | |
| decryptData | back to summary |
|---|---|
| pack-priv void decryptData(WrapToken_v2 token, InputStream cipherStream, int cLen, byte[] plaintext, int pStart, int key_usage) throws GSSException, IOException | |
| decryptSeq | back to summary |
|---|---|
| pack-priv byte[] decryptSeq(byte[] ivec, byte[] ciphertext, int start, int len) throws GSSException | |
| des3KdDecrypt | back to summary |
|---|---|
| private void des3KdDecrypt(WrapToken token, byte[] ciphertext, int cStart, int cLen, byte[] plaintext, int pStart) throws GSSException | |
| des3KdEncrypt | back to summary |
|---|---|
| private byte[] des3KdEncrypt(byte[] confounder, byte[] plaintext, int start, int len, byte[] padding) throws GSSException | |
| desCbcDecrypt | back to summary |
|---|---|
| private void desCbcDecrypt(WrapToken token, byte[] key, byte[] cipherText, int offset, int len, byte[] dataOutBuf, int dataOffset) throws GSSException Helper routine to decrypt fromm a byte array and write the application data straight to an output array with minimal buffer copies. The confounder and the padding are stored separately and not copied into this output array.
| |
| desCbcDecrypt | back to summary |
|---|---|
| private void desCbcDecrypt(WrapToken token, byte[] key, InputStream is, int len, byte[] dataOutBuf, int dataOffset) throws GSSException, IOException Helper routine to decrypt from an InputStream and write the application data straight to an output array with minimal buffer copies. The confounder and the padding are stored separately and not copied into this output array.
| |
| encryptData | back to summary |
|---|---|
| pack-priv void encryptData(WrapToken token, byte[] confounder, byte[] plaintext, int start, int len, byte[] padding, OutputStream os) throws GSSException, IOException | |
| encryptData | back to summary |
|---|---|
| pack-priv byte[] encryptData(WrapToken_v2 token, byte[] confounder, byte[] tokenHeader, byte[] plaintext, int start, int len, int key_usage) throws GSSException | |
| encryptData | back to summary |
|---|---|
| pack-priv void encryptData(WrapToken token, byte[] confounder, byte[] plaintext, int pStart, int pLen, byte[] padding, byte[] ciphertext, int cStart) throws GSSException | |
| encryptData | back to summary |
|---|---|
| pack-priv int encryptData(WrapToken_v2 token, byte[] confounder, byte[] tokenHeader, byte[] plaintext, int pStart, int pLen, byte[] ciphertext, int cStart, int key_usage) throws GSSException | |
| encryptSeq | back to summary |
|---|---|
| pack-priv byte[] encryptSeq(byte[] ivec, byte[] plaintext, int start, int len) throws GSSException | |
| getChecksumLength | back to summary |
|---|---|
| pack-priv int getChecksumLength() throws GSSException | |
| getDesCbcChecksum | back to summary |
|---|---|
| private byte[] getDesCbcChecksum(byte[] key, byte[] header, byte[] data, int offset, int len) throws GSSException Computes the DesCbc checksum based on the algorithm published in FIPS Publication 113. This involves applying padding to the data passed in, then performing DesCbc encryption on the data with a zero initial vector, and finally returning the last 8 bytes of the encryption result.
| |
| getDesEncryptionKey | back to summary |
|---|---|
| private static byte[] getDesEncryptionKey(byte[] key) throws GSSException | |
| getEType | back to summary |
|---|---|
| pack-priv int getEType() | |
| getInitializedDes | back to summary |
|---|---|
| private Cipher getInitializedDes(boolean encryptMode, byte[] key, byte[] ivBytes) throws GSSException Obtains an initialized DES cipher.
| |
| getProto | back to summary |
|---|---|
| pack-priv int getProto() | |
| getSealAlg | back to summary |
|---|---|
| pack-priv int getSealAlg() | |
| getSgnAlg | back to summary |
|---|---|
| pack-priv int getSgnAlg() | |
| isArcFour | back to summary |
|---|---|
| pack-priv boolean isArcFour() | |
| Modifier and Type | Field and Description |
|---|---|
| private final InputStream | |
| private final int | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final int | available()
Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. |
| public final void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
| public final int | read()
Implements abstract java. Reads the next byte of data from the input stream. |
| public final int | read(byte[] b)
Overrides java. Reads some number of bytes from the input stream and stores them into
the buffer array |
| public final int | read(byte[] b, int off, int len)
Overrides java. Reads up to |
| public final long | skip(long n)
Overrides java. Skips over and discards |
| is | back to summary |
|---|---|
| private final InputStream is | |
| length | back to summary |
|---|---|
| private final int length | |
| remaining | back to summary |
|---|---|
| private int remaining | |
| temp | back to summary |
|---|---|
| private int temp | |
| WrapTokenInputStream | back to summary |
|---|---|
| public WrapTokenInputStream(InputStream is, int length) | |
| available | back to summary |
|---|---|
| public final int available() throws IOException Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. The read might be on the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes. Note that while some implementations of A subclass's implementation of this method may choose to throw an
| |
| close | back to summary |
|---|---|
| public final void close() throws IOException Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| read | back to summary |
|---|---|
| public final int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public final int read(byte[] b) throws IOException Overrides java. Doc from java. Reads some number of bytes from the input stream and stores them into
the buffer array If the length of The first byte read is stored into element
| |
| read | back to summary |
|---|---|
| public final int read(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements
| |
| skip | back to summary |
|---|---|
| public final long skip(long n) throws IOException Overrides java. Doc from java. Skips over and discards
| |