Skip to content

perf: replace RSA 2048 with ECDSA P-256 for cert generation#17

Merged
hxddh merged 2 commits into
mainfrom
claude/code-docs-review-asm5B
May 29, 2026
Merged

perf: replace RSA 2048 with ECDSA P-256 for cert generation#17
hxddh merged 2 commits into
mainfrom
claude/code-docs-review-asm5B

Conversation

@hxddh

@hxddh hxddh commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace rsa.GenerateKey(rand.Reader, 2048) with ecdsa.GenerateKey(elliptic.P256(), rand.Reader) for both CA and per-host leaf certificates
  • Remove KeyUsageKeyEncipherment from both templates — this flag is RSA key-exchange specific and is meaningless for ECDSA
  • Update comment: "RSA key generation" → "Key generation"

Performance

Before After
Per-host key generation ~80ms (RSA 2048) ~0.3ms (ECDSA P-256)

Eliminates the latency spike on first connection to each new host. Security is equivalent.

Compatibility

ECDSA P-256 is supported by all tools httpmon targets: curl 7.x+, aws CLI, Python requests, Node.js 14+, Go stdlib.

Test plan

  • go build ./... passes
  • go test -race -count=1 -timeout 120s ./... passes (all 38 tests)

https://claude.ai/code/session_01PPLEf2tHHFhw9rpW8dpdA3


Generated by Claude Code

claude added 2 commits May 28, 2026 17:18
- Replace 'darwin' with 'macos' for user-facing clarity
- Embed version tag in filename so multi-version downloads are unambiguous
- Update README download table and install example to match new names

https://claude.ai/code/session_01PPLEf2tHHFhw9rpW8dpdA3
ECDSA P-256 key generation is ~100x faster than RSA 2048 (~0.3ms vs
~80ms), eliminating the per-host latency spike on first connection.
Security is equivalent for this use case.

Also remove KeyUsageKeyEncipherment from both CA and leaf templates —
that flag is RSA key-exchange specific and has no meaning for ECDSA.

https://claude.ai/code/session_01PPLEf2tHHFhw9rpW8dpdA3
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@hxddh hxddh merged commit d56c81f into main May 29, 2026
2 checks passed
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.

2 participants