Skip to content

chore: use rcgen and rustls-webpki k256-enabled forks from Zama org#437

Open
mkmks wants to merge 1 commit intomainfrom
chore/upstream-rcgen-k256
Open

chore: use rcgen and rustls-webpki k256-enabled forks from Zama org#437
mkmks wants to merge 1 commit intomainfrom
chore/upstream-rcgen-k256

Conversation

@mkmks
Copy link
Contributor

@mkmks mkmks commented Feb 24, 2026

Description of changes

KMS nodes sign the CA certificates (that are used to issue ephemeral mTLS certificates) with their ECDSA+secp256k1 signing keys. rustls doesn't support the secp256k1 curve out of the box (although the underlying aws_lc_rs library does), and we had to fork the rcgen and rustls-webpki to enable it.

Initially, the forks were hosted under my (@mkmks) Github account because the whole idea was experimental and not certain to go to production. Now, that mTLS with core signing key-derived identities is in production, and fork upstreaming run into obstacles, a better practice would be to host the forks under the Zama Github organisation.

This PR does exactly that.

NB: The rustls-webpki version is stabilized at 0.103.7 in the fork because its 0.104 release has breaking architectural changes. These changes aren't final, so it wouldn't make a lot of sense to attempt to rebase our secp256k1-related changes on top of them.
NB2: The rcgen version is bumped to 0.14.7, and there were some API changes in the 0.14 branch (surprisingly) that required some minor changes on the KMS side.

Issue ticket number and link

Closes #240

PR Checklist

I attest that all checked items are satisfied. Any deviation is clearly justified above.

  • Title follows conventional commits (e.g. chore: ...).
  • Tests added for every new pub item and test coverage has not decreased.
  • Public APIs and non-obvious logic documented; unfinished work marked as TODO(#issue).
  • unwrap/expect/panic only in tests or for invariant bugs (documented if present).
  • No dependency version changes OR (if changed) only minimal required fixes.
  • No architectural protocol changes OR linked spec PR/issue provided.
  • No breaking deployment config changes OR devops label + infra notified + infra-team reviewer assigned.
  • No breaking gRPC / serialized data changes OR commit marked with ! and affected teams notified.
  • No modifications to existing versionized structs OR backward compatibility tests updated.
  • No critical business logic / crypto changes OR ≥2 reviewers assigned.
  • No new sensitive data fields added OR Zeroize + ZeroizeOnDrop implemented.
  • No new public storage data OR data is verifiable (signature / digest).
  • No unsafe; if unavoidable: minimal, justified, documented, and test/fuzz covered.
  • Strongly typed boundaries: typed inputs validated at the edge; no untyped values or errors cross modules.
  • Self-review completed.

@mkmks mkmks requested a review from a team as a code owner February 24, 2026 15:11
@cla-bot cla-bot bot added the cla-signed The CLA has been signed. label Feb 24, 2026
@mkmks mkmks force-pushed the chore/upstream-rcgen-k256 branch 4 times, most recently from 35abfd4 to 0512a98 Compare February 24, 2026 21:33
@mkmks mkmks force-pushed the chore/upstream-rcgen-k256 branch from 0512a98 to ce37e4e Compare February 25, 2026 08:36
@github-actions
Copy link

Consolidated Tests Results 2026-02-25 - 09:44:04

Test Results

passed 9 passed

Details

tests 9 tests
clock not captured
tool junit-to-ctrf
build build-and-test arrow-right test-reporter link #571
pull-request chore: use rcgen and rustls-webpki k256-enabled forks from Zama org link #437

test-reporter: Run #571

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
9 9 0 0 0 0 0 not captured

🎉 All tests passed!

Tests

View All Tests
Test Name Status Flaky Duration
full_gen_tests_k8s_default_threshld_sequential_crs 32.7s
test_k8s_threshld_insecure 3m 15s
k8s_test_crs_uniqueness 32.8s
k8s_test_keygen_and_crs 3m 14s
k8s_test_keygen_uniqueness 8m 48s
full_gen_tests_k8s_default_centralzd_sequential_crs 1.8s
test_k8s_centralzd_insecure 6m 20s
full_gen_tests_default_k8s_centralized_sequential_crs 1.8s
k8s_test_centralized_insecure 1m 1s

🍂 No flaky tests in this run.

Github Test Reporter by CTRF 💚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The CLA has been signed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CRITICAL] Security Risk: Custom Forks of Critical TLS Libraries from Unverified Branch

1 participant