org.apache.directory.server.kerberos.shared.crypto.encryption
Class EncryptionEngine
java.lang.Object
org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionEngine
- Direct Known Subclasses:
- Aes128CtsSha1Encryption, Aes256CtsSha1Encryption, Des3CbcSha1KdEncryption, DesCbcCrcEncryption
public abstract class EncryptionEngine
- extends java.lang.Object
- Version:
- $Rev: 540371 $, $Date: 2007-05-22 02:00:43 +0200 (Tue, 22 May 2007) $
- Author:
- Apache Directory Project
Method Summary |
protected abstract byte[] |
calculateIntegrity(byte[] plainText,
byte[] key,
KeyUsage usage)
|
protected byte[] |
concatenateBytes(byte[] array1,
byte[] array2)
|
protected abstract byte[] |
decrypt(byte[] cipherText,
byte[] key)
|
protected byte[] |
deriveRandom(byte[] key,
byte[] usage,
int n,
int k)
|
protected abstract byte[] |
encrypt(byte[] plainText,
byte[] key)
|
protected int |
getBit(byte[] data,
int pos)
|
protected abstract int |
getChecksumLength()
|
protected abstract int |
getConfounderLength()
|
protected abstract byte[] |
getDecryptedData(EncryptionKey key,
EncryptedData data,
KeyUsage usage)
|
protected abstract EncryptedData |
getEncryptedData(EncryptionKey key,
byte[] plainText,
KeyUsage usage)
|
protected abstract EncryptionType |
getEncryptionType()
|
protected byte[] |
getRandomBytes(int size)
|
protected byte[] |
getUsageKc(KeyUsage usage)
The "well-known constant" used for the DK function is the key
usage number, expressed as four octets in big-endian order,
followed by one octet indicated below. |
protected byte[] |
getUsageKe(KeyUsage usage)
The "well-known constant" used for the DK function is the key
usage number, expressed as four octets in big-endian order,
followed by one octet indicated below. |
protected byte[] |
getUsageKi(KeyUsage usage)
The "well-known constant" used for the DK function is the key
usage number, expressed as four octets in big-endian order,
followed by one octet indicated below. |
protected byte[] |
padString(byte[] encodedString)
|
protected byte[] |
removeLeadingBytes(byte[] array,
int confounder,
int checksum)
|
protected byte[] |
removeTrailingBytes(byte[] array,
int confounder,
int checksum)
|
protected void |
setBit(byte[] data,
int pos,
int val)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EncryptionEngine
public EncryptionEngine()
getDecryptedData
protected abstract byte[] getDecryptedData(EncryptionKey key,
EncryptedData data,
KeyUsage usage)
throws KerberosException
- Throws:
KerberosException
getEncryptedData
protected abstract EncryptedData getEncryptedData(EncryptionKey key,
byte[] plainText,
KeyUsage usage)
getEncryptionType
protected abstract EncryptionType getEncryptionType()
getConfounderLength
protected abstract int getConfounderLength()
getChecksumLength
protected abstract int getChecksumLength()
encrypt
protected abstract byte[] encrypt(byte[] plainText,
byte[] key)
decrypt
protected abstract byte[] decrypt(byte[] cipherText,
byte[] key)
calculateIntegrity
protected abstract byte[] calculateIntegrity(byte[] plainText,
byte[] key,
KeyUsage usage)
deriveRandom
protected byte[] deriveRandom(byte[] key,
byte[] usage,
int n,
int k)
getRandomBytes
protected byte[] getRandomBytes(int size)
padString
protected byte[] padString(byte[] encodedString)
concatenateBytes
protected byte[] concatenateBytes(byte[] array1,
byte[] array2)
removeLeadingBytes
protected byte[] removeLeadingBytes(byte[] array,
int confounder,
int checksum)
removeTrailingBytes
protected byte[] removeTrailingBytes(byte[] array,
int confounder,
int checksum)
getBit
protected int getBit(byte[] data,
int pos)
setBit
protected void setBit(byte[] data,
int pos,
int val)
getUsageKc
protected byte[] getUsageKc(KeyUsage usage)
- The "well-known constant" used for the DK function is the key
usage number, expressed as four octets in big-endian order,
followed by one octet indicated below.
Kc = DK(base-key, usage | 0x99);
getUsageKe
protected byte[] getUsageKe(KeyUsage usage)
- The "well-known constant" used for the DK function is the key
usage number, expressed as four octets in big-endian order,
followed by one octet indicated below.
Ke = DK(base-key, usage | 0xAA);
getUsageKi
protected byte[] getUsageKi(KeyUsage usage)
- The "well-known constant" used for the DK function is the key
usage number, expressed as four octets in big-endian order,
followed by one octet indicated below.
Ki = DK(base-key, usage | 0x55);
Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.