<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 6, 2020, 11:59 PM Jason Proctor <<a href="mailto:jason@spatiallabs.com">jason@spatiallabs.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Apr 6, 2020 at 9:44 PM William Roberts <<a href="mailto:bill.c.roberts@gmail.com" target="_blank" rel="noreferrer">bill.c.roberts@gmail.com</a>> wrote:<br>
><br>
><br>
> There's setter functions now. See:<br>
> <a href="https://www.openssl.org/docs/man1.1.0/man3/RSA_set0_key.html" rel="noreferrer noreferrer" target="_blank">https://www.openssl.org/docs/man1.1.0/man3/RSA_set0_key.html</a><br>
<br>
Thanks, yes it does look like that replaces direct access to "n" and<br>
"e". It's a hack, but it might work for the moment.<br>
<br>
Ideally though I wouldn't be reliant on offsets into the binary SPKI<br>
structure :-)<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I don't think I would consider it a hack necessarily. I work on the TPM stack and have to convert TPM structures to RSA public key structures for ooenssl to utilize, and we use this routine along the way. I would imagine theirs a higher level public from private routine you can call. I would dissect what:</div><div dir="auto"><pre style="margin-top:0px;margin-bottom:0.8em;padding:10px;border:0px;line-height:inherit;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace;font-size:13px;vertical-align:baseline;background-color:rgb(240,240,240);max-height:300px;color:rgb(12,13,14)"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace;vertical-align:baseline;max-height:300px">openssl rsa -in mykey.pem -pubout > mykey.pub</code></pre></div><div dir="auto">Is doing</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
any help with SPKI welcome!<br>
J<br>
</blockquote></div></div></div>