On 27/05/2020 15:25, David Sterba wrote: > The key for all userspace commands needs to be specified the same way as > for kernel, ie. "--auth-key btrfs:foo" and use the appropriate ioctls to > read the key bytes. Up to now I haven't been able to add a key to the kernel's keyring which can be read back to user-space. How about passing in a key file, like it is done in UBIFS? Should be doable both with libsodium and libgcrypt.