8

I'm currently developing a C app in which I'll need to hash user's passwords. I know scrypt is currently one of the best methods to "hash" passwords (memory-bound, slow), but I can't seem to find a simple cross-platform C library that would do it for me.

And, since I'm neither a C expert or a cryptography/hashing expert, I'm afraid doing it myself will induce some obvious flaws in the system (it's easy to get these things wrong).

So, is there a C library that can do that, or, if not, other libraries that would implement similar solutions ? (bcrypt would work, although not as good as scrypt, ...)

Artefact2
  • 7,516
  • 3
  • 30
  • 38

1 Answers1

8

Google says yes: scrypt_1.1.6.orig.tar.gz

(the relevant files seem to be in the lib subfolder)

Damon
  • 67,688
  • 20
  • 135
  • 185
  • 1
    Well, that doesn't look like a library, because Make only makes the executable and there are no instructions whatsoever about the library usage (mostly compiling and linking the .so or .a)… – Artefact2 Jun 22 '11 at 08:15
  • 1
    No, it is the scrypt utility program, which is a single `main.c` file _plus_ the scrypt library, which was extracted from the Tarsnap utility (see README inside the lib folder). It shouldn't make any difficulties taking what's inside the lib folder and ignoring the presence of the `main.c` file. – Damon Jun 22 '11 at 08:30
  • Okay. I'll try to use it by looking at the main.c file, thanks ! – Artefact2 Jun 22 '11 at 08:41
  • It's unclear how to use this with Qt Creator on multiple platforms, given that the package requires a configure script to be run which generates a config.h. Also, no library is generated, only the scrypt executable. It's not my impression that this package was meant to be used as a library. – njahnke Nov 29 '13 at 17:39