CryFS does what you want, it's the default used by the KDE Vaults feature.
there's also a comparison page on the site, comparing it to other solutions.
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
CryFS does what you want, it's the default used by the KDE Vaults feature.
there's also a comparison page on the site, comparing it to other solutions.
Here's a table with multiple solutions and comparisons: https://www.cryfs.org/comparison
Just be aware that some solutions like gocryptfs are provided on a user-space filesystem (Fuse). This has a very low performance and most importantly if you require inotify on the decrypted data for some application then it won't be available. In short inotify is what allows apps to watch a filesystem for changes and act accordingly in real time.
Tables like this suck. They are made by one of the projects in the comparison and they include no data.
Better than nothing. :)
Sounds like you're looking for EncFS.
It'll leak the size and structure of whatever you have there. Filenames and content are encrypted.
Tomb might fit your needs
Thanks I will look into it. But tomb also seems to not have dynamic sizing
You can increase the size of a tomb, but IIRC it's an offline process.
Yeah, I think as of now I will go for it
I have used gocryptfs (https://github.com/rfjakob/gocryptfs) in the past, it creates an overlay mount that encrypts each dir and file separately, so no need to precreate a container. There are some security downsides to this approach though so be aware of that. https://nuetzlich.net/gocryptfs/threat_model/
EncFS, CryptoFS, eCryptFS...
Ext4 encryption