Does this mean that the execution of private functions will be performed by someone else (DeFi contract in the example in the docs)
Does the user share the private data for execution? Do they share a specific decryption key and nullifier with the executor to decrypt that private data?
Does this mean that the execution of private functions will be performed by someone else (DeFi contract in the example in the docs)
All the private execution is hapenning in Private eXecution Environment (PXE) so the execution is “physically” happening on user’s device. What authwit does is that it allows a different contract to initiate execution on behalf of someone else (typically the user’s account contract).
To summarise:
In a private context authwit allows users to give permission to a contract to initiate a function call on a different contract on behalf of user (user’s account contract) and it’s happening locally on user’s device (in PXE) because private functions work with private state and private state is decrypted only locally (that’s how it stays private, without homomorphic encryption it’s not possible for external parties to perform computation on encrypted data and we don’t support FHE on Aztec yet).
In a public context the execution is performed by a sequencer.
Does the user share the private data for execution? Do they share a specific decryption key and nullifier with the executor to decrypt that private data?
It does not have to because as I pointed out in point 1. execution happens on user’s device because executor is user’s PXE.
Note: I was simplifying a bit here. There might be a case where user would want to allow a 3rd party to execute a private function on their behalf and when authwit would be used. This scenario might happen during mass emergency exits from L2. But this is an edge case and it does not represent a typical flow. In such a case a user would indeed have to share their decryption key with the 3rd party.