Skip to content

Conversation

@mikesposito
Copy link
Member

@mikesposito mikesposito commented Jun 11, 2025

Explanation

Previously, KeyringController accepted a cacheEncryptionKey option that allowed the encryption key to be stored in memory and used during encryption/decryption directly as opposed to using a password. The cacheEncryptionKey option is being removed, and the encryption key is now always derived and cached when the password is provided.

This change allows to simplify #unlockKeyrings and #updateVault methods, and remove all the logic and tests related to cacheEncryptionKey. This also allows to remove this.#password, that has been replaced by this.#encryptionKey.

The this.#encryptionKey assignment logic has been moved to two new internal methods with these specific responsibilities:

  • #deriveEncryptionKey(string): Derives the encryption key from the password, to be used during password login and password change.
  • #useEncryptionKey(string, string): Uses an existing encryption key to be used directly, to be used by submitEncryptionKey mainly.

With the upcoming changes in #5940, this allows to change the encryption key to use (i.e. by calling the aformentioned new internal methods) without having to deal with logic related to vault unlock/update, and code branches related to password-based encryption and key caching.

This PR can be tested on extension with the following: MetaMask/metamask-extension#33613

References

Changelog

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Reworks encryption to always use a provided encryptor and key-based flow, removes cacheEncryptionKey, unifies encryptor types, adds generics, and aligns seedless onboarding types; updates tests and deps.

  • Keyring Controller:
    • API/Types: Require encryptor in constructor; merge GenericEncryptor/ExportableKeyEncryptor into unified Encryptor; add generics (EncryptionKey, SupportedKeyDerivationOptions, EncryptionResult).
    • Behavior: Remove cacheEncryptionKey; always derive/store encryption key; new internals #deriveEncryptionKey and #setEncryptionKey; rework unlock/update vault to use encryptWithKey/decryptWithKey.
    • Errors/State: Add WrongEncryptionKeyType; use in-memory serialized key + salt; drop password caching paths.
    • Tests/Coverage: Large test refactor to key-based flow; adjust coverage thresholds.
    • Deps: Move to @metamask/browser-passworder@^6 (dev), remove as runtime dep.
  • Seedless Onboarding Controller:
    • Types: Accept optional SupportedKeyDerivationOptions and align VaultEncryptor with new Encryptor API.
    • Tests/Mocks: Updated to new encryptor contract; bump browser-passworder to ^6.
  • Changelogs: Update for breaking changes and new types.
  • Misc: Minor ESLint threshold tweaks.

Written by Cursor Bugbot for commit 106e341. This will update automatically on new commits. Configure here.

@mikesposito mikesposito requested review from a team as code owners June 11, 2025 17:21
@mikesposito mikesposito marked this pull request as draft June 11, 2025 17:21
@mikesposito mikesposito force-pushed the mikesposito/refactor/remove-uncached-encryption branch from ba3626f to cdddc1c Compare June 11, 2025 17:30
@mikesposito mikesposito force-pushed the mikesposito/refactor/remove-uncached-encryption branch from cdddc1c to a11b2a3 Compare June 11, 2025 17:31
Copy link
Contributor

@matthiasgeihs matthiasgeihs left a comment

Choose a reason for hiding this comment

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

i don't understand: how can this be used to inject an external encryption key? (which is the main thing we need for seedless onboarding option 3)

@mikesposito
Copy link
Member Author

mikesposito commented Jun 12, 2025

@matthiasgeihs this PR doesn't allow encryption key injection, but rather removes this.#password and this.#cacheEncryptionKey from the controller and it splits some of the controller encryption logic (separating key derivation and encryption/decryption). This is not a replacement for your PR (which is implementing option 3), but rather a prerequisite for it to be more maintainlable and readable.

@mikesposito mikesposito force-pushed the mikesposito/refactor/remove-uncached-encryption branch from a11b2a3 to cf465ce Compare June 12, 2025 10:09
@mikesposito
Copy link
Member Author

@metamaskbot publish-previews

@mikesposito mikesposito marked this pull request as ready for review June 12, 2025 10:12
@github-actions
Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/account-tree-controller": "0.1.1-preview-cf465cec",
  "@metamask-previews/accounts-controller": "30.0.0-preview-cf465cec",
  "@metamask-previews/address-book-controller": "6.1.0-preview-cf465cec",
  "@metamask-previews/announcement-controller": "7.0.3-preview-cf465cec",
  "@metamask-previews/app-metadata-controller": "1.0.0-preview-cf465cec",
  "@metamask-previews/approval-controller": "7.1.3-preview-cf465cec",
  "@metamask-previews/assets-controllers": "68.1.0-preview-cf465cec",
  "@metamask-previews/base-controller": "8.0.1-preview-cf465cec",
  "@metamask-previews/bridge-controller": "32.1.1-preview-cf465cec",
  "@metamask-previews/bridge-status-controller": "29.1.0-preview-cf465cec",
  "@metamask-previews/build-utils": "3.0.3-preview-cf465cec",
  "@metamask-previews/chain-agnostic-permission": "0.7.0-preview-cf465cec",
  "@metamask-previews/composable-controller": "11.0.0-preview-cf465cec",
  "@metamask-previews/controller-utils": "11.10.0-preview-cf465cec",
  "@metamask-previews/delegation-controller": "0.4.0-preview-cf465cec",
  "@metamask-previews/earn-controller": "1.1.0-preview-cf465cec",
  "@metamask-previews/eip1193-permission-middleware": "0.1.0-preview-cf465cec",
  "@metamask-previews/ens-controller": "16.0.0-preview-cf465cec",
  "@metamask-previews/error-reporting-service": "1.0.0-preview-cf465cec",
  "@metamask-previews/eth-json-rpc-provider": "4.1.8-preview-cf465cec",
  "@metamask-previews/foundryup": "1.0.0-preview-cf465cec",
  "@metamask-previews/gas-fee-controller": "23.0.0-preview-cf465cec",
  "@metamask-previews/json-rpc-engine": "10.0.3-preview-cf465cec",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.7-preview-cf465cec",
  "@metamask-previews/keyring-controller": "22.0.2-preview-cf465cec",
  "@metamask-previews/logging-controller": "6.0.4-preview-cf465cec",
  "@metamask-previews/message-manager": "12.0.1-preview-cf465cec",
  "@metamask-previews/multichain": "4.1.0-preview-cf465cec",
  "@metamask-previews/multichain-api-middleware": "0.4.0-preview-cf465cec",
  "@metamask-previews/multichain-network-controller": "0.8.0-preview-cf465cec",
  "@metamask-previews/multichain-transactions-controller": "2.0.0-preview-cf465cec",
  "@metamask-previews/name-controller": "8.0.3-preview-cf465cec",
  "@metamask-previews/network-controller": "23.6.0-preview-cf465cec",
  "@metamask-previews/notification-services-controller": "10.0.0-preview-cf465cec",
  "@metamask-previews/permission-controller": "11.0.6-preview-cf465cec",
  "@metamask-previews/permission-log-controller": "3.0.3-preview-cf465cec",
  "@metamask-previews/phishing-controller": "12.5.0-preview-cf465cec",
  "@metamask-previews/polling-controller": "13.0.0-preview-cf465cec",
  "@metamask-previews/preferences-controller": "18.1.0-preview-cf465cec",
  "@metamask-previews/profile-sync-controller": "17.1.0-preview-cf465cec",
  "@metamask-previews/queued-request-controller": "10.0.0-preview-cf465cec",
  "@metamask-previews/rate-limit-controller": "6.0.3-preview-cf465cec",
  "@metamask-previews/remote-feature-flag-controller": "1.6.0-preview-cf465cec",
  "@metamask-previews/sample-controllers": "0.1.0-preview-cf465cec",
  "@metamask-previews/seedless-onboarding-controller": "1.0.0-preview-cf465cec",
  "@metamask-previews/selected-network-controller": "22.1.0-preview-cf465cec",
  "@metamask-previews/signature-controller": "30.0.0-preview-cf465cec",
  "@metamask-previews/token-search-discovery-controller": "3.3.0-preview-cf465cec",
  "@metamask-previews/transaction-controller": "57.3.0-preview-cf465cec",
  "@metamask-previews/user-operation-controller": "36.0.0-preview-cf465cec"
}

@mikesposito mikesposito force-pushed the mikesposito/refactor/remove-uncached-encryption branch from e73e808 to 27657e3 Compare June 12, 2025 10:47
@mikesposito mikesposito requested a review from a team as a code owner June 12, 2025 11:28
@mikesposito mikesposito force-pushed the mikesposito/refactor/remove-uncached-encryption branch from 6112020 to 86b6397 Compare June 12, 2025 11:44
@mikesposito
Copy link
Member Author

@metamaskbot publish-previews

Comment on lines 319 to 328
type CachedEncryptionKey = {
/**
* The exported encryption key string.
*/
exported: string;
/**
* The salt used to derive the encryption key.
*/
salt?: string;
};
Copy link
Member Author

Choose a reason for hiding this comment

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

We can easily add encryptedEncryptionKey in #5940 as a property of this type, so we can ensure that they are kept in sync with each other and with the values in the state and vault by placing them in the same data structure.

@socket-security
Copy link

socket-security bot commented Nov 6, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​browser-passworder@​4.3.0 ⏵ 6.0.010010010084 +3100

View full report

@mikesposito
Copy link
Member Author

@metamaskbot publish-preview

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/account-tree-controller": "2.0.0-preview-b289ac1c",
  "@metamask-previews/accounts-controller": "34.0.0-preview-b289ac1c",
  "@metamask-previews/address-book-controller": "7.0.0-preview-b289ac1c",
  "@metamask-previews/announcement-controller": "8.0.0-preview-b289ac1c",
  "@metamask-previews/app-metadata-controller": "2.0.0-preview-b289ac1c",
  "@metamask-previews/approval-controller": "8.0.0-preview-b289ac1c",
  "@metamask-previews/assets-controllers": "87.1.0-preview-b289ac1c",
  "@metamask-previews/base-controller": "9.0.0-preview-b289ac1c",
  "@metamask-previews/bridge-controller": "59.0.0-preview-b289ac1c",
  "@metamask-previews/bridge-status-controller": "59.0.0-preview-b289ac1c",
  "@metamask-previews/build-utils": "3.0.4-preview-b289ac1c",
  "@metamask-previews/chain-agnostic-permission": "1.2.2-preview-b289ac1c",
  "@metamask-previews/composable-controller": "12.0.0-preview-b289ac1c",
  "@metamask-previews/controller-utils": "11.15.0-preview-b289ac1c",
  "@metamask-previews/core-backend": "4.0.0-preview-b289ac1c",
  "@metamask-previews/delegation-controller": "1.0.0-preview-b289ac1c",
  "@metamask-previews/earn-controller": "9.0.0-preview-b289ac1c",
  "@metamask-previews/eip-5792-middleware": "2.0.0-preview-b289ac1c",
  "@metamask-previews/eip-7702-internal-rpc-middleware": "0.1.0-preview-b289ac1c",
  "@metamask-previews/eip1193-permission-middleware": "1.0.2-preview-b289ac1c",
  "@metamask-previews/ens-controller": "18.0.0-preview-b289ac1c",
  "@metamask-previews/error-reporting-service": "3.0.0-preview-b289ac1c",
  "@metamask-previews/eth-block-tracker": "14.0.0-preview-b289ac1c",
  "@metamask-previews/eth-json-rpc-middleware": "21.0.0-preview-b289ac1c",
  "@metamask-previews/eth-json-rpc-provider": "5.0.1-preview-b289ac1c",
  "@metamask-previews/foundryup": "1.0.1-preview-b289ac1c",
  "@metamask-previews/gas-fee-controller": "25.0.0-preview-b289ac1c",
  "@metamask-previews/gator-permissions-controller": "0.4.0-preview-b289ac1c",
  "@metamask-previews/json-rpc-engine": "10.1.1-preview-b289ac1c",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.8-preview-b289ac1c",
  "@metamask-previews/keyring-controller": "24.0.0-preview-b289ac1c",
  "@metamask-previews/logging-controller": "7.0.0-preview-b289ac1c",
  "@metamask-previews/message-manager": "14.0.0-preview-b289ac1c",
  "@metamask-previews/messenger": "0.3.0-preview-b289ac1c",
  "@metamask-previews/multichain-account-service": "2.1.0-preview-b289ac1c",
  "@metamask-previews/multichain-api-middleware": "1.2.4-preview-b289ac1c",
  "@metamask-previews/multichain-network-controller": "2.0.0-preview-b289ac1c",
  "@metamask-previews/multichain-transactions-controller": "6.0.0-preview-b289ac1c",
  "@metamask-previews/name-controller": "9.0.0-preview-b289ac1c",
  "@metamask-previews/network-controller": "25.0.0-preview-b289ac1c",
  "@metamask-previews/network-enablement-controller": "3.1.0-preview-b289ac1c",
  "@metamask-previews/notification-services-controller": "19.0.0-preview-b289ac1c",
  "@metamask-previews/permission-controller": "12.1.0-preview-b289ac1c",
  "@metamask-previews/permission-log-controller": "5.0.0-preview-b289ac1c",
  "@metamask-previews/phishing-controller": "15.0.0-preview-b289ac1c",
  "@metamask-previews/polling-controller": "15.0.0-preview-b289ac1c",
  "@metamask-previews/preferences-controller": "21.0.0-preview-b289ac1c",
  "@metamask-previews/profile-sync-controller": "26.0.0-preview-b289ac1c",
  "@metamask-previews/rate-limit-controller": "7.0.0-preview-b289ac1c",
  "@metamask-previews/remote-feature-flag-controller": "2.0.0-preview-b289ac1c",
  "@metamask-previews/sample-controllers": "3.0.0-preview-b289ac1c",
  "@metamask-previews/seedless-onboarding-controller": "6.1.0-preview-b289ac1c",
  "@metamask-previews/selected-network-controller": "25.0.0-preview-b289ac1c",
  "@metamask-previews/shield-controller": "2.0.0-preview-b289ac1c",
  "@metamask-previews/signature-controller": "36.0.0-preview-b289ac1c",
  "@metamask-previews/subscription-controller": "3.2.0-preview-b289ac1c",
  "@metamask-previews/token-search-discovery-controller": "4.0.0-preview-b289ac1c",
  "@metamask-previews/transaction-controller": "61.1.0-preview-b289ac1c",
  "@metamask-previews/transaction-pay-controller": "3.0.0-preview-b289ac1c",
  "@metamask-previews/user-operation-controller": "40.0.0-preview-b289ac1c"
}

@mikesposito mikesposito force-pushed the mikesposito/refactor/remove-uncached-encryption branch from b289ac1 to 21f1c91 Compare November 6, 2025 01:25
@MetaMask MetaMask deleted a comment from github-actions bot Nov 6, 2025
@MetaMask MetaMask deleted a comment from github-actions bot Nov 6, 2025
@MetaMask MetaMask deleted a comment from github-actions bot Nov 6, 2025
@MetaMask MetaMask deleted a comment from github-actions bot Nov 6, 2025
@MetaMask MetaMask deleted a comment from github-actions bot Nov 6, 2025
@MetaMask MetaMask deleted a comment from github-actions bot Nov 6, 2025
@mikesposito

This comment was marked as outdated.

Comment on lines +352 to +355
export type EncryptionResultConstraint<SupportedKeyMetadata> = {
salt?: string;
keyMetadata?: SupportedKeyMetadata;
};
Copy link
Member Author

@mikesposito mikesposito Nov 6, 2025

Choose a reason for hiding this comment

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

This allows Mobile to inject its own Encryptor, which uses cipher instead of data as ciphertext property. The defult type used in the Encryptor definition is still coming from @metamask/browser-passworder.

@mikesposito
Copy link
Member Author

@metamaskbot publish-preview

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/account-tree-controller": "2.0.0-preview-70abd50a",
  "@metamask-previews/accounts-controller": "34.0.0-preview-70abd50a",
  "@metamask-previews/address-book-controller": "7.0.0-preview-70abd50a",
  "@metamask-previews/analytics-controller": "0.0.0-preview-70abd50a",
  "@metamask-previews/announcement-controller": "8.0.0-preview-70abd50a",
  "@metamask-previews/app-metadata-controller": "2.0.0-preview-70abd50a",
  "@metamask-previews/approval-controller": "8.0.0-preview-70abd50a",
  "@metamask-previews/assets-controllers": "87.1.0-preview-70abd50a",
  "@metamask-previews/base-controller": "9.0.0-preview-70abd50a",
  "@metamask-previews/bridge-controller": "59.0.0-preview-70abd50a",
  "@metamask-previews/bridge-status-controller": "59.0.0-preview-70abd50a",
  "@metamask-previews/build-utils": "3.0.4-preview-70abd50a",
  "@metamask-previews/chain-agnostic-permission": "1.2.2-preview-70abd50a",
  "@metamask-previews/composable-controller": "12.0.0-preview-70abd50a",
  "@metamask-previews/controller-utils": "11.15.0-preview-70abd50a",
  "@metamask-previews/core-backend": "4.0.0-preview-70abd50a",
  "@metamask-previews/delegation-controller": "1.0.0-preview-70abd50a",
  "@metamask-previews/earn-controller": "9.0.0-preview-70abd50a",
  "@metamask-previews/eip-5792-middleware": "2.0.0-preview-70abd50a",
  "@metamask-previews/eip-7702-internal-rpc-middleware": "0.1.0-preview-70abd50a",
  "@metamask-previews/eip1193-permission-middleware": "1.0.2-preview-70abd50a",
  "@metamask-previews/ens-controller": "18.0.0-preview-70abd50a",
  "@metamask-previews/error-reporting-service": "3.0.0-preview-70abd50a",
  "@metamask-previews/eth-block-tracker": "14.0.0-preview-70abd50a",
  "@metamask-previews/eth-json-rpc-middleware": "21.0.0-preview-70abd50a",
  "@metamask-previews/eth-json-rpc-provider": "5.0.1-preview-70abd50a",
  "@metamask-previews/foundryup": "1.0.1-preview-70abd50a",
  "@metamask-previews/gas-fee-controller": "25.0.0-preview-70abd50a",
  "@metamask-previews/gator-permissions-controller": "0.4.0-preview-70abd50a",
  "@metamask-previews/json-rpc-engine": "10.1.1-preview-70abd50a",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.8-preview-70abd50a",
  "@metamask-previews/keyring-controller": "24.0.0-preview-70abd50a",
  "@metamask-previews/logging-controller": "7.0.0-preview-70abd50a",
  "@metamask-previews/message-manager": "14.0.0-preview-70abd50a",
  "@metamask-previews/messenger": "0.3.0-preview-70abd50a",
  "@metamask-previews/multichain-account-service": "2.1.0-preview-70abd50a",
  "@metamask-previews/multichain-api-middleware": "1.2.4-preview-70abd50a",
  "@metamask-previews/multichain-network-controller": "2.0.0-preview-70abd50a",
  "@metamask-previews/multichain-transactions-controller": "6.0.0-preview-70abd50a",
  "@metamask-previews/name-controller": "9.0.0-preview-70abd50a",
  "@metamask-previews/network-controller": "25.0.0-preview-70abd50a",
  "@metamask-previews/network-enablement-controller": "3.1.0-preview-70abd50a",
  "@metamask-previews/notification-services-controller": "19.0.0-preview-70abd50a",
  "@metamask-previews/permission-controller": "12.1.0-preview-70abd50a",
  "@metamask-previews/permission-log-controller": "5.0.0-preview-70abd50a",
  "@metamask-previews/phishing-controller": "15.0.0-preview-70abd50a",
  "@metamask-previews/polling-controller": "15.0.0-preview-70abd50a",
  "@metamask-previews/preferences-controller": "21.0.0-preview-70abd50a",
  "@metamask-previews/profile-sync-controller": "26.0.0-preview-70abd50a",
  "@metamask-previews/rate-limit-controller": "7.0.0-preview-70abd50a",
  "@metamask-previews/remote-feature-flag-controller": "2.0.0-preview-70abd50a",
  "@metamask-previews/sample-controllers": "3.0.0-preview-70abd50a",
  "@metamask-previews/seedless-onboarding-controller": "6.1.0-preview-70abd50a",
  "@metamask-previews/selected-network-controller": "25.0.0-preview-70abd50a",
  "@metamask-previews/shield-controller": "2.0.0-preview-70abd50a",
  "@metamask-previews/signature-controller": "36.0.0-preview-70abd50a",
  "@metamask-previews/subscription-controller": "3.3.0-preview-70abd50a",
  "@metamask-previews/token-search-discovery-controller": "4.0.0-preview-70abd50a",
  "@metamask-previews/transaction-controller": "61.1.0-preview-70abd50a",
  "@metamask-previews/transaction-pay-controller": "3.0.0-preview-70abd50a",
  "@metamask-previews/user-operation-controller": "40.0.0-preview-70abd50a"
}

mikesposito added a commit that referenced this pull request Nov 12, 2025
…7127)

## Explanation

<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->
This PR includes part of the changes originally proposed in [this
PR](#5963) that were inflating its
size:
- Remove the `cacheEncryptionKey` flag from `KeyringController`
constructor options and instance variables
- All code paths that used this flag have been removed (effectively, the
controller behaves as if the flag was always `true`)
- `GenericEncryptor` and `ExportableKeyEncryptor` have been merged into
a single `Encryptor` type.
- The `Encryptor` type has also been fixed to be compatible with
`@metamask/browser-passworder` and `Encryptor` from mobile
- As `Encryptor` now accepts type parameters to specify encryption key
and derivation params types, the `KeyringController` has been updated to
accept these type parameters and pass them to the `Encryptor` instance.

## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->
* Related to #6010

## Checklist

- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [ ] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Unifies the encryptor interface with a new generic `Encryptor`,
removes `cacheEncryptionKey` and requires an `encryptor` for
`KeyringController`, adds a derivation-options type param to
`SeedlessOnboardingController`, and updates tests/types accordingly.
> 
> - **Keyring Controller**:
> - Replace `GenericEncryptor`/`ExportableKeyEncryptor` with a single
generic `Encryptor` (supports key import/export, detailed
encrypt/decrypt, custom result types).
> - Add generic type params `EncryptionKey`,
`SupportedKeyDerivationOptions`, and `EncryptionResult` to
`KeyringController` and `KeyringControllerOptions`.
> - BREAKING: `encryptor` is now required; remove `cacheEncryptionKey`
and related paths/state handling.
>   - Fix `decryptWithKey` typing to accept encryption result object.
> - **Seedless Onboarding Controller**:
> - Add optional `SupportedKeyDerivationOptions` type parameter; update
`VaultEncryptor` to use unified `Encryptor`.
> - **Tests/Mocks**:
> - Refactor tests to new encryptor API; remove branches for
`cacheEncryptionKey`; add `createVault` helper and adjust mocks to new
types.
> - **Changelogs/Config**:
> - Update package changelogs to document breaking changes and new
generics.
>   - Slightly lower Jest coverage thresholds for `keyring-controller`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
16f68c7. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
@mikesposito
Copy link
Member Author

Closed in favor of #7128

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.

[KeyringController] Drop uncached encryption support

7 participants