|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsun.security.mule.krb5.internal.crypto.dk.DkCrypto
sun.security.mule.krb5.internal.crypto.dk.ArcFourCrypto
public class ArcFourCrypto
Support for ArcFour in Kerberos as defined in RFC 4757. http://www.ietf.org/rfc/rfc4757.txt
| Constructor Summary | |
|---|---|
ArcFourCrypto(int length)
|
|
| Method Summary | |
|---|---|
byte[] |
calculateChecksum(byte[] baseKey,
int usage,
byte[] input,
int start,
int len)
Calculate the checksum |
byte[] |
decrypt(byte[] baseKey,
int usage,
byte[] ivec,
byte[] ciphertext,
int start,
int len)
|
byte[] |
decryptRaw(byte[] baseKey,
int usage,
byte[] ivec,
byte[] ciphertext,
int start,
int len,
byte[] seqNum)
Decrypts data using specified key and initial vector. |
byte[] |
decryptSeq(byte[] baseKey,
int usage,
byte[] checksum,
byte[] ciphertext,
int start,
int len)
Performs decryption of Sequence Number using derived key. |
byte[] |
encrypt(byte[] baseKey,
int usage,
byte[] ivec,
byte[] new_ivec,
byte[] plaintext,
int start,
int len)
Performs encryption using derived key; adds confounder. |
byte[] |
encryptRaw(byte[] baseKey,
int usage,
byte[] seqNum,
byte[] plaintext,
int start,
int len)
Performs encryption using derived key; does not add confounder. |
byte[] |
encryptSeq(byte[] baseKey,
int usage,
byte[] checksum,
byte[] plaintext,
int start,
int len)
Performs encryption of Sequence Number using derived key. |
int |
getChecksumLength()
|
protected Cipher |
getCipher(byte[] key,
byte[] ivec,
int mode)
|
protected byte[] |
getHmac(byte[] key,
byte[] msg)
Get the HMAC-MD5 |
protected int |
getKeySeedLength()
|
protected byte[] |
randomToKey(byte[] in)
|
byte[] |
stringToKey(char[] passwd)
|
| Methods inherited from class sun.security.mule.krb5.internal.crypto.dk.DkCrypto |
|---|
decryptRaw |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArcFourCrypto(int length)
| Method Detail |
|---|
protected int getKeySeedLength()
getKeySeedLength in class DkCryptoprotected byte[] randomToKey(byte[] in)
randomToKey in class DkCrypto
public byte[] stringToKey(char[] passwd)
throws GeneralSecurityException
GeneralSecurityException
protected Cipher getCipher(byte[] key,
byte[] ivec,
int mode)
throws GeneralSecurityException
getCipher in class DkCryptoGeneralSecurityExceptionpublic int getChecksumLength()
getChecksumLength in class DkCrypto
protected byte[] getHmac(byte[] key,
byte[] msg)
throws GeneralSecurityException
getHmac in class DkCryptoGeneralSecurityException
public byte[] calculateChecksum(byte[] baseKey,
int usage,
byte[] input,
int start,
int len)
throws GeneralSecurityException
calculateChecksum in class DkCryptoGeneralSecurityException
public byte[] encryptSeq(byte[] baseKey,
int usage,
byte[] checksum,
byte[] plaintext,
int start,
int len)
throws GeneralSecurityException,
KrbCryptoException
GeneralSecurityException
KrbCryptoException
public byte[] decryptSeq(byte[] baseKey,
int usage,
byte[] checksum,
byte[] ciphertext,
int start,
int len)
throws GeneralSecurityException,
KrbCryptoException
GeneralSecurityException
KrbCryptoException
public byte[] encrypt(byte[] baseKey,
int usage,
byte[] ivec,
byte[] new_ivec,
byte[] plaintext,
int start,
int len)
throws GeneralSecurityException,
KrbCryptoException
encrypt in class DkCryptoivec - initial vector to use when initializing the cipher; if null,
then blocksize number of zeros are used,new_ivec - if non-null, it is updated upon return to be the
new ivec to use when calling encrypt next time
GeneralSecurityException
KrbCryptoException
public byte[] encryptRaw(byte[] baseKey,
int usage,
byte[] seqNum,
byte[] plaintext,
int start,
int len)
throws GeneralSecurityException,
KrbCryptoException
encryptRaw in class DkCryptoGeneralSecurityException
KrbCryptoException
public byte[] decrypt(byte[] baseKey,
int usage,
byte[] ivec,
byte[] ciphertext,
int start,
int len)
throws GeneralSecurityException
decrypt in class DkCryptobaseKey - key from which keys are to be derived using usageciphertext - E(Ke, conf | plaintext | padding, ivec) | H1[1..h]
GeneralSecurityException
public byte[] decryptRaw(byte[] baseKey,
int usage,
byte[] ivec,
byte[] ciphertext,
int start,
int len,
byte[] seqNum)
throws GeneralSecurityException
baseKey - encryption key to useciphertext - encrypted data to be decryptedusage - ignored
GeneralSecurityException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||