Skip to content

Comments

Remove import PCTs#28447

Closed
paulidale wants to merge 2 commits intoopenssl:masterfrom
paulidale:remove-import-pct
Closed

Remove import PCTs#28447
paulidale wants to merge 2 commits intoopenssl:masterfrom
paulidale:remove-import-pct

Conversation

@paulidale
Copy link
Contributor

These are no longer required by NIST as part of a FIPS 140-3 validation.
For discussion see #28326.

  • documentation is added or updated
  • tests are added or updated

@paulidale paulidale self-assigned this Sep 4, 2025
@paulidale paulidale added branch: master Applies to master branch approval: review pending This pull request needs review by a committer triaged: bug The issue/pr is/fixes a bug tests: present The PR has suitable tests present branch: 3.5 Applies to openssl-3.5 branch: 3.6 Applies to openssl-3.6 labels Sep 4, 2025
@paulidale
Copy link
Contributor Author

Backport failure is expected

@github-actions github-actions bot added the severity: fips change The pull request changes FIPS provider sources label Sep 4, 2025
Copy link
Member

@slontis slontis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Does this have consensus?
@t-j-h

@nhorman
Copy link
Contributor

nhorman commented Sep 5, 2025

I don't have any problem with the change, but I think we should wait until the new ig is published before we move forward. I see the updated comment announcement, but the ig doc seems to have been published the.n withdrawn on the nist site

@t-j-h
Copy link
Member

t-j-h commented Sep 5, 2025

Looks good. We just need to wait for the official publication of the IGs.

@nhorman
Copy link
Contributor

nhorman commented Sep 5, 2025

IG document seems to have been published:
https://csrc.nist.gov/csrc/media/Projects/cryptographic-module-validation-program/documents/fips%20140-3/FIPS%20140-3%20IG.pdf

Showing a publication date of September 2, 2025, so thats good.

However, the note in the announcements here:
https://csrc.nist.gov/Projects/cryptographic-module-validation-program/fips-140-3-ig-announcements

which states:

Modified Additional Comment 1 to clarify the PCT is not required by AS10.35 for imported keys.

Doesn't seem to be reflected in the actual IG document. Additional comment 1 in the I.G for 10.3.A states:

1. Though not a CAST, a pairwise consistency test (PCT) shall be conducted for every generated public
and private key pair for the applicable approved algorithm (per ISO/IEC 19790:2012 Section
7.10.3.3). At minimum, the PCT that is required by the underlying algorithm standard (e.g., SP 800-
56Arev3 Section 5.6.2.1.4 option ‘b’ or SP 800-56Brev2 Section 6.4.1.1 option ‘2.’) shall be
performed, which will satisfy the PCT requirement in either TE10.35.01 for key transport,
TE10.35.02 for signatures, or TE10.35.03 for key agreement. For approved algorithms from FIPS
186-5, SP 800-56Arev3 or SP 800-56Brev2, or FIPS 204, if at the time a PCT on a key pair is
performed it is known whether the keys will be used in a key agreement scheme, digital signature
algorithm or to perform a key transport, then the PCT shall be performed consistent with the intended
use of the keys (i.e., TE10.35.01 for key transport, TE10.35.02 1 for signatures, or TE10.35.03 for
key agreement), even if the underlying standard does not require a PCT.  If at the time when the PCT is performed the keys’ intended usage is not known, then any of the three PCTs described in
AS10.35 shall be performed on this key pair.

The last sentence seems to be exactly the opposite of what the announcement said was going to be in this publication.

So I'm not sure where that leaves us.

@paulidale
Copy link
Contributor Author

I don't think we've got a problem. The quoted paragraph talks about generated keys which an imported one is not, so the bit you are worried about doesn't apply.

The errant sentence that included imported keys is gone and is replaced by:

The PCT shall be performed either prior to the first exportation or prior to the first operational use for
module generated keys. PCT is not required by AS10.35 when importing a key or key pair from
outside of the module’s cryptographic boundary.

It looks like NIST swapped the test on import with test before export and we're safe on that front because we test on key generation and there is no other way we can get a key apart from import.

Copy link
Contributor

@nhorman nhorman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, based on @paulidale reference of the new language in the I.G., I'm ok with this, though, just to ask the question, what about the trivial case of import-then-export - i.e. if a user runs:

openssl pkey -in public_key.pem -pubin -outform DER -out public_key.der

In that case we import a key, and then immediately export it again (I think) without a PCT in between.

@nhorman nhorman added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Sep 5, 2025
@paulidale
Copy link
Contributor Author

paulidale commented Sep 5, 2025

When the key is imported, it has already been exported (and therefore tested) so there is no need to test it again.
At least that's my understanding.

@nhorman
Copy link
Contributor

nhorman commented Sep 5, 2025

ok, that makes sense.

Copy link
Member

@t-j-h t-j-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @paulidale for the rapid PR to address this.

@openssl-machine
Copy link
Collaborator

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually.

@nhorman nhorman added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Sep 6, 2025
openssl-machine pushed a commit that referenced this pull request Sep 6, 2025
This coveres DH, EC, RSA and SLH-DSA.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Shane Lontis <[email protected]>
(Merged from #28447)
openssl-machine pushed a commit that referenced this pull request Sep 6, 2025
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Shane Lontis <[email protected]>
(Merged from #28447)
openssl-machine pushed a commit that referenced this pull request Sep 6, 2025
This coveres DH, EC, RSA and SLH-DSA.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Shane Lontis <[email protected]>
(Merged from #28447)

(cherry picked from commit 7f7f758)
openssl-machine pushed a commit that referenced this pull request Sep 6, 2025
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Shane Lontis <[email protected]>
(Merged from #28447)

(cherry picked from commit c25db4f)
@nhorman
Copy link
Contributor

nhorman commented Sep 6, 2025

merged to master, 3.5 and 3.6, thank you!

@nhorman nhorman closed this Sep 6, 2025
openssl-machine pushed a commit that referenced this pull request Sep 6, 2025
This coveres DH, EC, RSA and SLH-DSA.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Shane Lontis <[email protected]>
(Merged from #28447)

(cherry picked from commit 7f7f758)
openssl-machine pushed a commit that referenced this pull request Sep 6, 2025
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tim Hudson <[email protected]>
Reviewed-by: Shane Lontis <[email protected]>
(Merged from #28447)

(cherry picked from commit c25db4f)
@paulidale paulidale deleted the remove-import-pct branch September 7, 2025 00:29
@vavroch2010 vavroch2010 moved this to Done in Development Board Sep 7, 2025
esyr added a commit to esyr/openssl that referenced this pull request Sep 11, 2025
CHANGES.md:
 * openssl#28398
 * openssl#28411
 * openssl#28447
 * openssl#28449

NEWS.md:
 * openssl#28447

Release: yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
esyr added a commit to esyr/openssl that referenced this pull request Sep 11, 2025
CHANGES.md:
 * openssl#28398
 * openssl#28411
 * openssl#28447
 * openssl#28449

NEWS.md:
 * openssl#28447

Release: yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
esyr added a commit to esyr/openssl that referenced this pull request Sep 11, 2025
CHANGES.md:
 * openssl#28398
 * openssl#28411
 * openssl#28447
 * openssl#28449

NEWS.md:
 * openssl#28447

Release: yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
openssl-machine pushed a commit that referenced this pull request Sep 13, 2025
CHANGES.md:
 * #28398
 * #28411
 * #28447
 * #28449

NEWS.md:
 * #28447

Release: yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
(Merged from #28521)
esyr added a commit to esyr/openssl that referenced this pull request Sep 15, 2025
CHANGES.md:
 * openssl#28398
 * openssl#28411
 * openssl#28447
 * openssl#28449

NEWS.md:
 * openssl#28447

Release: yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
esyr added a commit to esyr/openssl that referenced this pull request Sep 15, 2025
CHANGES.md:
 * openssl#28198
 * openssl#28398
 * openssl#28411
 * openssl#28447
 * openssl#28449

NEWS.md:
 * openssl#28447

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
esyr added a commit to esyr/openssl that referenced this pull request Sep 16, 2025
CHANGES.md:
 * openssl#28198
 * openssl#28398
 * openssl#28411
 * openssl#28447
 * openssl#28449

NEWS.md:
 * openssl#28447

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
openssl-machine pushed a commit that referenced this pull request Sep 16, 2025
CHANGES.md:
 * #28198
 * #28398
 * #28411
 * #28447
 * #28449

NEWS.md:
 * #28447

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #28558)
openssl-machine pushed a commit that referenced this pull request Sep 16, 2025
CHANGES.md:
 * #28398
 * #28411
 * #28447
 * #28449

NEWS.md:
 * #28447

Release: yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #28547)
esyr added a commit to esyr/openssl that referenced this pull request Sep 17, 2025
This news-worthy change has been removed in [1].

[1] openssl#28447

Signed-off-by: Eugene Syromiatnikov <[email protected]>
openssl-machine pushed a commit that referenced this pull request Sep 23, 2025
This news-worthy change has been removed in [1].

[1] #28447

Signed-off-by: Eugene Syromiatnikov <[email protected]>

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #28586)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch branch: 3.5 Applies to openssl-3.5 branch: 3.6 Applies to openssl-3.6 severity: fips change The pull request changes FIPS provider sources tests: present The PR has suitable tests present triaged: bug The issue/pr is/fixes a bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants