Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fips: zeroization of public security parameters (PSPs) #24355

Closed
wants to merge 2 commits into from

Conversation

xnox
Copy link
Contributor

@xnox xnox commented May 9, 2024

ISO 19790:2012/Cor.1:2015 7.9 requires cryptographic module to provide methods to zeroise all unproctected security sensitive parameters (which inclues both Critical/Private and Public security parameters). And those that are temprorarly stored are required to be zeroised after they are no longer needed at security levels 2 and higher.

Comply with the above requirements by always zeroising public security parameters whenever they are freed.

This is currently done under the FIPS feature, however the requirement comes from the ISO 19790:2012 which may also be needed in other jurisdictions. If not always. Note FIPS 140-3 includes ISO 19790:2012 by reference.

ISO 19790:2012/Cor.1:2015 7.9 requires cryptographic module to provide
methods to zeroise all unproctected security sensitive parameters
(which inclues both Critical/Private **and** Public security
parameters). And those that are temprorarly stored are required to be
zeroised after they are no longer needed at security levels 2 and
higher.

Comply with the above requirements by always zeroising public security
parameters whenever they are freed.

This is currently done under the FIPS feature, however the requirement
comes from the ISO 19790:2012 which may also be needed in other
jurisdictions. If not always. Note FIPS 140-3 includes ISO 19790:2012
by reference.
@github-actions github-actions bot added the severity: fips change The pull request changes FIPS provider sources label May 9, 2024
Copy link
Contributor

@paulidale paulidale left a comment

Choose a reason for hiding this comment

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

I'd find it more readable if the preprocessor conditionals were all #if FIPS_MODULE rather than #ifndef FIPS_MODULE but it's not a significant point.

providers/implementations/kdfs/pkcs12kdf.c Outdated Show resolved Hide resolved
@t8m t8m added branch: master Merge to master branch approval: review pending This pull request needs review by a committer approval: otc review pending This pull request needs review by an OTC member triaged: feature The issue/pr requests/adds a feature tests: exempted The PR is exempt from requirements for testing labels May 10, 2024
@xnox
Copy link
Contributor Author

xnox commented May 10, 2024

I'd find it more readable if the preprocessor conditionals were all #if FIPS_MODULE rather than #ifndef FIPS_MODULE but it's not a significant point.

$ git grep FIPS_MODULE | grep ifndef | wc -l
406
$ git grep FIPS_MODULE | grep ifdef | wc -l
80
$ git grep FIPS_MODULE | grep 'if def' | wc -l
14

I followed the most common style, such that first is shown what default provider does; and then show what FIPS one does differently.
However, I personally too, prefer to have "positive" tests first.

@xnox xnox requested a review from paulidale May 10, 2024 10:03
@t8m t8m removed the approval: otc review pending This pull request needs review by an OTC member label May 10, 2024
@paulidale paulidale 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 May 10, 2024
@openssl-machine openssl-machine 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 May 11, 2024
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

@t8m
Copy link
Member

t8m commented May 13, 2024

Merged to the master branch. Thank you for your contribution.

@t8m t8m closed this May 13, 2024
openssl-machine pushed a commit that referenced this pull request May 13, 2024
ISO 19790:2012/Cor.1:2015 7.9 requires cryptographic module to provide
methods to zeroise all unproctected security sensitive parameters
(which inclues both Critical/Private **and** Public security
parameters). And those that are temprorarly stored are required to be
zeroised after they are no longer needed at security levels 2 and
higher.

Comply with the above requirements by always zeroising public security
parameters whenever they are freed.

This is currently done under the FIPS feature, however the requirement
comes from the ISO 19790:2012 which may also be needed in other
jurisdictions. If not always. Note FIPS 140-3 includes ISO 19790:2012
by reference.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #24355)
xnox added a commit to xnox/openssl that referenced this pull request May 13, 2024
ISO 19790:2012/Cor.1:2015 7.9 requires cryptographic module to provide
methods to zeroise all unproctected security sensitive parameters
(which inclues both Critical/Private **and** Public security
parameters). And those that are temprorarly stored are required to be
zeroised after they are no longer needed at security levels 2 and
higher.

Comply with the above requirements by always zeroising public security
parameters whenever they are freed.

This is currently done under the FIPS feature, however the requirement
comes from the ISO 19790:2012 which may also be needed in other
jurisdictions. If not always. Note FIPS 140-3 includes ISO 19790:2012
by reference.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24355)

(cherry picked from commit fa338aa)
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 Merge to master branch severity: fips change The pull request changes FIPS provider sources tests: exempted The PR is exempt from requirements for testing triaged: feature The issue/pr requests/adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants