Top Fields Constructors Methods
sun.security.krb5.internal.crypto

public abstract Class EType

extends Object
Class Inheritance
Known Direct Subclasses
sun.security.krb5.internal.crypto.NullEType, sun.security.krb5.internal.crypto.DesCbcEType, sun.security.krb5.internal.crypto.Aes128CtsHmacSha1EType, sun.security.krb5.internal.crypto.Aes128CtsHmacSha2EType, sun.security.krb5.internal.crypto.Aes256CtsHmacSha1EType, sun.security.krb5.internal.crypto.Aes256CtsHmacSha2EType, sun.security.krb5.internal.crypto.ArcFourHmacEType, sun.security.krb5.internal.crypto.Des3CbcHmacSha1KdEType
Imports
sun.security.krb5.internal.*, sun.security.krb5.Config, .EncryptedData, .EncryptionKey, .KrbException, .KrbCryptoException, javax.crypto.*, java.util.Arrays, .List, .ArrayList

Field Summary

Modifier and TypeField and Description
private static final boolean
private static int[]
private static int[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract int
public abstract int
public abstract int
public abstract int
public int
dataSize(byte[] data)

public abstract byte[]
decrypt(byte[] cipher, byte[] key, int usage)

public abstract byte[]
decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage)

public byte[]
decryptedData(byte[] data)

public abstract byte[]
encrypt(byte[] data, byte[] key, int usage)

public abstract byte[]
encrypt(byte[] data, byte[] key, byte[] ivec, int usage)

public abstract int
public static int[]
public static int[]
getDefaults(String configName)

Retrieves the default etypes from the configuration file, or if that's not available, return the built-in list of default etypes.

public static int[]
getDefaults(String configName, EncryptionKey[] keys)

Retrieve the default etypes from the configuration file for those etypes for which there are corresponding keys.

public static EType
getInstance(int eTypeConst)

public static void
public static boolean

Returns:

true if "newer"
isNewer
(int
the encryption type
eTypeConst
)

https://tools.ietf.org/html/rfc4120#section-3.1.3: A "newer" enctype is any enctype first officially specified concurrently with or subsequent to the issue of this RFC.

public static boolean
isSupported(int eTypeConst, int[] config)

public static boolean
isSupported(int eTypeConst)

public abstract int
public abstract int
public abstract int
public int
padSize(byte[] data)

public int
public int
public int
startOfPad(byte[] data)

public static String
toString(int type)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEBUGback to summary
private static final boolean DEBUG
defaultETypesback to summary
private static int[] defaultETypes
supportedETypesback to summary
private static int[] supportedETypes

Constructor Detail

ETypeback to summary
public EType()

Method Detail

blockSizeback to summary
public abstract int blockSize()
checksumSizeback to summary
public abstract int checksumSize()
checksumTypeback to summary
public abstract int checksumType()
confounderSizeback to summary
public abstract int confounderSize()
dataSizeback to summary
public int dataSize(byte[] data)
decryptback to summary
public abstract byte[] decrypt(byte[] cipher, byte[] key, int usage) throws KrbApErrException, KrbCryptoException
decryptback to summary
public abstract byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage) throws KrbApErrException, KrbCryptoException
decryptedDataback to summary
public byte[] decryptedData(byte[] data)
encryptback to summary
public abstract byte[] encrypt(byte[] data, byte[] key, int usage) throws KrbCryptoException
encryptback to summary
public abstract byte[] encrypt(byte[] data, byte[] key, byte[] ivec, int usage) throws KrbCryptoException
eTypeback to summary
public abstract int eType()
getBuiltInDefaultsback to summary
public static int[] getBuiltInDefaults()
getDefaultsback to summary
public static int[] getDefaults(String configName) throws KrbException

Retrieves the default etypes from the configuration file, or if that's not available, return the built-in list of default etypes. This result is always non-empty. If no etypes are found, an exception is thrown.

getDefaultsback to summary
public static int[] getDefaults(String configName, EncryptionKey[] keys) throws KrbException

Retrieve the default etypes from the configuration file for those etypes for which there are corresponding keys. Used in scenario we have some keys from a keytab with etypes different from those named in configName. Then, in order to decrypt an AS-REP, we should only ask for etypes for which we have keys.

getInstanceback to summary
public static EType getInstance(int eTypeConst) throws KdcErrException
initStaticback to summary
public static void initStatic()
isNewerback to summary
public static boolean isNewer(int eTypeConst)

https://tools.ietf.org/html/rfc4120#section-3.1.3: A "newer" enctype is any enctype first officially specified concurrently with or subsequent to the issue of this RFC. The enctypes DES, 3DES, or RC4 and any defined in [RFC1510] are not "newer" enctypes.

Parameters
eTypeConst:int

the encryption type

Returns:boolean

true if "newer"

isSupportedback to summary
public static boolean isSupported(int eTypeConst, int[] config)
isSupportedback to summary
public static boolean isSupported(int eTypeConst)
keySizeback to summary
public abstract int keySize()
keyTypeback to summary
public abstract int keyType()
minimumPadSizeback to summary
public abstract int minimumPadSize()
padSizeback to summary
public int padSize(byte[] data)
startOfChecksumback to summary
public int startOfChecksum()
startOfDataback to summary
public int startOfData()
startOfPadback to summary
public int startOfPad(byte[] data)
toStringback to summary
public static String toString(int type)