lyra2re2

package
v1.0.2011 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lyra2

func Lyra2(k []byte, pwd []byte, salt []byte, timeCost uint64, nRows int, nCols int)

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)

func Sum

func Sum(data []byte) ([]byte, error)

Sum returns the result of Lyra2re2 hash.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL