[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Building scrypt on Windows using Visual Studio 2008


I've attempted building scrypt on Windows with Visual Studio 2008.  I've published the changes here: https://github.com/perpetualtwiddler/scrypt-vs2008

The changes include:
- Use proxy header files not available on Windows:
  inttypes.h & stdint.h (from http://code.google.com/p/msinttypes/)
  unistd.h (from http://stackoverflow.com/a/826027)

- Copy gettimeofday() from PostgreSQL (http://doxygen.postgresql.org/gettimeofday_8c_source.html)

- Copy getopt.[ch] from freegetopt (http://freegetopt.sourceforge.net/)

- Implement Windows versions of these functions in scrypt code:
  getsalt(), memlimit_rlimit(), and tarsnap_readpass()

- Use Windows specific format specification for size_t (ugly change)

- Use pre-generated config.h from py-scrypt source (https://bitbucket.org/mhallin/py-scrypt/src)

- Use ninja (http://martine.github.io/ninja/) to build scrypt.exe, include hand-written build.ninja file (naive attempt).

- Change scrypt-1.1.6/main.c to open source and target files in binary mode.

Files encrypted on Linux are decrypted fine by scrypt on Windows with these changes (and vice-versa).

Could these changes be considered for inclusion into scrypt?  Even if not, I'd appreciate any suggestions/corrections, especially so for the getsalt(), memlimit_rlimit() changes.  I can send a patch on this list if required.