Skip to content

Confidential assets v1.1: New decryption algorithms & contract changes#822

Draft
alinush wants to merge 22 commits intomainfrom
alin/confidential-assets-v1.1
Draft

Confidential assets v1.1: New decryption algorithms & contract changes#822
alinush wants to merge 22 commits intomainfrom
alin/confidential-assets-v1.1

Conversation

@alinush
Copy link
Contributor

@alinush alinush commented Feb 3, 2026

Description

  • Implemented BSGS in TypeScript; too slow (> 1s to decrypt a single 32-bit value)
  • Replaced [BL12] discrete log algorithm with a new TBSGS-k32 algorithm; see this PR

Test Plan

  • Re-use unit tests
  • Re-run e2e tests manually

Related Links

See alinush.org/confidential-assets for resources.

Checklist

  • Have you ran pnpm fmt?
  • Have you updated the CHANGELOG.md?

@alinush alinush force-pushed the alin/confidential-assets-v1.1 branch from 40e31af to a92b819 Compare February 10, 2026 00:40
@alinush alinush force-pushed the alin/confidential-assets-v1.1 branch 5 times, most recently from 90ef6bb to cca4eaa Compare March 2, 2026 18:17
@alinush alinush force-pushed the alin/confidential-assets-v1.1 branch 4 times, most recently from f652172 to 1ea5bac Compare March 6, 2026 22:29
@alinush alinush requested a review from banool March 12, 2026 20:26
@alinush alinush force-pushed the alin/confidential-assets-v1.1 branch from 3cd92e6 to 5a0a905 Compare March 18, 2026 23:40
alinush added 16 commits March 20, 2026 15:28
…eric sigma framework

 - 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.
 - remove SIGMA_PROOF_KEY_ROTATION_SIZE, unused numberToBytesLE and MODULE_NAME imports.
 - replace freeze with pause
@alinush alinush force-pushed the alin/confidential-assets-v1.1 branch from 810fd33 to 04e45a4 Compare March 20, 2026 20:28
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.

2 participants