Confidential assets v1.1: New decryption algorithms & contract changes#822
Draft
Confidential assets v1.1: New decryption algorithms & contract changes#822
Conversation
40e31af to
a92b819
Compare
c1e6bb0 to
90ef6bb
Compare
…work Key rotation — migrate to generic sigma protocol framework: The old ConfidentialKeyRotation had a bespoke Fiat-Shamir construction that did not match the Move verifier in sigma_protocol_key_rotation.move, and proved the wrong statement (re-encrypting the full balance under the new key, requiring a range proof). The new implementation uses sigmaProtocol.ts (sigmaProtocolProve/Verify) whose Fiat-Shamir matches the Move verifier byte-for-byte via BCS. create() and authorizeKeyRotation() are now synchronous. Rename ConfidentialKeyRotationResult -> KeyRotationProof: the flat sigmaProtoComm / sigmaProtoResp fields are now a nested proof: SigmaProtocolProof sub-field. Eliminate duplicate view-function implementations in ConfidentialAsset: getAssetAuditorEncryptionKey and hasUserRegistered were re-implementing logic already in ConfidentialAssetTransactionBuilder and viewFunctions.ts, with stale Move function names (get_auditor, has_confidential_asset_store). Both now delegate to the canonical implementations. rotateEncryptionKey: fix missing freeze when pending balance is already zero. The on-chain entry function requires incoming transfers to be paused; the condition is now pendingBalance() > 0 || !isFrozen. Misc: remove SIGMA_PROOF_KEY_ROTATION_SIZE, unused numberToBytesLE and MODULE_NAME imports.
…r now; remove later)
90ef6bb to
cca4eaa
Compare
… are ignored anyway
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
Test Plan
Related Links
See alinush.org/confidential-assets for resources.
Checklist
pnpm fmt?CHANGELOG.md?