A {@code Makwa} instance implements the Makwa password hashingfunction. It is a context structure which contains some useful parameters.
The Makwa password hashing function uses as input a "password" (actually an arbitrary sequence of bytes) and produces a binary output. The parameters for this processing are the following:
The Makwa output can be optionally encoded as a character string as is described in section A.4 of the Makwa specification. Such a string also contains the salt value, whether pre-hashing and/or post-hashing were applied, the work factor, and a checksum for the modulus and hash function. When the Makwa output is a string, the following restrictions apply:
The modulus can be provided as a {@link BigInteger}, while the private key can be represented as a {@link MakwaPrivateKey} instance.Both modulus and private key can be encoded into bytes, using a format described in the {@link MakwaPrivateKey} class comments.
A {@code Makwa} instance contains the following parameters:
These parameters shall comply to the "character string" restrictions. They are used with the "simple API". That API is what most users of Makwa should use:
Other methods are provided, which use only the modulus (or private key) and hash function, but ignore the other initialization parameters. The pre-hashing, post-hashing length, and work factors are provided explicitly when required:
The {@code doKDF()} methods give a direct access to the internalKDF. These are static methods, usable without context initialization.
Each {@code Makwa} instance is thread-safe and immutable.
@version $Revision$ @author Thomas Pornin
|
|
|
|
|
|
|
|
|
|
|
|
|
|