qorelanguage / qore

Qore Programming Language
GNU General Public License v2.0
58 stars 10 forks source link

Add support for bcrypt, scrypt and PBKDF2 algorithms #2259

Open omusil24 opened 6 years ago

omusil24 commented 6 years ago

These algorithms are needed for example for safe hashing of passwords.

Related: https://stackoverflow.com/questions/116684/what-algorithm-should-i-use-to-hash-passwords-into-my-database https://stackoverflow.com/questions/1841595/secure-password-hashing

davidnich commented 6 years ago

@omusil24 do you have a library in mind that provides support for these algorithms?

omusil24 commented 6 years ago

@davidnich I didn't do research about it yet, but if you want, I can take a look tomorrow.

gamato commented 6 years ago

bcrypt comes from OpenBSD. It's part of libc on BSD systems, afaik. Here's their bcrypt and PBKDF2 implementation: https://github.com/openbsd/src/tree/master/lib/libc/crypt https://github.com/openbsd/src/tree/master/lib/libutil

scrypt comes from Tarsnap project. It's been tested on most current platforms: http://www.tarsnap.com/scrypt.html

Here's an example password library for Python (implementing many hashing algorithms): https://passlib.readthedocs.io/en/stable/index.html

davidnich commented 6 years ago

@omusil24 let's discuss the need for this and the priority