Re: mutual authentication fails when FIPS enabled

Petr Pisar <[email protected]> Wed, 27 Jan 2021 08:54:15 +0100
Newsgroups gmane.comp.encryption.opensc.devel
Message-ID <[email protected]>
V Tue, Jan 26, 2021 at 11:25:13PM -0500, George napsal(a):
>   When I attempt to do mutual authentication with a smart card, it 
> fails. The problem appears to be related to enabling FIPS. I am using 
> OpenSSL 1.0.2u(with FIPS) and LIBP11 0.4.11.
> The found the following Red Hat bug report, which describes the exact 
> same problem I am seeing:
> https://bugzilla.redhat.com/show_bug.cgi?id=1827535
> 
> Is this a known LIBP11 bug? Will it be fixed in future versions of LIBP11?
> 
> A suggested workaround in the above link is to make a change in the file 
> libp11-libp11-0.4.11\src\p11_rsa.c:
> Change the line
> 
>     RSA_meth_set_flags(ops, 0);
> 
> to
> 
>     RSA_meth_set_flags(ops, RSA_FLAG_FIPS_METHOD);
> 
> 
> Once I did this, it fixed my problem. Is this a proper fix?
> 
The flag disables exclusion of FIPS noncompliant algorithms (e.g. MD5) from
the OpenSSL routines and leaves the compliance to the application.

In other words your system is not FIPS compliant anymore unless you get FIPS
certification for your patched libp11.

The questions are:

Do you really need FIPS compliance? If not, then do not enable FIPS mode.

Does the mutual authentication protocol manadate use of noncompliant
algorithms? If yes, then it's broken by desisign and you simply cannot use the
authentication in FIPS mode. Otherwise libp11 and your smart card should use
a different, compliant algorithm instead.

Is smart card mutual authentication subject of FIPS compliance? Technically
you can use non-compliant algorithms for non-cryprographical purposes even in
FIPS mode. E.g. MD5 for hash tables or data identification. But in my opinion
authentication falls into a FIPS realm, so this not the case. You should talk
to your security auditor about this.

-- Petr

_______________________________________________
Opensc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE4/QvzhVoMKgDWObpT9GuwzZa978FAmARHBcACgkQT9GuwzZa
979azxAAuV1UJdiCTi4QQeH86xw1zaX1bYnGBPZoI6FvNrmnhIBImZN+yS0/yorb
cH/40KgfjeK8nYQsbDY+Nl+Ztjp7kPm2C7dlFjJLdZYtgZVy+qU8iRvUfoIOOLNL
euErvbD8EpndbypQNxR59cLg8y0e1As8m42SRMVoesszaCfWu289ZROLBDaCJyoj
OT4+fIJwyi7E69BNbJI2kd5xd+w3HUq+axowSNXVGggfH//ZF+h+uLh3osxQJg8g
+wT6FDJdBwZyHKEbQesUBt/n6IlRBaykhukQqRXncNMmfxY6gY56+iyjkL6gDFqK
J5xV7VMcPv/Se2V/NpL6uBUryJDZuM+0cnW9LoE5+i9IpSWNykTLCExLSeSw+uz3
ezWz+n+EaEBPLBYUqWkdgG0W+bKErfmeoELZNHC+pWxFuXjq63vXQKs7ccPfPQYg
LY/L4AuNCOymH25qmvkCmKYjSgozztzCSH4A6EEJ5W1pSJF7OsK2+UaBXuouJxAy
+QJ90+zY5LCG1HiA02TVf19dr9+IGL66+hBZv11b+HzQ+n0ixsnQ3UTCeclMG4sD
aIx0iMvRSxoq69rOYmOeIiOQET2CHpbWjthnM1I6tDj5aguhljF03A6KiaDs8YZg
XudNoxrF5eb+vM6yCeAyAmMGiPGLNlzgvCPUZlLsjEwcIXlXxUg=
=vNjx
-----END PGP SIGNATURE-----