<div dir="ltr">Dear John, <br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 21, 2016 at 2:52 PM, John Hunter <span dir="ltr"><<a href="mailto:zhjwpku@gmail.com" target="_blank">zhjwpku@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Dmitry,<br>
Thank you for you quick reply.<br>
<span class=""><br>
On Mon, Mar 21, 2016 at 7:38 PM, Dmitry Belyavsky <<a href="mailto:beldmit@gmail.com">beldmit@gmail.com</a>> wrote:<br>
> Hello John,<br>
><br>
> On Mon, Mar 21, 2016 at 1:53 PM, John Hunter <<a href="mailto:zhjwpku@gmail.com">zhjwpku@gmail.com</a>> wrote:<br>
>><br>
>> I know that this question had been asked millions of times, I searched the<br>
>> maillist archives and I know it, and this is not a homework for an<br>
>> academic<br>
>> project, trust me :)<br>
>><br>
>> In [1], Victor said that we don't need to rebuild OpenSSL just for adding<br>
>> a<br>
>> crypto algrorithm, and he recoment to see the ccgost engine, I did, but<br>
>> I think that if we add a symmetric cipher, we will declare a EVP_CIPHER<br>
>> struct, which contains a nid, let's say NID_id_Gost28147_89, this nid was<br>
>> defined in crypto/objects/obj_mac.h, but if I don't have a nid for my new<br>
>> added cipher, I think we should add one into openssl, in that occasion I<br>
>> think we should rebuild the OpenSSL.<br>
>><br>
>> I am appreciated if somebody could help to explain.<br>
>><br>
>> [1]<br>
>> <a href="http://openssl.6102.n7.nabble.com/add-a-new-cipher-to-OpenSSL-td22968.html" rel="noreferrer" target="_blank">http://openssl.6102.n7.nabble.com/add-a-new-cipher-to-OpenSSL-td22968.html</a><br>
><br>
><br>
> In theory, you are able to register OID/NID via engine.<br>
> In practice when we implemented the GOST algorithms we found that sometimes<br>
> it causes memory problems.<br>
> And anyway, if you provide cipher via an engine, it just allows to use it in<br>
> some commands but not for TLS.<br>
<br>
</span>So if I want to use the engine cipher, I should add some ciphersuit in<br>
ssl and rebuild<br>
the openssl, but I am wondering how will the ssl use the engine? Maybe add the<br>
engine to openssl.cnf?<br></blockquote><div> </div><div>Yes. And the application should also use the OPENSSL_config() function to ensure the loading of the engine.<br><br> And sometimes the applications have their own config file with the directives to load engines as accelerators. <br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
For now I just use the engine cipher(not a new added cipher, but replace the<br>
aes-128-ecb using the engine) in command with the -engine xxx parameter, I<br>
don't know how to use the engine cipher as default(I mean without the -engine).<br>
<br>
Thanks in advance !<br>
<span class="HOEnZb"><font color="#888888"><br>
><br>
> --<br>
> SY, Dmitry Belyavsky<br>
</font></span><div class="HOEnZb"><div class="h5">><br>
> --<br>
> openssl-dev mailing list<br>
> To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-dev" rel="noreferrer" target="_blank">https://mta.openssl.org/mailman/listinfo/openssl-dev</a><br>
><br>
--<br>
openssl-dev mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-dev" rel="noreferrer" target="_blank">https://mta.openssl.org/mailman/listinfo/openssl-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">SY, Dmitry Belyavsky</div>
</div></div>