Skip to content

feat!: stop deriving signing key from privacy keys #24439

Merged
nventuro merged 14 commits into
merge-train/fairies-v5from
nico/f-778-remove-usage-of-ivsk-in-schnorr-account-derivation
Jul 6, 2026
Merged

feat!: stop deriving signing key from privacy keys #24439
nventuro merged 14 commits into
merge-train/fairies-v5from
nico/f-778-remove-usage-of-ivsk-in-schnorr-account-derivation

Conversation

@nventuro

@nventuro nventuro commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Closes #5837

This PR makes it so we no longer derive signing keys from the master privacy key. If there's no user-supplied privacy key seed, we instead derive it from the signing key, which is a safe derivation: PXE never sees the signing key nor any value it is derived from.

This has a large knock-on effect on wallets, CLI, tutorials, etc., but there's ultimately no large decisions being made there, it is mostly mechanical changes. In some cases I reworked some internals of wallets to make this distinction clearer.

nventuro added 8 commits June 30, 2026 22:15
Renames the account flag from --secret-key to --signing-key: the signing key is now
the account's root and the privacy secret is derived from it, instead of deriving the
signing key from the privacy secret. SSH accounts keep an independent random secret
since their key is external. The wallet DB persists both keys.

Also splits the ambiguous createOrRetrieveAccount into separate createAccount and
retrieveAccount, and wires up the previously-unhandled ecdsasecp256k1 account type.

BREAKING CHANGE: --secret-key is renamed to --signing-key and account addresses change.
The embedded stub providers routed schnorr_initializerless accounts to the ECDSA stub,
disagreeing with stubClassIds which registers them under the schnorr stub class.
…unts

Removes the deriveSigningKey(secret) fallback from the embedded wallet and TestWallet
createSchnorr* methods so the signing key is always supplied explicitly, and threads it
through the worker registerAccount RPC. Callers pass their fixture's signing key or a
fresh random one.

BREAKING CHANGE: createSchnorrAccount/createSchnorrInitializerlessAccount now require a
signing key argument.
Removes the last usages of deriveSigningKey (which derived the account signing key from
the privacy secret) and deletes the function, closing out #5837. The bot now treats its
configured senderPrivateKey as the signing key and derives the privacy secret from it; the
remaining test callers pass an explicit random signing key.

BREAKING CHANGE: deriveSigningKey is removed; the bot's account address changes for a given
senderPrivateKey.
cli-wallet switched to --signing-key, leaving createSecretKeyOption and parseSecretKey
without any callers, so drop them. Also removes a now-redundant comment in the bot factory.
Adds migration notes for the signing-key decoupling, the aztec-wallet --secret-key ->
--signing-key rename, and the bot senderPrivateKey change. Corrects the create-account
guide and the wallet-extension tutorial (which taught the removed deriveSigningKey), and
updates the type-checked examples to pass an explicit signing key.
@nventuro
nventuro requested a review from nchamo July 1, 2026 18:01
@nventuro
nventuro requested a review from a team as a code owner July 1, 2026 18:01
Comment thread yarn-project/end-to-end/src/spartan/mempool_limit.test.ts
Comment thread yarn-project/cli-wallet/src/cmds/create_account.ts Outdated
Comment thread yarn-project/cli/src/utils/commands.ts
Comment thread yarn-project/cli-wallet/src/utils/wallet.ts
nventuro added 2 commits July 2, 2026 18:09
…o/f-778-remove-usage-of-ivsk-in-schnorr-account-derivation

# Conflicts:
#	docs/docs-developers/docs/resources/migration_notes.md
#	yarn-project/end-to-end/src/bench/client_flows/client_flows_benchmark.ts
#	yarn-project/wallets/src/embedded/embedded_wallet.ts
- Rename SECRET_KEY to SIGNING_KEY in docker-compose.yml cli service
- Fix docs snippet to use DomainSeparator instead of removed GeneratorIndex
- Clear error when retrieving accounts stored by older aztec-wallet versions
@nventuro
nventuro enabled auto-merge (squash) July 2, 2026 18:31
@nventuro nventuro changed the title feat!: stop deriving signing key from privacy keys feat!: stop deriving signing key from privacy keys Jul 2, 2026
…o/f-778-remove-usage-of-ivsk-in-schnorr-account-derivation

# Conflicts:
#	docs/docs-developers/docs/resources/migration_notes.md
#	yarn-project/wallet-sdk/src/base-wallet/base_wallet.ts
@nventuro
nventuro merged commit 94af533 into merge-train/fairies-v5 Jul 6, 2026
13 checks passed
@nventuro
nventuro deleted the nico/f-778-remove-usage-of-ivsk-in-schnorr-account-derivation branch July 6, 2026 21:26
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.

3 participants