| java.lang.Object sun.security.krb5.internal.crypto.dk.DkCrypto sun.security.krb5.internal.crypto.dk.AesDkCrypto
AesDkCrypto | public class AesDkCrypto extends DkCrypto (Code) | | This class provides the implementation of AES Encryption for Kerberos
as defined RFC 3962.
http://www.ietf.org/rfc/rfc3962.txt
Algorithm profile described in [KCRYPTO]:
+--------------------------------------------------------------------+
| protocol key format 128- or 256-bit string |
| |
| string-to-key function PBKDF2+DK with variable |
| iteration count (see |
| above) |
| |
| default string-to-key parameters 00 00 10 00 |
| |
| key-generation seed length key size |
| |
| random-to-key function identity function |
| |
| hash function, H SHA-1 |
| |
| HMAC output size, h 12 octets (96 bits) |
| |
| message block size, m 1 octet |
| |
| encryption/decryption functions, AES in CBC-CTS mode |
| E and D (cipher block size 16 |
| octets), with next to |
| last block as CBC-style |
| ivec |
+--------------------------------------------------------------------+
Supports AES128 and AES256
author: Seema Malkani version: 1.17, 05/05/07 |
Method Summary | |
public byte[] | calculateChecksum(byte[] baseKey, int usage, byte[] input, int start, int len) | public byte[] | decrypt(byte[] baseKey, int usage, byte[] ivec, byte[] ciphertext, int start, int len) | public byte[] | decryptRaw(byte[] baseKey, int usage, byte[] ivec, byte[] ciphertext, int start, int len) Decrypts data using specified key and initial vector. | public byte[] | encrypt(byte[] baseKey, int usage, byte[] ivec, byte[] new_ivec, byte[] plaintext, int start, int len) Performs encryption using derived key; adds confounder. | public byte[] | encryptRaw(byte[] baseKey, int usage, byte[] ivec, byte[] plaintext, int start, int len) Performs encryption using derived key; does not add confounder. | public int | getChecksumLength() | protected Cipher | getCipher(byte[] key, byte[] ivec, int mode) | protected byte[] | getHmac(byte[] key, byte[] msg) | protected int | getKeySeedLength() | protected byte[] | randomToKey(byte[] in) | final public static int | readBigEndian(byte[] data, int pos, int size) | public byte[] | stringToKey(char[] password, String salt, byte[] s2kparams) |
AesDkCrypto | public AesDkCrypto(int length)(Code) | | |
calculateChecksum | public byte[] calculateChecksum(byte[] baseKey, int usage, byte[] input, int start, int len) throws GeneralSecurityException(Code) | | Calculate the checksum
|
decrypt | public byte[] decrypt(byte[] baseKey, int usage, byte[] ivec, byte[] ciphertext, int start, int len) throws GeneralSecurityException(Code) | | Parameters: baseKey - key from which keys are to be derived using usage Parameters: ciphertext - E(Ke, conf | plaintext | padding, ivec) | H1[1..h] |
decryptRaw | public byte[] decryptRaw(byte[] baseKey, int usage, byte[] ivec, byte[] ciphertext, int start, int len) throws GeneralSecurityException(Code) | | Decrypts data using specified key and initial vector.
Parameters: baseKey - encryption key to use Parameters: ciphertext - encrypted data to be decrypted Parameters: usage - ignored |
getChecksumLength | public int getChecksumLength()(Code) | | |
getKeySeedLength | protected int getKeySeedLength()(Code) | | |
randomToKey | protected byte[] randomToKey(byte[] in)(Code) | | |
readBigEndian | final public static int readBigEndian(byte[] data, int pos, int size)(Code) | | |
Fields inherited from sun.security.krb5.internal.crypto.dk.DkCrypto | final static byte[] KERBEROS_CONSTANT(Code)(Java Doc) final protected static boolean debug(Code)(Java Doc)
|
Methods inherited from sun.security.krb5.internal.crypto.dk.DkCrypto | static String bytesToString(byte[] digest)(Code)(Java Doc) public byte[] calculateChecksum(byte[] baseKey, int usage, byte[] input, int start, int len) throws GeneralSecurityException(Code)(Java Doc) static byte[] charToUtf16(char[] chars)(Code)(Java Doc) static byte[] charToUtf8(char[] chars)(Code)(Java Doc) public byte[] decrypt(byte[] baseKey, int usage, byte[] ivec, byte[] ciphertext, int start, int len) throws GeneralSecurityException(Code)(Java Doc) public byte[] decryptRaw(byte[] baseKey, int usage, byte[] ivec, byte[] ciphertext, int start, int len) throws GeneralSecurityException(Code)(Java Doc) byte[] dk(byte[] key, byte[] constant) throws GeneralSecurityException(Code)(Java Doc) public byte[] encrypt(byte[] baseKey, int usage, byte[] ivec, byte[] new_ivec, byte[] plaintext, int start, int len) throws GeneralSecurityException, KrbCryptoException(Code)(Java Doc) public byte[] encryptRaw(byte[] baseKey, int usage, byte[] ivec, byte[] plaintext, int start, int len) throws GeneralSecurityException, KrbCryptoException(Code)(Java Doc) abstract public int getChecksumLength()(Code)(Java Doc) abstract protected Cipher getCipher(byte[] key, byte[] ivec, int mode) throws GeneralSecurityException(Code)(Java Doc) abstract protected byte[] getHmac(byte[] key, byte[] plaintext) throws GeneralSecurityException(Code)(Java Doc) abstract protected int getKeySeedLength()(Code)(Java Doc) static byte[] nfold(byte[] in, int outbits)(Code)(Java Doc) abstract protected byte[] randomToKey(byte[] in)(Code)(Java Doc) int roundup(int n, int blocksize)(Code)(Java Doc) static void traceOutput(String traceTag, byte[] output, int offset, int len)(Code)(Java Doc)
|
|
|