Comments (5)
How is this implemented in our inspirations?
from js-encryptedfs.
On this line of thinking, one also needs to consider how to handle functions like stat
/fstat
or utimes
. Functions that return properties of a directory/file might just look at the upper directory cache. In this case, efs needs to somehow make sure lower and upper dierectories agree on things like access permissions/timestamps/size etc. Well size would be an interesting one, we probably just want to provide the size of the decrypted file since encryption metadata should be transparent to the user.
Another thing to consider is fsync
and fdatasync
; I think this is more straightforward as in we can just flush the data from upperDir downwards using existing write
methods but I have a feeling it's redundant since in both read
and write
methods, the data is synced between upper and lower directories.
from js-encryptedfs.
One issue is knowing which blocks have been read into upperDir
and which have yet to be read.
The "paging" system can be implemented by maintaining an in-memory index, an internal private object that keeps track of chunk mapping.
One other thing that I don't think is really an issue now (or might not ever be an issue) is concurrency with multiple instances of EFS. If there ever was multiple instances of EFS operating on the same file, we would need to ensure that the in-memory blocks are consistent with those in the encrypted chunk on the lowerDir
. This could be done by storing a content hash (of the block) in the encrypted chunk and if the hash has changed, this would mean it has been written by another EFS instance.
I can see this maybe happening in distributed file systems, but it would be easy to circumvent by only sending from upperDir
to upperDir
using transport level encryption. I don't think it is within scope at the moment.
from js-encryptedfs.
This has been implemented for write
but is not yet utilised in the read
method. This will depend on the in-memory index (chunk-mapping) described above
from js-encryptedfs.
Closing on account of migration to gitlab
from js-encryptedfs.
Related Issues (20)
- Generated docs should be viewable directly from Github HOT 1
- NPM releases should create tags in the repo HOT 5
- Update jest test configuration HOT 1
- readdirSync doesn't return anything that isn't loaded in memory HOT 1
- unlinkSync does not unlink lower directory HOT 2
- Adapt EFS to the File System Interface
- lstat/lstatSync should propagate lowerDir
- @ imports don't work with webworkers HOT 2
- Update this to use node-forge HOT 1
- Refactoring EFS & Align coding standards with js-polykey HOT 5
- Implement True Snapshot Isolation for LevelDB HOT 6
- Benchmark & Load Test EncryptedFS HOT 1
- Fix Permission Hierarchy - User, Group, Other permission checking
- Identify and Eliminate Unscalable Operations with Lazy GC HOT 2
- Structured Change Detection for Mutation Events and Schema Compliance HOT 3
- Add in `rm` method
- `EncryptedFS.rmdir` does not remove files on Windows HOT 26
- Streams don't seem to emit the close event HOT 2
- Streams are old and legacy and should be refactored to v16 LTS HOT 2
- Benchmark the EFS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-encryptedfs.