Class 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)
     
    where S is a shared secret and H_Interleave a 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 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 algorithm
        sharedSecret - SRP-6 variable: shared secret (S)
        byteOrder - the byte order to use when converting sharedSecret to a byte sequence
    • Method Detail

      • asArray

        public byte[] asArray()