Skip to content

Add FHE.allowPublic as alias for FHE.allowGlobal#48

Merged
roeezolantz merged 8 commits intofeat/tn-chain-sig-verificationfrom
feat/allow-public
Feb 25, 2026
Merged

Add FHE.allowPublic as alias for FHE.allowGlobal#48
roeezolantz merged 8 commits intofeat/tn-chain-sig-verificationfrom
feat/allow-public

Conversation

@architect-dev
Copy link
Contributor

@architect-dev architect-dev commented Feb 20, 2026

FHE.allowPublic as a more self-explanatory api for allowing public usage and decryption of a ctHash. Internally uses FHE.allowGlobal to grant public access.

Also adds isPubliclyAllowed / isGloballyAllowed view functions to ITaskManager and TaskManager to query whether a ctHash has been globally allowed. Both delegate to acl.globalAllowed(). Used by the Dispatcher to verify access without a permit.

@roeezolantz roeezolantz force-pushed the feat/tn-chain-sig-verification branch from b949fe9 to 4694f33 Compare February 23, 2026 12:41
@roeezolantz roeezolantz requested a review from liorbond February 23, 2026 15:24
@roeezolantz roeezolantz merged commit 9845669 into feat/tn-chain-sig-verification Feb 25, 2026
@roeezolantz roeezolantz deleted the feat/allow-public branch February 25, 2026 09:14
roeezolantz added a commit that referenced this pull request Feb 25, 2026
* implement contract changes to verify decryption sigs

* remove decryption id from sig

* improvements

* PR comments fixes, tests, ci

* fix ci

* fix test

* fix existing tests

* use tryRecover for non-reverting signature verification

* add onlyIfEnabled to publish functions

* replace require string with LengthMismatch custom error

* add safety comment and advance free memory pointer in assembly

* use bytes32 for ctHash in Impl and FHE overloads

* add verifyDecryptResultSafe typed overloads

* add tests for tryRecover, onlyIfEnabled, and edge cases

* update changelog

* Add `FHE.allowPublic` as alias for `FHE.allowGlobal` (#48)

* Add `allowPublic` alias for `allowGlobal`

* Add isPubliclyAllowed and isGloballyAllowed to TaskManager

* Add tests for isPubliclyAllowed and isGloballyAllowed

* update changelog

* add FHE.isPubliclyAllowed, remove from DeterministicTM

* remove isGloballyAllowed, keep only isPubliclyAllowed

* update changelog

---------

Co-authored-by: Roee Zolantz <zolantz.roee@gmail.com>

---------

Co-authored-by: Architect <83823837+architect-dev@users.noreply.github.com>
@architect-dev
Copy link
Contributor Author

This PR was merged after the CTA compatibility PR was merged. The allowPublic functions don't cast the unwrapped encrypted values (unwrapped into bytes32) into a uint256 for TM.allowGlobal(). Will need a new PR to fix this issue.

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.

3 participants