You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This uses PBKDF2 to derive a symmetric key. The default key length will be 256 bits. For deterministic key generation, make sure to specify the `salt` parameter.
82
+
This uses PBKDF2 to derive a symmetric key. The default key length will be 256
83
+
bits. For deterministic key generation, make sure to specify the `salt`
Construction of `EncryptedFS` relies on an optional `blockSize` parameter. This is by default set to 4 KiB. All files are broken up into 4 KiB plaintext blocks. When encrypted, they are persisted as ciphertext blocks.
90
+
Construction of `EncryptedFS` relies on an optional `blockSize` parameter. This
91
+
is by default set to 4 KiB. All files are broken up into 4 KiB plaintext blocks.
92
+
When encrypted, they are persisted as ciphertext blocks.
85
93
86
-
The ciphertext blocks contain an initialization vector plus an authorisation tag. Here is an example of the structure:
94
+
The ciphertext blocks contain an initialization vector plus an authorisation
95
+
tag. Here is an example of the structure:
87
96
88
97
```
89
98
| iv (16 bytes) | authTag (16 bytes) | ciphertext data (x bytes) |
@@ -95,9 +104,16 @@ The ciphertext data length is equal to the plaintext block length.
95
104
96
105
There are some differences between EFS and Node FS:
97
106
98
-
- User, Group and Other permissions: In EFS User, Group and Other permissions are strictly confined to their permission class. For example, a User in EFS does not have the permissions that a Group or Other has while in Node FS a User also has permissions that Group and Other have.
99
-
- Sticky Files: In Node FS, a sticky bit is a permission bit that is set on a file or a directory that lets only the owner of the file/directory or the root user to delete or rename the file. EFS does not support the use of sticky bits.
100
-
- Character Devices: Node FS contains Character Devices which can be written to and read from. However, in EFS Character Devices are not supported yet.
107
+
- User, Group and Other permissions: In EFS User, Group and Other permissions
108
+
are strictly confined to their permission class. For example, a User in EFS
109
+
does not have the permissions that a Group or Other has while in Node FS a
110
+
User also has permissions that Group and Other have.
111
+
- Sticky Files: In Node FS, a sticky bit is a permission bit that is set on a
112
+
file or a directory that lets only the owner of the file/directory or the root
113
+
user to delete or rename the file. EFS does not support the use of sticky
114
+
bits.
115
+
- Character Devices: Node FS contains Character Devices which can be written to
116
+
and read from. However, in EFS Character Devices are not supported yet.
101
117
102
118
## Development
103
119
@@ -124,7 +140,9 @@ npm run lintfix
124
140
npm run bench
125
141
```
126
142
127
-
View benchmarks here: https://github.com/MatrixAI/js-encryptedfs/blob/master/benches/results with https://raw.githack.com/
143
+
View benchmarks here:
144
+
https://github.com/MatrixAI/js-encryptedfs/blob/master/benches/results with
0 commit comments