- java.lang.Object
-
- com.github.glusk.caesar.AbstractBytes
-
- com.github.glusk.srp6_variables.SRP6SessionKey
-
- All Implemented Interfaces:
Bytes
public final class SRP6SessionKey extends AbstractBytes
SRP-6 Session Key (K).This variable is computed as:
K = H_Inteleave(S)
whereSis a shared secret andH_Interleavea special hashing function, used to generate the session key that is twice as long.This implementation closely follows the algorithm described in RFC 2945, Section 3.1 - Interleaved SHA.
The underlying hash function need not be SHA-1.
-
-
Constructor Summary
Constructors Constructor Description SRP6SessionKey(ImmutableMessageDigest hashFunction, SRP6IntegerVariable sharedSecret, ByteOrder byteOrder)Creates a new SRP-6 Session Key from the specified hash function, shared secret and its preferred byte order.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]asArray()-
Methods inherited from class com.github.glusk.caesar.AbstractBytes
equals, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.glusk.caesar.Bytes
asHexString, reversed
-
-
-
-
Constructor Detail
-
SRP6SessionKey
public SRP6SessionKey(ImmutableMessageDigest hashFunction, SRP6IntegerVariable sharedSecret, ByteOrder byteOrder)
Creates a new SRP-6 Session Key from the specified hash function, shared secret and its preferred byte order.- Parameters:
hashFunction- the hash function used to perform the hashing inside the H_Interleave algorithmsharedSecret- SRP-6 variable: shared secret (S)byteOrder- the byte order to use when convertingsharedSecretto a byte sequence
-
-