<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear Richard, </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 23, 2019 at 8:47 AM Richard Levitte <<a href="mailto:levitte@openssl.org">levitte@openssl.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 21 Feb 2019 17:20:53 +0100,<br>Matt Caswell wrote:<br>> On 21/02/2019 15:02, Dmitry Belyavsky wrote:<br>> > Dear Matt<br>> > <br>> > <br>> > <br>> > On Wed, Feb 13, 2019 at 9:30 PM Matt Caswell <<a href="mailto:matt@openssl.org" target="_blank">matt@openssl.org</a><br>> > <mailto:<a href="mailto:matt@openssl.org" target="_blank">matt@openssl.org</a>>> wrote:<br>> > <br>> >     Please see my blog post for an OpenSSL 3.0 and FIPS Update:<br>> > <br>> >     <a href="https://www.openssl.org/blog/blog/2019/02/13/FIPS-update/" rel="noreferrer" target="_blank">https://www.openssl.org/blog/blog/2019/02/13/FIPS-update/</a><br>> > <br>> > <br>> > After reading the proposed architecture description, I have some questions that<br>> > are very important for the developers of non-US certified openssl-based products.<br>> <br>> Hi Dmitry,<br>> <br>> Answers inserted.<br>> <br>> > <br>> > 1. Will it still be available to implement custom RAND_methods via the new<br>> > providers API?<br>> <br>> Yes, I expect this to be possible.<br>
<br>This is something I'd like to see explored further.  OpenSSL 3.0 will<br>target the EVP API primarly, and while we do talk about entropy with<br>regards to FIPS, I haven't quite grasped if that would be a provider<br>internal thing or if entropy is supposed to come from "elsewhere".<br>
<br>Since our RAND API is separate from the EVP API, I'm unsure how we<br>plan on getting custom RAND_methods from providers.<br>
<br>Please note that we can add RAND to the list of provider backed APIs,<br>and given a foundation that we're currently building, it may even be<br>quite easy.  However, no one has said explicitly that we would do so.<br>
<br>The other option is, of course, to move the RAND API to EVP somehow,<br>but that will probably be more challenging.<br></blockquote><div><br></div><div>I do not think it is really necessary to move RAND to EVP.</div><div>Current architecture suits our requirements, but if the possibility to overwrite</div><div>the RAND_METHOD is removed, it will cause problems for us.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> > 2. Can we do something with a bunch of hard-linked non-extendable lists of<br>> > internal NIDs? <br>> > For example, providing GOST algorithms always requires a patch to extend 3-5<br>> > internal lists.<br>> > If it could be done dynamically, it will be great.<br>> <br>> That's not currently something we've considered, but I agree it<br>> would be great to fix that. Perhaps you could create a github issue<br>> identifying the specific areas we should be looking at and then we<br>> can take a look at the feasibility of fixing it.<br>
<br>Let me address this in a different way...<br>
<br>Are you very attached to those NIDs and them actually being NIDs?  Or<br>would you be just as happy to have the implementations identified by<br>name?  You see, providers will offer algorithm implementation by<br>algorithm name (oh, and properties), not by number.<br></blockquote><div><br></div><div>The command </div><div><div>grep -ril gost . | grep -v objects</div><div>in the crypto/ folder enlists the following files: </div><div><br></div><div>./cms/cms_sd.c</div><div>./asn1/asn_mime.c<br></div><div>./x509/x509type.c</div><div>./pkcs12/p12_mutl.c</div><div>./evp/evp_pbe.c</div><div>./pkcs7/pk7_smime.c</div></div><div><br></div><div>Namely the functions CMS_add_standard_smimecap, PKCS7_sign_add_signer, </div><div>asn1_write_micalg, X509_certificate_type and array builtin_pbe[] refer to gost-related NIDs.</div><div><br></div><div>The pkcs12_gen_mac function has a gost-specific processing. </div><div>It was much more simple to add gost-specific processing here than to add</div><div>a callback everywhere, though it breaks encapsulation I dream about.</div><div><br></div><div>Also, we have some patches adding Russian-specific X.509 extensions, </div><div>and I think for now it's better to register the necessary NIDs and provide</div><div>pull requests to add their processing.</div><div><br></div><div>The situation in libssl is much more difficult, because of more monolithic</div><div>architecture there. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>> > 3. Do you have plans to make some callback structures created by providers? <br>> > I mean such structures as SSL key exchange/authentication methods, X.509<br>> > extensions etc.<br>> <br>> There aren't any plans to do that at the moment. There's nothing in the provider<br>> design that would prevent us from doing so at some point in the future.<br></blockquote><div> </div></div>-- <br><div dir="ltr" class="gmail_signature">SY, Dmitry Belyavsky</div></div></div></div></div></div></div></div></div>