Class OctetString2Key
java.lang.Object
org.apache.kerby.kerberos.kerb.crypto.dh.OctetString2Key
From RFC 4556:
Define the function octetstring2key() as follows:
octetstring2key(x) == random-to-key(K-truncate(
SHA1(0x00 | x) |
SHA1(0x01 | x) |
SHA1(0x02 | x) |
...
))
where x is an octet string; | is the concatenation operator; 0x00,
0x01, 0x02, etc. are each represented as a single octet; random-
to-key() is an operation that generates a protocol key from a
bitstring of length K; and K-truncate truncates its input to the
first K bits. Both K and random-to-key() are as defined in the
kcrypto profile [RFC3961] for the enctype of the AS reply key.
- Version:
- $Rev$, $Date$
- Author:
- Apache Directory Project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]kTruncate(int k, byte[] x) Performs the function K-truncate to generate the AS reply key k.
-
Constructor Details
-
OctetString2Key
public OctetString2Key()
-
-
Method Details
-
kTruncate
public static byte[] kTruncate(int k, byte[] x) Performs the function K-truncate to generate the AS reply key k.- Parameters:
k- The kx- The x- Returns:
- The AS reply key value.
-