APIdia Launch Partner
Top Fields Constructors Methods
sun.security.krb5.internal.crypto.dk

public Class Des3DkCrypto

extends DkCrypto
Class Inheritance
Imports
javax.crypto.Cipher, .Mac, .SecretKeyFactory, .SecretKey, javax.crypto.spec.SecretKeySpec, .DESKeySpec, .DESedeKeySpec, .IvParameterSpec, java.security.spec.KeySpec, java.security.GeneralSecurityException, .InvalidKeyException, java.util.Arrays

Field Summary

Modifier and TypeField and Description
private static final byte[]
Inherited from sun.security.krb5.internal.crypto.dk.DkCrypto:
ALLOW_WEAK_PBKDF2_ITERATION_COUNTdebugKERBEROS_CONSTANT

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static byte[]
des3Expand(byte[] input, int
index of starting byte (inclusive)
start
,
int
index of ending byte (exclusive)
end
)

From RFC 3961.

public int
protected Cipher
getCipher(byte[] key, byte[] ivec, int mode)

Implements abstract sun.security.krb5.internal.crypto.dk.DkCrypto.getCipher.

protected byte[]
getHmac(byte[] key, byte[] msg)

Implements abstract sun.security.krb5.internal.crypto.dk.DkCrypto.getHmac.

protected int
private static byte[]
keyCorrection(byte[] key)

public byte[]
parityFix(byte[] value)

protected byte[]
private static void
setParityBit(byte[] key)

Sets the parity bit (0th bit) in each byte so that each byte contains an odd number of 1's.

public byte[]
stringToKey(char[] salt)

private byte[]
stringToKey(byte[] secretAndSalt, byte[] opaque)

Inherited from sun.security.krb5.internal.crypto.dk.DkCrypto:
bytesToStringcalculateChecksumcharToUtf16charToUtf8decryptdecryptRawdkdrencryptencryptRawiterationCountnfoldreadBigEndianrounduptraceOutput

Field Detail

ZERO_IVback to summary
private static final byte[] ZERO_IV

Constructor Detail

Des3DkCryptoback to summary
public Des3DkCrypto()

Method Detail

des3Expandback to summary
private static byte[] des3Expand(byte[] input, int start, int end)

From RFC 3961. Expands a 7-byte array into an 8-byte array that contains parity bits. The 56 bits are expanded into 64 bits as follows: 1 2 3 4 5 6 7 p 9 10 11 12 13 14 15 p 17 18 19 20 21 22 23 p 25 26 27 28 29 30 31 p 33 34 35 36 37 38 39 p 41 42 43 44 45 46 47 p 49 50 51 52 53 54 55 p 56 48 40 32 24 16 8 p (PI,P2,...,P8) are reserved for parity bits computed on the preceding seven independent bits and set so that the parity of the octet is odd, i.e., there is an odd number of "1" bits in the octet.

Parameters
start:int

index of starting byte (inclusive)

end:int

index of ending byte (exclusive)

getChecksumLengthback to summary
public int getChecksumLength()

Implements abstract sun.security.krb5.internal.crypto.dk.DkCrypto.getChecksumLength.

getCipherback to summary
protected Cipher getCipher(byte[] key, byte[] ivec, int mode) throws GeneralSecurityException

Implements abstract sun.security.krb5.internal.crypto.dk.DkCrypto.getCipher.

getHmacback to summary
protected byte[] getHmac(byte[] key, byte[] msg) throws GeneralSecurityException

Implements abstract sun.security.krb5.internal.crypto.dk.DkCrypto.getHmac.

getKeySeedLengthback to summary
protected int getKeySeedLength()

Implements abstract sun.security.krb5.internal.crypto.dk.DkCrypto.getKeySeedLength.

keyCorrectionback to summary
private static byte[] keyCorrection(byte[] key)
parityFixback to summary
public byte[] parityFix(byte[] value) throws GeneralSecurityException
randomToKeyback to summary
protected byte[] randomToKey(byte[] in)

Implements abstract sun.security.krb5.internal.crypto.dk.DkCrypto.randomToKey.

setParityBitback to summary
private static void setParityBit(byte[] key)

Sets the parity bit (0th bit) in each byte so that each byte contains an odd number of 1's.

stringToKeyback to summary
public byte[] stringToKey(char[] salt) throws GeneralSecurityException
stringToKeyback to summary
private byte[] stringToKey(byte[] secretAndSalt, byte[] opaque) throws GeneralSecurityException