<div dir="ltr"><div>Anton's argument seems compelling me. I agree.<br>
<br></div>Sabra   <br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 28, 2013 at 2:43 AM, Edi Weitz <span dir="ltr"><<a href="mailto:edi@agharta.de" target="_blank">edi@agharta.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">FWIW, I completely agree with Anton.<br>
<br>
Cheers,<br>
Edi.<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, Oct 28, 2013 at 2:13 AM, Anton Vodonosov <<a href="mailto:avodonosov@yandex.ru">avodonosov@yandex.ru</a>> wrote:<br>
> First of all, even if you want to use ironclad for random strings,<br>
> there is no need to hardcode this in hunchentoot.<br>
><br>
> Hunchentoot is designed to work with any random string generator.<br>
><br>
> There is a variable hunchentoot:*session-secret*.<br>
><br>
> You can initialize it to a random string, like this:<br>
>   (setf hunchentoot:*session-secret* (format nil "~A" (ironclad:strong-random cl:most-positive-fixnum))<br>
> Or, if you want to use the SSL number generator:<br>
>   (setf hunchentoot:*session-secret* (format nil "~A" (secure-random:number cl:most-positive-fixnum))<br>
><br>
> Only if you left hunchentoot:*session-secret* uninitialized,<br>
> hunchentoot will initialize it using hunchentoot::create-random-string,<br>
> which is based on cl:random. And hunchentoot issues a warning in this case.<br>
><br>
> 28.10.2013, 03:09, "Ron Garret" <<a href="mailto:ron@flownet.com">ron@flownet.com</a>>:<br>
>> The best pseudo-random number generator in the world might be completely unacceptable in a crypto application if you don't seed it with enough entropy.<br>
><br>
> Exactly. Ironclad today uses /dev/random or /dev/urandom to seed the<br>
> random number generator with initial entropy.<br>
><br>
> But on Windows, ironclad only has this:<br>
><br>
>   ;; FIXME: this is _untested_!<br>
>   #+(and win32 sb-dynamic-core)(sb-win32:crypt-gen-random num-bytes)<br>
><br>
> Otherwise, an error is signaled:<br>
>   #-(or unix (and win32 sb-dynamic-core))(error "OS-RANDOM-SEED is not supported on your platform.")<br>
><br>
> Also, not all unix-like systems have /dev/random.<br>
><br>
> OpenSSL has more ways to gather initial enthropy, for example<br>
> it knows how to interact with Entropy Gathering Daemon.<br>
><br>
> That's why I think hardcoding Ironclad is not desirable today - it will be too limiting.<br>
><br>
> Probably, hunchentoot documentation about hunchentoot:*session-secret*<br>
> may be improved, so that users don't have these questions.<br>
><br>
> Best regards,<br>
> - Anton<br>
><br>
><br>
><br>
</div></div></blockquote></div><br></div>