<div dir="ltr">Ah yes, thanks.  I will cross-reference the tor spec with openssl and submit a patch for consideration.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 28, 2013 at 9:57 AM, Nick Mathewson <span dir="ltr"><<a href="mailto:nickm@alum.mit.edu" target="_blank">nickm@alum.mit.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, Oct 28, 2013 at 11:46 AM, Joshua Datko <<a href="mailto:jbdatko@gmail.com">jbdatko@gmail.com</a>> wrote:<br>


> Why is there a limited set of OpenSSL engine algorithms chosen in crypto.c<br>
> (code below)?<br>
><br>
> log_engine("RSA", ENGINE_get_default_RSA());<br>
> log_engine("DH", ENGINE_get_default_DH());<br>
> log_engine("RAND", ENGINE_get_default_RAND());<br>
> log_engine("SHA1", ENGINE_get_digest_engine(NID_sha1));<br>
> log_engine("3DES", ENGINE_get_cipher_engine(NID_des_ede3_ecb));<br>
> log_engine("AES", ENGINE_get_cipher_engine(NID_aes_128_ecb));<br>
<br>
<br>
</div>I think you're misunderstanding that code.  That function is called<br>
"log_engine", not "load_engine."  The actual loading and registering<br>
of engines happens earlier in the crypto_global_init() function.  All<br>
that the log_engine function does is to log a short message about<br>
which engine was chosen.<br>
<br>
That said, it would sure be nice to have a more up-to-date list of<br>
engines logged. I'd be happy to take a patch for that.<br>
<br>
 [...]<br>
<div class="im">> Also, I was a bit surprised to see ECB mode.  Is it true that ECB, when used<br>
> as a stream generator, is equal to CTR mode?  ECB mode is not mentioned in<br>
> the spec and after some digging, I found a reference to it [1] for<br>
> encrypting at most one block length of data in the header.<br>
<br>
</div>Yup.  It's used to implement counter mode.  "ECB" in this case is an<br>
alias for "Just the raw AES block function."   Nobody should ever use<br>
ECB except as a building block for something that isn't ECB.<br>
<br>
<br>
best wishes,<br>
<span class="HOEnZb"><font color="#888888">--<br>
Nick<br>
_______________________________________________<br>
tor-dev mailing list<br>
<a href="mailto:tor-dev@lists.torproject.org">tor-dev@lists.torproject.org</a><br>
<a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev</a><br>
</font></span></blockquote></div><br></div>