-
Website
http://www.daemonology.net/blog/ -
Original page
http://www.daemonology.net/blog/2009-05-16-scrypt-version-1.1-released.html -
Subscribe
All Comments -
Community
-
Top Commenters
-
Marton Trencseni
3 comments · 1 points
-
Ralph Corderoy
4 comments · 1 points
-
da44en
2 comments · 1 points
-
Jason Dusek
2 comments · 1 points
-
royce
9 comments · 1 points
-
-
Popular Threads
-
Supporting FreeBSD
3 weeks ago · 1 comment
-
Supporting FreeBSD
Intel Core2Duo 2.4 GHz (Macbook Pro 4,1)
scrypt failed to build with the following compiler errors:
scrypt-nosse.c: In function ‘scrypt’:
scrypt-nosse.c:298: error: ‘MAP_NOCORE’ undeclared (first use in this function)
scrypt-nosse.c:298: error: (Each undeclared identifier is reported only once
scrypt-nosse.c:298: error: for each function it appears in.)
make[1]: *** [scrypt-nosse.o] Error 1
make[1]: Leaving directory `/home/meqif/tmp/scrypt-1.1'
make: *** [all] Error 2
First on 10.4, configure looks clean as far as I can tell, but the make step fails:
osse.Tpo -c -o scrypt-nosse.o scrypt-nosse.c
scrypt-nosse.c: In function ‘scrypt’:
scrypt-nosse.c:298: error: ‘MAP_NOCORE’ undeclared (first use in this function)
scrypt-nosse.c:298: error: (Each undeclared identifier is reported only once
scrypt-nosse.c:298: error: for each function it appears in.)
make[1]: *** [scrypt-nosse.o] Error 1
make: *** [all] Error 2
On 10.5.6/powerpc
I do see some errors in the configure output that you might find useful:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config.aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM/Contents/Resources/DWARF: Operation not permitted
rm: conftest.dSYM/Contents/Resources: Directory not empty
rm: conftest.dSYM/Contents: Directory not empty
rm: conftest.dSYM: Directory not empty
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking err.h usability... yes
checking err.h presence... yes
checking for err.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/sysinfo.h usability... no
checking sys/sysinfo.h presence... no
checking for sys/sysinfo.h... no
checking for clock_gettime in -lrt... no
checking for clock_gettime... no
checking for sysinfo... no
checking for posix_memalign... no
checking for struct sysinfo... no
checking for struct sysinfo.mem_unit... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
And the make failure:
scrypt-nosse.c: In function ‘scrypt’:
scrypt-nosse.c:298: error: ‘MAP_NOCORE’ undeclared (first use in this function)
scrypt-nosse.c:298: error: (Each undeclared identifier is reported only once
scrypt-nosse.c:298: error: for each function it appears in.)
make[1]: *** [scrypt-nosse.o] Error 1
make: *** [all] Error 2
I couldn't verify your scrypt-sigs-1.1.asc file. gpg complained it could not find the key ID 3DD61E72 on the public servers. Is there another place I should be looking for it?
Cheers,
Antonio
SunOS keithmoon 5.10 Generic_127127-11 sun4v sparc SUNW,Sun-Fire-T200 Solaris
make all-am
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT scryptenc.o -MD -MP -MF .deps/scryptenc.Tpo -c -o scryptenc.o scryptenc.c
mv -f .deps/scryptenc.Tpo .deps/scryptenc.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT crypto_aesctr.o -MD -MP -MF .deps/crypto_aesctr.Tpo -c -o crypto_aesctr.o crypto_aesctr.c
mv -f .deps/crypto_aesctr.Tpo .deps/crypto_aesctr.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT sha256.o -MD -MP -MF .deps/sha256.Tpo -c -o sha256.o sha256.c
mv -f .deps/sha256.Tpo .deps/sha256.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT memlimit.o -MD -MP -MF .deps/memlimit.Tpo -c -o memlimit.o memlimit.c
memlimit.c: In function `memlimit_sysinfo':
memlimit.c:106: error: structure has no member named `totalram'
*** Error code 1
make: Fatal error: Command failed for target `memlimit.o'
Current working directory /home/darren/tmp/scrypt-1.1.1
*** Error code 1
make: Fatal error: Command failed for target `all'
$ ./scrypt enc config.h.in config.h.in.enc
Please enter passphrase:
Please confirm passphrase:
scrypt: Error reading clocks: Invalid argument
(Passphrase is foo.)
I get the same error when trying to decrypt a file encrypted by scrypt compiled on linux. I see that error is from main.c:230.
tycho@sdf$ uname -a
NetBSD sdf 2.1.0_STABLE NetBSD 2.1.0_STABLE (sdf) #0: Fri Mar 30 02:24:32 UTC 2007 root@ol:/var/sys/arch/alpha/compile/sdf alpha
tycho@sdf$ ./configure
checking for a BSD-compatible install... /usr/pkg/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/pkg/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking err.h usability... yes
checking err.h presence... yes
checking for err.h... yes
checking sys/endian.h usability... yes
checking sys/endian.h presence... yes
checking for sys/endian.h... yes
checking sys/sysinfo.h usability... no
checking sys/sysinfo.h presence... no
checking for sys/sysinfo.h... no
checking for clock_gettime in -lrt... yes
checking for clock_gettime... yes
checking for sysinfo... no
checking for posix_memalign... no
checking for struct sysinfo... no
checking for struct sysinfo.mem_unit... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
tycho@sdf$ make
make all-am
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT scryptenc.o -MD -MP -MF .deps/scryptenc.Tpo -c -o scryptenc.o scryptenc.c
mv -f .deps/scryptenc.Tpo .deps/scryptenc.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT crypto_aesctr.o -MD -MP -MF .deps/crypto_aesctr.Tpo -c -o crypto_aesctr.o crypto_aesctr.c
mv -f .deps/crypto_aesctr.Tpo .deps/crypto_aesctr.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT sha256.o -MD -MP -MF .deps/sha256.Tpo -c -o sha256.o sha256.c
mv -f .deps/sha256.Tpo .deps/sha256.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT memlimit.o -MD -MP -MF .deps/memlimit.Tpo -c -o memlimit.o memlimit.c
memlimit.c: In function `memlimit_rlimit':
memlimit.c:138: error: `RLIMIT_AS' undeclared (first use in this function)
memlimit.c:138: error: (Each undeclared identifier is reported only once
memlimit.c:138: error: for each function it appears in.)
*** Error code 1
Stop.
make: stopped in /arpa/tz/t/tycho/src/scrypt-1.1.1
*** Error code 1
Stop.
make: stopped in /arpa/tz/t/tycho/src/scrypt-1.1.1
gcc -g -O2 -o scrypt main.o scryptenc.o crypto_aesctr.o sha256.o memlimit.o warn.o scrypt_cpuperf.o scrypt-nosse.o -lcrypto -lrt
scryptenc.o(.text+0x718): In function `scryptenc_setup':
/arpa/tz/t/tycho/src/scrypt-1.1.1/scryptenc.c:207: undefined reference to `be32enc'
crypto_aesctr.o(.text+0x144): In function `crypto_aesctr_stream':
/arpa/tz/t/tycho/src/scrypt-1.1.1/crypto_aesctr.c:95: undefined reference to `be64enc'
sha256.o(.text+0x10c):/arpa/tz/t/tycho/src/scrypt-1.1.1/sha256.c:58: undefined reference to `be32dec'
sha256.o(.text+0x3228): In function `PBKDF2_SHA256':
scrypt-nosse.o(.text+0x8c8): In function `smix':
/arpa/tz/t/tycho/src/scrypt-1.1.1/scrypt-nosse.c:220: undefined reference to `le32enc'
scrypt: Error reading clocks: Invalid argument
$ uname -a
Linux vps.alpca.org 2.6.18-028stab060.8 #1 SMP Mon Feb 9 20:25:36 MSK 2009 i686 i686 i386 GNU/Linux
$ cat /proc/version
Linux version 2.6.18-028stab060.8 (root@rhel5-64-build) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP Mon Feb 9 20:25:36 MSK 2009
$ cat /etc/redhat-release
CentOS release 4.7 (Final)
NetBSD 5.0_STABLE i386
nbsd$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config.aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking err.h usability... yes
checking err.h presence... yes
checking for err.h... yes
checking sys/endian.h usability... yes
checking sys/endian.h presence... yes
checking for sys/endian.h... yes
checking sys/sysinfo.h usability... no
checking sys/sysinfo.h presence... no
checking for sys/sysinfo.h... no
checking for clock_gettime in -lrt... yes
checking for clock_gettime... yes
checking for sysinfo... no
checking for posix_memalign... yes
checking for struct sysinfo... no
checking for struct sysinfo.mem_unit... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
nbsd$ make
make all-am
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT scryptenc.o -MD -MP -MF .deps/scryptenc.Tpo -c -o scryptenc.o scryptenc.c
mv -f .deps/scryptenc.Tpo .deps/scryptenc.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT crypto_aesctr.o -MD -MP -MF .deps/crypto_aesctr.Tpo -c -o crypto_aesctr.o crypto_aesctr.c
mv -f .deps/crypto_aesctr.Tpo .deps/crypto_aesctr.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT sha256.o -MD -MP -MF .deps/sha256.Tpo -c -o sha256.o sha256.c
mv -f .deps/sha256.Tpo .deps/sha256.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT memlimit.o -MD -MP -MF .deps/memlimit.Tpo -c -o memlimit.o memlimit.c
mv -f .deps/memlimit.Tpo .deps/memlimit.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT warn.o -MD -MP -MF .deps/warn.Tpo -c -o warn.o warn.c
mv -f .deps/warn.Tpo .deps/warn.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT scrypt_cpuperf.o -MD -MP -MF .deps/scrypt_cpuperf.Tpo -c -o scrypt_cpuperf.o scrypt_cpuperf.c
mv -f .deps/scrypt_cpuperf.Tpo .deps/scrypt_cpuperf.Po
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT scrypt-nosse.o -MD -MP -MF .deps/scrypt-nosse.Tpo -c -o scrypt-nosse.o scrypt-nosse.c
mv -f .deps/scrypt-nosse.Tpo .deps/scrypt-nosse.Po
gcc -g -O2 -o scrypt main.o scryptenc.o crypto_aesctr.o sha256.o memlimit.o warn.o scrypt_cpuperf.o scrypt-nosse.o -lcrypto -lrt
nbsd$ ./scrypt enc ./Toaster_NetBSD.jpg ./Toaster_NetBSD.jpg.enc
Please enter passphrase:
Please confirm passphrase:
scrypt: Error reading clocks: Invalid argument
OS=Windows_NT
% scrypt.exe
usage: scrypt {enc | dec} [...] infile [outfile]
i have sent colin the patch, lets see what goes into scrypt :)
uname -a
Linux bluemax-ubuntu 2.6.28-12-server #43-Ubuntu SMP Fri May 1 20:28:32 UTC 2009 i686 GNU/Linux
Intel(R) Core2 DuO CPU E6300 @ 1.86GHz stepping 06
CYGWIN_NT-5.1 mycroft 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin
$ ./scrypt enc scrypt.h scrypt.h.enc
Please enter passphrase: Please confirm passphrase: scrypt: Error reading salt: No error
I threw some fprintfs into getsalt(), and neither successes nor failures seem to be triggered, which makes me think that something other than getsalt() is returning 4 to scryptenc_file. Take that with a giant grain of salt, though; I know about two weeks' worth of C. :-)
$ cat /dev/urandom | strings | head -1
h>E73
colin, have my mails reached your spam folder?
(whether you care about older versions of Solaris like this one is up to you :-)
make[1]: Entering directory `/tmp/scrypt-1.1.2'
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
main.c:27:20: error: stdint.h: No such file or directory
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/tmp/scrypt-1.1.2'
make: *** [all] Error 2
That said, it's possible that if you install a newer (C99) compiler, it will bring a stdint.h implementation with it; so you might want to try that.