-
Notifications
You must be signed in to change notification settings - Fork 6
Securing a Dat with a - additional - private key (password) #80
Comments
May be of interest: https://github.com/jayrbolton/dat-wot |
@joehand Thank you for the hint, but from what I can tell |
How private do you want your data? For example, you could encrypt file contents, but not the file names or directory structure. Each file could be encrypted with some master key hashed to the path (don't want to use the same key for all files). Another option is to store the data in some container that has multiple files. I've stored files in a git repo (blob and tree objects) which maps to a flat list of hashes. You only need to point to the root hash to read the tree. The real filenames are quite private since the tree objects are also encrypted. Here you could hash the master key with the content hash. Another option is to store the files in a filesystem image (like ext4) and store the image in 4k blocks (named by index). You can use a stream cipher since the blocks are ordered if you plan on extracting them at once or hash the index to the master key if you want random access using fuse or something to mount the block device. Also depending on how custom you want to go, only hyperdrive needs to be used for the dat protcol to allow syncing data around. Hashbase can store any hyperdrive based dataset, it just won't render as http if it's not hyperdrive on top. I've got lots of ideas, but need more information about your requirements. |
Oh, this is really inspiring! The solution I am imagining right now - based of what you wrote - would be to have an encrypted file table |
I don't quite understand what you're proposing, but it sounds like it might work. |
I'm just going to link to this old experiment of mine to show some of what I meant https://github.com/creationix/test-workspace |
Let me try to rephrase: Instead of writing into |
When implementing a backup/public storage (like hashbase or datbase) for DATs that storage knows the content of the DAT. In my understanding, right now the only way to make sure that the storage does not know what is inside the dat is to encrypt the files in the storage additionally by packing the data in a .zip file. The problem with this approach is that it is not-at-all transparent. The sender needs to know and care about zipping and so does the recipient. Also both parties need the same zip program installed (funny sidenote: japanese tend to send out shift-jis encoded zip files) and know how to use it. Aside from knowledge and installation issues, its also significant amount of overhead if you do that often and reduces the comfort of using dat.
I thought about implementing an transparent-ish wrapper on top of hyperdrive that - instead of writing directly to the stream - write everything into a
.dat-encrypt.zip
file that is encrypted with a password and upon receiving a DAT that contains only a.dat-encrypt.zip
file it automatically decrypts it.This approach would be sound, but unfortunately DAT - as it is built right now - only lets you upload/download the entire zip in one run. Which means that any additional file would trigger a complete re-upload and re-download - consuming vast amounts of bandwidth 😟and sacrificing a big part of the value of having DATs. Maybe that is important in order to ensure actual privacy of the content.
This all leaves me with a few questions:
The text was updated successfully, but these errors were encountered: