| 1 |
Go implementation of bcrypt_pbkdf(3) from OpenBSD |
| 2 |
(a variant of PBKDF2 with bcrypt-based PRF). |
| 3 |
|
| 4 |
|
| 5 |
USAGE |
| 6 |
|
| 7 |
func Key(password, salt []byte, rounds, keyLen int) ([]byte, error) |
| 8 |
|
| 9 |
|
| 10 |
Key derives a key from the password, salt and rounds count, returning a |
| 11 |
[]byte of length keyLen that can be used as cryptographic key. |
| 12 |
|
| 13 |
Remember to get a good random salt of at least 16 bytes. Using a higher |
| 14 |
rounds count will increase the cost of an exhaustive search but will also |
| 15 |
make derivation proportionally slower. |
| 16 |
|
| 17 |
|
| 18 |
REFERENCES |
| 19 |
|
| 20 |
* https://github.com/dchest/bcrypt_pbkdf |
| 21 |
* http://www.tedunangst.com/flak/post/bcrypt-pbkdf |
| 22 |
* http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libutil/bcrypt_pbkdf.c |