Skip to content

Conversation

@ansasaki
Copy link
Contributor

@ansasaki ansasaki commented Sep 19, 2025

This allows other algorithms to be used for mTLS.

The payload encryption mechanism requires an RSA key pair, so always generate an RSA key for the payload mechanism.

Fixes #1126

@ansasaki ansasaki marked this pull request as draft September 19, 2025 15:50
@codecov
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 47.82609% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.11%. Comparing base (ef83ed2) to head (ce3d874).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
keylime-agent/src/main.rs 0.00% 12 Missing ⚠️
Additional details and impacted files
Flag Coverage Δ
e2e-testsuite 58.11% <47.82%> (+0.01%) ⬆️
upstream-unit-tests 58.11% <47.82%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
keylime-agent/src/keys_handler.rs 70.14% <100.00%> (+0.59%) ⬆️
keylime-agent/src/quotes_handler.rs 62.06% <100.00%> (ø)
keylime/src/cert.rs 64.81% <100.00%> (ø)
keylime-agent/src/main.rs 15.44% <0.00%> (-0.17%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ansasaki ansasaki marked this pull request as ready for review September 22, 2025 08:54
ansasaki added a commit to ansasaki/keylime-tests that referenced this pull request Sep 22, 2025
Previously, the agent supported only RSA key/certificate as the mTLS
key because it was also used to encrypt data in the secure payload
mechanism.

With keylime/rust-keylime#1129, the agent is now
able to use different algorithms for mTLS.

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
ansasaki added a commit to ansasaki/keylime-tests that referenced this pull request Sep 22, 2025
Previously, the agent supported only RSA key/certificate as the mTLS
key because it was also used to encrypt data in the secure payload
mechanism.

With keylime/rust-keylime#1129, the agent is now
able to use different algorithms for mTLS.

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
Copy link
Contributor

@sarroutbi sarroutbi left a comment

Choose a reason for hiding this comment

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

Changes LGTM. Just a pair of naming and comments improvements

This allows algorithms other than RSA to be used for mTLS.

The payload encryption mechanism requires an RSA key pair, so always
generate an RSA key for the payload mechanism.

This renames the 'nk_pub' and 'nk_priv' respectively as 'mtls_pub' and
'mtls_priv' when they are used for mTLS.

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
@ansasaki
Copy link
Contributor Author

I proposed an update to the test suite via RedHat-SP-Security/keylime-tests#900

Copy link
Contributor

@sarroutbi sarroutbi left a comment

Choose a reason for hiding this comment

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

Thanks for the changes regarding naming. Rest of changes LGTM

@ansasaki ansasaki merged commit 2091359 into keylime:master Sep 24, 2025
13 of 15 checks passed
@ansasaki ansasaki deleted the ecc-mtls branch September 24, 2025 12:56
ansasaki added a commit to ansasaki/keylime-tests that referenced this pull request Sep 25, 2025
Previously, the agent supported only RSA key/certificate as the mTLS
key because it was also used to encrypt data in the secure payload
mechanism.

With keylime/rust-keylime#1129, the agent is now
able to use different algorithms for mTLS.

When testing PQC algorithms, set ECDSA keys for the agent due to
https://issues.redhat.com/browse/RHEL-117439. Once this is fixed, the
special treatment for the agent mTLS should be removed.

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
ansasaki added a commit to ansasaki/keylime-tests that referenced this pull request Sep 25, 2025
Previously, the agent supported only RSA key/certificate as the mTLS
key because it was also used to encrypt data in the secure payload
mechanism.

With keylime/rust-keylime#1129, the agent is now
able to use different algorithms for mTLS.

When testing PQC algorithms, set ECDSA keys for the agent due to
https://issues.redhat.com/browse/RHEL-117439. Once this is fixed, the
special treatment for the agent mTLS should be removed.

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
ansasaki added a commit to ansasaki/keylime-tests that referenced this pull request Sep 25, 2025
Previously, the agent supported only RSA key/certificate as the mTLS
key because it was also used to encrypt data in the secure payload
mechanism.

With keylime/rust-keylime#1129, the agent is now
able to use different algorithms for mTLS.

When testing PQC algorithms, set ECDSA keys for the agent due to
https://issues.redhat.com/browse/RHEL-117439. Once this is fixed, the
special treatment for the agent mTLS should be removed.

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
kkaarreell pushed a commit to RedHat-SP-Security/keylime-tests that referenced this pull request Oct 3, 2025
Previously, the agent supported only RSA key/certificate as the mTLS
key because it was also used to encrypt data in the secure payload
mechanism.

With keylime/rust-keylime#1129, the agent is now
able to use different algorithms for mTLS.

When testing PQC algorithms, set ECDSA keys for the agent due to
https://issues.redhat.com/browse/RHEL-117439. Once this is fixed, the
special treatment for the agent mTLS should be removed.

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keylime tenant fails to retrieve quote from agent when Agent is using ECDSA keys for mTLS (NotImplemented for key type Id(408))

4 participants