<div dir="ltr">Thanks Murugesh. I just wanted to add that the FOM (OpenSSL FIPS object module) is built using the instructions provided by the User Guide:<div><br></div><div>./config</div><div>make</div><div>make install</div><div><br></div><div>The built fipscanister.o is integrated into the OpenSSL distribution via our own build infrastructure by mimicking the OpenSSL makefiles (including invoking fipsld to embed the signature into the library).</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 7, 2020 at 8:39 PM murugesh pitchaiah <<a href="mailto:murugesh.pitchaiah@gmail.com">murugesh.pitchaiah@gmail.com</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">Hi,<br>
<br>
Yes. You have to use openssl provided build files.<br>
<br>
Thanks,<br>
Murugesh P.<br>
<br>
On 7/7/20, Shirisha Dasari via openssl-users <<a href="mailto:openssl-users@openssl.org" target="_blank">openssl-users@openssl.org</a>> wrote:<br>
> Hi All,<br>
><br>
> We have been trying to integrate FOM 2.0.13 with OpenSSL 1.0.2u for FIPS<br>
> compliance. Post integration, we have been able to run in FIPS mode, with<br>
> all self-tests passing as well. However, we seem to be encountering issues<br>
> in creation and parsing of ECDSA keys.<br>
><br>
> A little background on how we build the shared libcrypto library:<br>
><br>
> TARGET: x86_64<br>
> BUILD HOST: x86_64<br>
><br>
> We do not use the OpenSSL Makefile to build the OpenSSL source. Our build<br>
> infrastructure  creates multiple static archives from the OpenSSL crypto<br>
> source and finally creates a libcrypto.a from these archives as required by<br>
> fipsld. The fipscanister.o and libcrypto.a are archived to create the final<br>
> libcrypto.a and passed onto fipsld for creation of a dynamic library,<br>
> libcrypto.so. fips_premain_dso gets built as a part of the build process<br>
> too for generation of signature. These steps mimic the OpenSSL opensource<br>
> Makefile.<br>
><br>
> fipsld embeds the signature into the final libcrypto.so successfully and we<br>
> are able to get into FIPS mode successfully at run time. Self-tests pass as<br>
> well.<br>
><br>
> Issue:<br>
><br>
> While trying to use ECDSA host keys for OpenSSH, we noticed that parsing of<br>
> ECDSA key fails. DSA and RSA key creation and parsing do not have this<br>
> issue. Note that the ECDSA key was generated in FIPS mode and is being<br>
> parsed in FIPS mode itself.<br>
><br>
> root@localhost:/home/admin#  openssl ec -in ssh_host_key_ecdsa -text -noout<br>
> read EC key<br>
> unable to load Key<br>
> 140020611143360:error:10067066:elliptic curve<br>
> routines:ec_GFp_simple_oct2point:invalid<br>
> encoding:../../../../vendor/openssl-fips/crypto/ec/ecp_oct.c:370:<br>
> 140020611143360:error:10092010:elliptic curve routines:d2i_ECPrivateKey:EC<br>
> lib:../../../../vendor/openssl-fips/crypto/ec/ec_asn1.c:1172:<br>
> 140020611143360:error:100D508E:elliptic curve<br>
> routines:ECKEY_PRIV_DECODE:decode<br>
> error:../../../../vendor/openssl-fips/crypto/ec/ec_ameth.c:256:<br>
> 140020611143360:error:0606F091:digital envelope<br>
> routines:EVP_PKCS82PKEY:private key decode<br>
> error:../../../../vendor/openssl-fips/crypto/evp/evp_pkey.c:92:<br>
> 140020611143360:error:0907B00D:PEM routines:PEM_READ_BIO_PRIVATEKEY:ASN1<br>
> lib:../../../../vendor/openssl-fips/crypto/pem/pem_pkey.c:142:<br>
> root@localhost:/home/admin#<br>
><br>
> A portion of the sample ECDSA key generated with curve secp384r1 via<br>
> ssh-keygen with "ssh-keygen -t ecdsa -b 384 -f  ssh_host_key_ecdsa" is<br>
> provided below:<br>
><br>
> -----BEGIN PRIVATE KEY-----<br>
> MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDD<br>
> ........<br>
> ........<br>
> -----END PRIVATE KEY-----<br>
><br>
>  A few questions related to this:<br>
><br>
> 1) Is there a specific need to build the OpenSSL source only via the<br>
> provided Makefile?<br>
> 2) FIPS self test for ECDSA passes but the key creation/parsing fails.<br>
> Could this indicate that the FIPS module APIs are not getting invoked in<br>
> the case of ECDSA?<br>
><br>
> --<br>
> Thanks & Regards,<br>
> Shirisha.<br>
><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Thanks & Regards,<div>Shirisha.</div></div></div>