Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cubehash256 ¶
cubehash56 calculates cubuhash256. length of data must be 32 bytes.
func Lyra2 ¶
lyra2 Executes Lyra2 based on the G function from Blake2b. This version supports salts and passwords whose combined length is smaller than the size of the memory matrix, (i.e., (nRows x nCols x b) bits, where "b" is the underlying sponge's bitrate). In this implementation, the "basil" is composed by all integer parameters (treated as type "unsigned int") in the order they are provided, plus the value of nCols, (i.e., basil = kLen || pwdlen || saltlen || timeCost || nRows || nCols).
@param K The derived key to be output by the algorithm @param kLen Desired key length @param pwd User password @param pwdlen Password length @param salt Salt @param saltlen Salt length @param timeCost Parameter to determine the processing time (T) @param nRows Number or rows of the memory matrix (R) @param nCols Number of columns of the memory matrix (C)
@return 0 if the key is generated correctly; -1 if there is an error (usually due to lack of memory for allocation)
Types ¶
type CubeHash ¶
type CubeHash struct {
// contains filtered or unexported fields
}
CubeHash is for cubehash.
func NewCubeHash ¶
func NewCubeHash() *CubeHash
NewCubeHash initializes anrd retuns Cubuhash struct.