-
Notifications
You must be signed in to change notification settings - Fork 44
Keyed file headers #64
Comments
@littleskunk @gordonwritescode Feedback on my solution? |
@super3 As renter I would prefer a solution that doesn't transfer the 'decryption_key' all the time. I have to pay for the traffic.
|
I still feel pretty strongly that we shouldn't be trying to do key management. We aren't a sync and share product and so any application built on top of storj should be the interface responsible for handling syncing keys. In general a "bucket" is for an "app". The app that has access to the bucket should manage keys between devices, not bridge. To skunk's point, I agree that bridge should never hold anything that could be used to access data. As far as adding keys to the data itself, we'd have to enforce that in the protocol and I'm not sure that's the right way to go. As for storing the decryption key as a file in the network, well that becomes circular: where do you store the key that decrypts the key to the file? I think that neither bridge, nor the CLI should try to be too clever about key management. The simple keyring built in now should be sufficient. Furthermore the use of the local keyring is only in the CLI and not baked into the library itself so that developers using the library can choose how data gets encrypted and how keys are managed. I think there are some good ideas here and we should maybe publish a document on best practices for key management when building apps on the storj network, but I don't think solving the problem to any extent outside of what's been done so far is an effective use of our time and resources. Just my 3¢. |
Will respond to @littleskunk first. 1 and 2) You are only storing encrypted versions of a 256 bit key per
|
I agree that we should not be doing key management at the bridge level, and Define anything. Bridge should never store plantext keys, but I think This came up when I was building a sample app. Our core value prop is that I am starting to agree with you @gordonwritescode and @littleskunk, but I
|
@super3 I have to agree that most renter will lose there keys sooner or later. They will use there mobile phone to upload some pictures and don't think about a key backup. We need a solution for them. Something like uploading one keyfile and do a paper backup to restore it if needed. |
Would be approx 1 GB in that case for the year under that use case. Same overhead if the file is 10 GB. Not only backup, just anyone who wants to build applications if going to have issues with this. |
We need better solutions, but closing this for now. |
Problem
Currently you must have the
object_id
and thedecryption_key
to access a file stored on the network through bridge. For the renter that uploaded the file, this paring is stored locally in a key ring. The bridge does not store this pairing and the user is solely responsible for the management of their keys. This presents for usability and security issues for the renter.Lets assume that device 1 is the original device that is uploading the data, and device 2 is another device that is allowed to receive the data.
Solution
Each device should have a keyring of public keys of devices it would like to share the data with. Most likely these should be tied to a bucket. These public keys can be added manually(recommend), or retrieved from bridge.
Lets say a user wants to upload
cat.jpg
, into the "Cat Picture Bucket" with 5 public keys attached to the bucket. On upload preparation, the user would encrypt the filesdecryption_key
with each of the public keys listed on that bucket (using PGP like keys). These encrypted blobs could be stored multiple ways:This would solve the above problems as follows:
Revocable Keys
Using this scheme if device 2 was compromised, all data shared with it might also be compromised because the keys are contained in the header. We can't remove data that the attacker has, but we would like to keep them from accessing more data that they don't have with the compromised keys. We can solve this in two ways:
decryption_key
is encrypted with the public subkey, so the the master private key is never used for normal operations.decryption_key
is encrypted with nested keys. So the data stored in the header would be device1(device2(decryption_key
)). Device 2 must ask device 1 to decrypt and pass him the encrypted blob. If device 1 knows that device 2 is compromised he will not pass him the encrypted blob.The text was updated successfully, but these errors were encountered: