Skip to content

docs: add the secp256r1 ECDSA keys to the chain-key pages - #420

Open
eichhorl wants to merge 3 commits into
mainfrom
docs/ecdsa-secp256r1
Open

eichhorl wants to merge 3 commits into
mainfrom
docs/ecdsa-secp256r1

Conversation

@eichhorl

@eichhorl eichhorl commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The scheme table on the chain-key cryptography page gets a secp256r1 (NIST P-256) row. Its use cases are ones that need P-256 specifically:
    • X.509 certificates. WebPKI accepts ECDSA only on the NIST curves (the CA/Browser Forum Baseline Requirements permit P-256, P-384 and P-521).
    • JSON Web Tokens signed with ES256 (RFC 7518, section 3.4). sign_with_ecdsa returns r and s as 32-byte big-endian values, which is the JWS signature encoding as is.
    • VAPID web push, which requires ES256 (RFC 8292, section 2).
  • The key derivation paragraph names SLIP-10 for P-256, matching the ecdsa_public_key section of the spec from feat: add secp256r1 to the ECDSA curves in the interface spec #394.
  • The deployed keys table and the cycle costs table list (secp256r1, test_key_1) and (secp256r1, key_1) next to the secp256k1 keys. The fees are the same, because ic0.cost_sign_with_ecdsa prices a signature by the subnet that holds the key, not by the curve (system_api.rs).
  • .sources/upstream.json pins ic-cdk-management-canister at 0.3.0. That release moves to ic-management-canister-types 0.11, which adds EcdsaCurve::Secp256r1 (feat: support the secp256r1 ECDSA curve; release ic-cdk-management-canister v0.3.0 cdk-rs#716) and a million_round_instructions_total field to SubnetMetricsResult. None of the HTTPS outcall pages and examples the pin covers use either, so no page changes.

Closes #425

Mainnet state

Both keys are enabled for signing on the subnets the pages name:

  • (secp256r1, test_key_1): generated on 2fq7c (144212), reshared to fuqsr (144325) and enabled for signing there (144327).
  • (secp256r1, key_1): generated on pzp6e (144331), backed up to uzr34 (144488) and enabled for signing on pzp6e (144490).

Rust canisters get EcdsaCurve::Secp256r1 from ic-cdk-management-canister 0.3.0, and PocketIC 16.1.0 holds the same keys for tests. The offline key derivation guide stays as it is: @dfinity/ic-pub-key v1.0.2 supports only secp256k1 and ed25519.

Tests

node scripts/validate.js passes on both pages. npm run build was not run locally (Node 18 here; Astro needs 22.12), so the CI build is the check.

The interface spec and the management canister reference gained the
`secp256r1` curve in #394. The concept and cycle cost pages still
described threshold ECDSA as secp256k1 only.

- The scheme table on the chain-key cryptography page gets a
  `secp256r1` (NIST P-256) row. Its use cases are web standards that
  require ES256: JSON Web Tokens, and VAPID web push (RFC 8292,
  section 2).
- The key derivation paragraph names SLIP-10 for P-256, matching the
  `ecdsa_public_key` section of the spec.
- The deployed keys table and the cycle costs table list
  `(secp256r1, test_key_1)` and `(secp256r1, key_1)` next to the
  secp256k1 keys, on the same subnets and at the same fees.
  `ic0.cost_sign_with_ecdsa` prices a signature by the subnet that
  holds the key, not by the curve.
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

🤖 Here's your preview: https://kwnd6-zaaaa-aaaam-ai7va-cai.icp0.io

WebPKI accepts ECDSA only on the NIST curves: the CA/Browser Forum
Baseline Requirements permit P-256, P-384 and P-521. With a P-256 key,
a canister can sign X.509 certificates, for example as a private
certificate authority.
0.3.0 moves to ic-management-canister-types 0.11, which adds
EcdsaCurve::Secp256r1 and the million_round_instructions_total field
of SubnetMetricsResult. None of the HTTPS outcall pages or examples
that this pin covers use either, so no page changes.
@eichhorl
eichhorl marked this pull request as ready for review October 22, 2026 13:32
@eichhorl
eichhorl requested a review from a team as a code owner October 22, 2026 13:32

This branch has not been deployed

No deployments
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.

chore: upstream dfinity/cdk-rs (ic-cdk-management-canister) moved to 0.3.0

1 participant