Is it possible to decrypt a dataset when connecting via SMB?

Hello everybody, my first post here.

I installed TrueNAS Scale 23.10.2 on a commodity hardware, and I’m still in the “looking around and tinkering a bit” phase.

For the moment I only created one pool and one dataset. The dataset is encrypted and the password is not saved on the system. If I understood correctly, this means that, every time I restart the NAS, I have to log in the web interface and unlock the dataset from there.
For how I believe I will use the system, this shouldn’t be a big deal.

Nevertheless, I was wondering if there is a relatively safe way to unlock the dataset when connecting via SMB. In other words: the dataset password is stored encrypted on the server, and the SMB credentials are used to decrypt it, so that the dataset can be unlocked.
If this is possible at all, I suppose I will have at least to make my fingertips dirty with the terminal, and up to a certain point I’m ready for that.

I understood that the SMB communication protocol is not that safe, so this wouldn’t be a good practice. Would it be better when using NFS instead of SMB? (I believe I will have only Linux and MacOS clients, so it would be possible).
And anyway, how would it work with NFS?

Hope I was clear enough. :sweat_smile:
Thank you in advance to anybody even only considering to spend time answering this.

Simple answer is no. You can hack something along these lines with the API, but it’s a fairly dodgy concept.

I thought so, actually.
Thank you very much for answering.