feat(wallet)!: use ECDH shard secret for burn mask with claim pubkey #5238
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
Derives and uses domain-separated ECDH shared secret for burnt output commitment mask and encrypted value.
Motivation and Context
Previously, the DAN layer can claim the burnt output and deposit it into an account. However, the mask and value were known only to the L1 wallet, meaning that the claimed funds could not be spent. The PR uses an ECDH shared secret and allows the DAN wallet to derive the shared secret in the same way that it does for any other confidential transfer.
The console wallet will generate$H(k.A)$ where $A$ is the claim key provided by the user and $k$ is a blinding factor generated using the console wallet's seed key. Usually, this will be the key that owns the account component (ref: tari-project/tari-dan#425). The public blinding factor (
reciprocal_claim_public_key
) is returned to theburn_tari
caller and is passed to theClaimBurn
instruction, which in turn, 'mints' the <commitment, reciprocal_claim_public_key, encrypted_value> ConfidentailResource tuple.NOTE: Burns UTXOs are not recoverable because the wallet cannot determine the mask/decrypt the value without the original claim_public_key which is not stored on-chain.
How Has This Been Tested?
Existing cucumber test for burn execute part of the code modified in this PR, however test coverage needs to be improved
BREAKING CHANGE:
burn_tari
GRPC response changed (re-add proto to POSTman if you use that).