Hi everybody,
I've been trying to use Crypto++ 5.2.1 on OpenBSD. It compiles and
links properly using GNU Make. However, when I try to run the test
program, I get the following:
-bash-3.1$ ./cryptest.exe v
Using seed: 1147052991
Testing Settings...
passed: Your machine is little endian.
passed: sizeof(byte) == 1
passed: sizeof(word16) == 2
passed: sizeof(word32) == 4
passed: sizeof(word64) == 8
passed: sizeof(word) == 4, sizeof(dword) == 8
Testing operating system provided blocking random number generator...
CryptoPP::Exception caught: OS_Rng: read /dev/random operation failed
with error 5
I've tried changing the references in osrng.cpp to use /dev/srandom and
/dev/urandom as mentioned in the list archives and got a core dump after
cryptest.exe passes the DMAC test.
I have two questions:
1) Is this expected?
2) I am planning on using Crypto++ for a secure network communication
program that uses stream and block ciphers, digital signatures and
hashes. Will this be a problem? I suspect it will be for the stream
ciphers.
I've got a stack trace attached below and the GCC version output.
Thanks
--- Stack trace ---
(gdb) backtrace
#0 0x088f7995 in ?? ()
#1 0x0891a498 in ?? ()
#2 0x0000430c in ?? ()
#3 0x00000006 in ?? ()
#4 0x1c0b0f20 in ValidateCipherModes() () at validat1.cpp:781
#5 0x1c0ac473 in ValidateAll(bool) (thorough=false) at validat1.cpp:73
#6 0x1c0a12c8 in Validate(int, bool, char const*) (alg=0, thorough=false,
seed=0x7d97a14c "1147053300") at test.cpp:792
#7 0x1c09afb9 in main (argc=2, argv=0xcfbcb418) at test.cpp:263
--- End Stack Trace ---
--- GCC version info ---
-bash-3.1$ g++ --version
g++ (GCC) 3.3.5 (propolice)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--- End GCC version ---
--- OS info ---
-bash-3.1$ uname -a
OpenBSD server 3.9 GENERIC#617 i386
--- End OS info ---