Skip to content

Conversation

@wangweij
Copy link
Contributor

@wangweij wangweij commented May 31, 2023

Code changes for HSS/LMS that's related to keytool and jarsigner:

  1. No need to add -sigalg for both tools when HSS/LMS key is involved, it can only be HSS/LMS.
  2. The digestAlgorithm field in a PKCS7 SignerInfo. It must be the same as the hash algorithm used by the HSS/LMS key. This needs to be enforced both at signing and verification.
  3. HSS/LMS reuses .DSA as the signature block file extension inside a signed JAR file

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires CSR request JDK-8308730 to be approved

Issues

  • JDK-8302233: HSS/LMS: keytool and jarsigner changes (Enhancement - P3)
  • JDK-8308730: HSS/LMS: keytool and jarsigner changes (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14254/head:pull/14254
$ git checkout pull/14254

Update a local copy of the PR:
$ git checkout pull/14254
$ git pull https://git.openjdk.org/jdk.git pull/14254/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14254

View PR using the GUI difftool:
$ git pr show -t 14254

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14254.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 31, 2023

👋 Welcome back weijun! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label May 31, 2023
@openjdk
Copy link

openjdk bot commented May 31, 2023

@wangweij The following label will be automatically applied to this pull request:

  • security

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the security security-dev@openjdk.org label May 31, 2023
@bridgekeeper
Copy link

bridgekeeper bot commented Jul 27, 2023

@wangweij This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@wangweij
Copy link
Contributor Author

wangweij commented Sep 7, 2023

Still alive.

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 2, 2023

@wangweij This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@wangweij
Copy link
Contributor Author

wangweij commented Nov 2, 2023

please

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Nov 15, 2023
@wangweij wangweij marked this pull request as ready for review November 16, 2023 13:41
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 16, 2023
@mlbridge
Copy link

mlbridge bot commented Nov 16, 2023

Webrevs

Copy link
Member

@seanjmullan seanjmullan left a comment

Choose a reason for hiding this comment

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

Looks good - one minor comment. However, I still would like @ferakocz to review the KeyUtil.hashAlgFromHSS method.

@openjdk
Copy link

openjdk bot commented Nov 27, 2023

@wangweij This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8302233: HSS/LMS: keytool and jarsigner changes

Reviewed-by: mullan

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 117 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 27, 2023
}
break;
case "HSS/LMS":
// RFC 8708 requires the same hash algorithm used as in the HSS/LMS algorithm
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually it is RFC 8554 that requires it, RFC 8708 just references RFC 8554

Copy link
Contributor Author

@wangweij wangweij Nov 30, 2023

Choose a reason for hiding this comment

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

What I meant here is that, RFC 8708 requires that the hash algorithm used by the HSS/LMS signature (which should be a single one used in every corner of HSS/LMS, as required by RFC 8554) should be the same as the digestAlgorithm in the CMS SignerInfo object. See RFC 8708 Section 5:

digestAlgorithm MUST contain the one-way hash function used in the HSS/LMS tree.

https://www.rfc-editor.org/rfc/rfc8708.html#name-signed-data-conventions

@wangweij
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 30, 2023

Going to push as commit 0a60b0f.
Since your change was applied there have been 196 commits pushed to the master branch:

  • 7ad7005: 8315034: File.mkdirs() occasionally fails to create folders on Windows shared folder
  • 41daa3b: 8320239: add dynamic switch for JvmtiVTMSTransitionDisabler sync protocol
  • 7c135c3: 8321066: Multiple JFR tests have started failing
  • 8bedb28: 8321119: Disable java/foreign/TestHandshake.java on Zero VMs
  • b1cbf55: 8321018: Parallel: Make some methods in ParCompactionManager private
  • c6a8278: 8321127: ProblemList java/util/stream/GatherersTest.java
  • a3eb664: 8315701: [macos] Regression: KeyEvent has different keycode on different keyboard layouts
  • 6aba6aa: 8320347: Emulate vblendvp[sd] on ECore
  • 6938474: 8320916: jdk/jfr/event/gc/stacktrace/TestParallelMarkSweepAllocationPendingStackTrace.java failed with "OutOfMemoryError: GC overhead limit exceeded"
  • da09eab: 8319980: [JVMCI] libgraal should reuse Thread instances as C2 does
  • ... and 186 more: https://git.openjdk.org/jdk/compare/b05e69f789fa8c9a5320be5a841317abd3b3a235...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 30, 2023
@openjdk openjdk bot closed this Nov 30, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 30, 2023
@openjdk
Copy link

openjdk bot commented Nov 30, 2023

@wangweij Pushed as commit 0a60b0f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@wangweij wangweij deleted the 8302233 branch February 1, 2024 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated security security-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants