Re: [Botan-devel] Issues with 1.2.4 and the workarounds
Brought to you by:
randombit
|
From: Jack L. <ll...@ac...> - 2003-06-06 22:41:27
|
On Fri, 6 Jun 2003, Jeff B wrote:
> Hello, if you missed my posts yesterday, here's the scoop: I'm an
> experienced programmer but I'm new to encryption and the Botan library, and
> I'm currently evaluating Botan to use in a project I'm working on. I've got
> the 1.2.4 sources and I'm trying to build using Visual Studio .NET 2003 on
> Windows and CodeWarrior Pro 8.3 on MacOS X, but I'm having troubles building
> on Windows and running on Mac...
>
>
> Issue #1: Windows compile problem solved/workaround. The following in
> get_ciph.cpp, line 87
> Invalid_Combination(const std::string& mode, const std::string& pad) :
> Exception("Invalid mode/padding pair: " + mode + "/" + pad) {}
> Doesn't compile. If you comment out mode and pad and change it to
> Invalid_Combination(const std::string& mode, const std::string& pad) :
> Exception("Invalid mode/padding pair: " /*+ mode + "/" + pad*/) {}
That's a good enough workaround until I can figure out what VS's problem is
here.
> When I added #define BOTAN_EXT_ENTROPY_SRC_WIN32 to the Windows project, the
> same code got executed (and urandom and random weren't found), but the
> addition of
> bits += poll_es<Win32_EntropySource>(slow_poll);
> called the Windows-specific code (Win32_EntropySource::do_fast_poll() and
> Win32_EntropySource::do_slow_poll()) and added bits to the seed and
> everything worked (YEA!)
> OK, now, a question: Is this a known issue? From what I can tell, you need
> to either have a "urandom" or "random" file present, or a platform-specific
> #define (like BOTAN_EXT_ENTROPY_SRC_WIN32 ) in order for it to work. If
> this is in the docs, I apologies... I missed it.
I am such an idiot for not catching this right from the start. Yes, on
Windows especially, extra modules are needed for getting entropy. Typically
this is done (on Windows) by calling configure with an extra flag of
"--module-set=win32", which will enable using various Win32-specific APIs
to gather entropy (specifically, the es_capi and es_win32 modules).
It is mentioned in the docs that adding the --module-set=win32 arg is
necessary on Windows. Given the fact that *I* didn't think about it until
now, no reason to feel bad about it. ;)
I am still baffled that this is also happening on OS X, which really really
should have /dev/*random. But you can try configuring it with
"--module-set=unix", which will enable some extra entropy sources that will
(presumably!) work.
-Jack
|