<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;">
<p>I just realized that my reply to Richard and Douglas didn't go through....I had the emails bundled to a digest, so not sure how to properly reply to an individual thread. 
<span style="font-size:12pt">My prior email should have said "Thanks, I"ll give it a try and let you know how it goes". <span>Disabled the digest now, though.</span></span></p>
<p><br>
</p>
<p>@Richard, I've looked at the source like you suggested. One more question......quoting your reply below:</p>
<p></p>
<pre>> That flag means that the standard public/private encrypt/decrypt won't<br>> try to access the p, q, dmp1 and iqmp components of the RSA structure, <br>> i.e. the components that make up the private part.  Instead, that's
> left entirely to the mod_exp function (i.e. what you actually do implement).
</pre>
<span>This makes sense to me, and it seems that is the desired behavior. However, if I *only* reimplement the rsa_mod_exp() function, and leave the encrypt/decrypt functions to the default openSSL implementations, how can my engine know which of the four of
 those functions called its rsa_mod_exp function()? To put it another way: my accelerator will need to know whether it is meant to perform public key or private key operations, since the inputs will be written to different memory addresses.
<span>From within rsa_mod_exp(), t</span>he only way I can think of determining whether the function has been called by private_encrypt/decrypt() or public_encrypt/decrypt would be to check if the  p and q fields of the RSA *rsa struct passed into the function
 are NULL? But I can't tell from the source code if this will be guaranteed just by having  RSA_FLAG_EXT_PKEY</span> set in the "flags" field of my engine's RSA_METHOD.
<p></p>
<p><br>
</p>
<p>Thanks for the help so far!</p>
<p><br>
</p>
<p>Brett<br>
</p>
</div>
</div>
</div>
</body>
</html>