Custom Filesystem with Merkle Tree Integrity
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Filesystems on computing devices are vulnerable to unauthorized changes, and existing solutions do not efficiently share filesystem contents while minimizing resource usage.
Innovation Solution
A custom filesystem that creates a single metadata file containing all filesystem metadata, storing actual files in a content-addressed store, and enables fs-verity to generate a Merkle tree, making the filesystem and its contents fully cryptographically sealed and immutable.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional filesystem structures are used, then ease of operation and sharing are improved, but security against unauthorized changes deteriorates
Solution Approach 1:
The filesystem is segmented into two distinct components: a metadata file containing directory structure and file information, and a content-addressed store containing actual file data. This segmentation allows the metadata to be verified independently through cryptographic hashing while maintaining efficient content sharing through the content-addressed store.
Solution Approach 2:
A cryptographic hash function acts as an intermediary between the filesystem metadata and the content-addressed store. The hash function generates Merkle tree hashes that verify metadata integrity without exposing the actual file contents, enabling security verification while maintaining operational simplicity.
2Ease of operation
If filesystem contents are shared across multiple devices, then ease of operation is improved, but resource usage increases
Solution Approach 1:
The content-addressed store serves multiple functions simultaneously: it stores file contents, enables deduplication across shared files, and provides cryptographic verification through content hashing. This multi-functionality allows efficient sharing without duplicating resources.
Solution Approach 2:
The system changes the parameter of content identification from traditional path-based addressing to hash-based addressing. This parameter change enables the same content to be referenced by its unique hash value across different devices and filesystems, automatically eliminating duplicates and reducing resource usage.
3Reliability
If cryptographic verification is implemented, then security is improved, but processing time increases
Solution Approach 1:
Merkle tree hashes are pre-computed and stored in the metadata file during filesystem creation. This preliminary action allows verification to proceed by simply comparing pre-computed hashes against newly computed hashes, rather than performing full cryptographic verification of all file contents each time.
Solution Approach 2:
Instead of verifying the actual file contents through cryptographic hashing during operation, the system uses copied hash values stored in the Merkle tree. This copying approach maintains security verification while minimizing processing time during filesystem operations.
Data Source
AI summary
A computing device executing a kernel-based operating system creates a content-addressed object store containing files of a filesystem. The computing device generates a metadata file that describes characteristics of the files of the filesystem that are in the content-addressed object store. The computing device, in a kernel of the operating system, generates a Merkle tree of the metadata file and a Merkle tree of the content-addressed object store. The Merkle trees contain hashes of blocks of the metadata file and hashes of blocks of the files in the content-addressed object store. The computing device, in the kernel, verifies that a digest corresponding to the metadata file matches an expected digest for the metadata file and that digests corresponding to the files in the content-addressed object store match expected digests for the files in the content-addressed object store. The computing device mounts the metadata file to a location in the filesystem.


