// reference
Session signing (keygen / sign / verify)
PrismaFS can sign your session (or for anyone you share session with) so there is proof it has not been tampered with. SHA-256 is used to hash session tree and Ed25519 keypair signing that hash.
First, create a local identity (stored in ~/.config/prismafs/):
prismafs keygen
This will generate identity.key (private) and identity.pub (public) with your other PrismaFS config.
When mounted, make any change, unmount, and sign this session directory:
mkdir -p ~/pfs-base ~/pfs-session ~/pfs-mnt echo hello > ~/pfs-base/hello.txt export SESSION_LAYER_DIR=~/pfs-session export BASE_LAYER_DIRS=~/pfs-base prismafs ~/pfs-mnt echo world > ~/pfs-mnt/new.txt
Unmount (macOS: umount, Linux: fusermount3 -u), then sign:
umount ~/pfs-mnt prismafs sign ~/pfs-session
Anyone who has your public key can then verify that session wasn't modified:
prismafs verify ~/pfs-session -k ~/.config/prismafs/identity.pub
If post-signing, session tree changes (files edited, added, or removed), verification will fail. This is practical for session exporting or sharing, to confirm that share or export is that which was signed.