Skip to content

intermernet/pw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PkgGoDev Build Status Coverage Status

pw is a Go library for password authentication

It attempts to put into practice the methodology described in CrackStation's "Salted Password Hashing - Doing it Right".

It uses scrypt for key derivation, and assumes the use of an HMAC key for extra security.

The HMAC Key should be provided from somewhere outside of the database which stores the user IDs, hashes and salts. It should, at least, be stored in a secure file on the server, but it's recommended to use an external server, or service, to provide the HMAC key.

The generated hashes are 256 bits in length, as are any generated salts.

The input HMAC key and password are only limited in length by the underlying Go crypto libraries.

Documentation available at https://pkg.go.dev/github.com/intermernet/pw

See the Go playground for a usage example.

About

pw is a Go library for password authentication

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages