Hide Forgot
This bug is created as a clone of upstream ticket: https://pagure.io/dogtagpki/issue/2664 This bug should address upgrade of the crypto and hashing mechanisms implementing PKCS12. It will involve JSS, and/or CS server, and/or client(s) when the system is in FIPS mode.
Hi Christina, Ade has reviewed my PKCS #12 AES patches for CC effort (thanks Ade!) We have one main area where we need your feedback (https://pagure.io/dogtagpki/issue/2610). The KRA PKCS #12 recovery process for encrypted (cf. wrapped) keys previously performed the encryption and assembled the EncryptedPrivateKeyInfo structure in a rather "manual" way (~80 LOC). In my patch to convert this code path to use AES encrypted, I take an alternative (and much fewer LOC) approach: importing the private key to the internal key storage token, as a temporary key, and then invoking the same routine as is used for the wrapped key case. Our question: is this fine to do when the system is in FIPS mode? The assumption is that the internal crypto token is always available and that it can do raw (unencrypted) private key import, and wrapping private keys to a symmetric key, while in FIPS mode. We just need to check this assumption. The gerrit review of the patch involved is here: https://review.gerrithub.io/#/c/359027/ Thanks, Fraser
Fraser, I think in terms of security, that looks fine. However, I do not know if in FIPS mode there would be an issue or not. That's something you can try. You could just turn on fips mode for the nss token without having to set the whole system in fips mode. The code looks fine otherwise.
(In reply to Christina Fu from comment #3) > Fraser, I think in terms of security, that looks fine. However, I do not > know if in FIPS mode there would be an issue or not. That's something you > can try. You could just turn on fips mode for the nss token without having > to set the whole system in fips mode. > The code looks fine otherwise. you can do it like this: modutil -fips true -dbdir location-of-your-nss-database then restart the server.
OK, so the current patch DOES NOT work in FIPS mode :( Hopefully it is something simple and will not require major rework.
Reworked patch pushed to Gerrit for review: https://review.gerrithub.io/#/c/359027/ See also patches for NSS on which the updated Dogtag patch depends: https://bugzilla.mozilla.org/show_bug.cgi?id=1370778
Upstream JSS Check-ins: cfu checked-in the following changes provided by ftweedal: changeset: 2204:87dca07f7529 tag: tip user: Fraser Tweedale<ftweedale> date: Fri Sep 08 11:56:04 2017 -0700 summary: Bug 1370778 PBE and padded block cipher enhancements and fixes - changeset: 2203:b3b653faef84 user: Fraser Tweedale<ftweedale> date: Fri Sep 08 11:53:36 2017 -0700 summary: bug 1370778 PBE and padded block cipher enhancements and fixes - changeset: 2202:0b8a6e84b6c7 user: Fraser Tweedale<ftweedale> date: Fri Sep 08 11:50:21 2017 -0700 summary: Bug 1370778 PBE and padded block cipher enhancements and fixes - changeset: 2201:d39e9b373798 user: Fraser Tweedale<ftweedale> date: Fri Sep 08 11:32:32 2017 -0700 summary: Bug 1370778 PBE and padded block cipher enhancements and fixes - changeset: 2200:890216599f21 user: Fraser Tweedale<ftweedale> date: Fri Sep 08 11:21:22 2017 -0700 summary: Bug 1370778 PBE and padded block cipher enhancements and fixes - changeset: 2199:bada1409d2bb user: Fraser Tweedale<ftweedale> date: Fri Sep 08 11:15:29 2017 -0700 summary: Bug 1370778 PBE and padded block cipher enhancements and fixes - changeset: 2198:3629b598a9ce user: Fraser Tweedale<ftweedale> date: Fri Sep 08 11:09:23 2017 -0700 summary: Bug 1370778 PBE and padded block cipher enhancements and fixes - Upstream pki check-in: commit ae97f21bf8d2ec83a410127872dd196a46f9dbbd Author: Fraser Tweedale <ftweedal> Date: Thu Apr 6 13:27:56 2017 +1000 KRA: use AES in PKCS #12 recovery for encrypted keys
[root@nocp1 pki-kra-Dec6]# rpm -qi pki-ca Name : pki-ca Version : 10.5.1 Release : 4.el7 Architecture: noarch Install Date: Thu 30 Nov 2017 10:10:20 AM EST Group : System Environment/Daemons Size : 2360514 License : GPLv2 Signature : RSA/SHA256, Tue 28 Nov 2017 10:33:09 PM EST, Key ID 199e2f91fd431d51 Source RPM : pki-core-10.5.1-4.el7.src.rpm Build Date : Tue 28 Nov 2017 09:17:20 PM EST Build Host : ppc-035.build.eng.bos.redhat.com Relocations : (not relocatable) Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> Vendor : Red Hat, Inc. URL : http://pki.fedoraproject.org/ Summary : Certificate System - Certificate Authority Verification steps as explained in https://bugzilla.redhat.com/show_bug.cgi?id=1490487#c5
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0925