Confidential assets v1.1.4: keyless integration#19458
Draft
Conversation
…sert_ed25519_backup_key_on_keyless_account_internal
…ally stores encrypted DK
b9e9e64 to
699294a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
For Keyless accounts, we need to support recovering the decryption key (DK) while continuing to support the backup Ed25519 key option. This complicates things a little: using (a KDF of) the pepper as the DK will lock users out if they lost access to their OIDC account even if they still have their Ed25519 back up key.
The proposed solution is to encrypt the (pepper-derived) DK on-chain using their Ed25519 back up key. This will allow to recover the DK in both modes:
We introduce new private entry function
upsert_ed25519_backup_key_on_keyless_account_with_encrypted_payloadfor keyless accounts who have already registered a DK but are rotating their backup key and need to re-encrypt their DK on-chain.TODOs:
confidential_asset::registerwith it.Minor changes
account.moveandkeyless.moveHow Has This Been Tested?
Key Areas to Review
Relevant changed files to review:
Some key Qs:
KeylessAccountStoragedesign presumes we have correctly thought through all scenarios for our Keyless users in Petra to be able to recover their DK (assuming no manual signing key rotation & no manual decryption key rotation, which are super-advanced features). This needs to be validated.upsert_ed25519_backup_key_on_keyless_account?Type of Change
Which Components or Systems Does This Change Impact?
Checklist