Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security Features #14

Open
p3nt4 opened this issue Sep 8, 2017 · 2 comments
Open

Security Features #14

p3nt4 opened this issue Sep 8, 2017 · 2 comments

Comments

@p3nt4
Copy link

p3nt4 commented Sep 8, 2017

Hi,
What are the security features?
Does it support authentication and encryption?

Cheers,

@nirvik
Copy link
Owner

nirvik commented Sep 8, 2017

Hi,
I couldn't figure out, how to make the election process secure in an untrusted decentralized environment. I would love to add that security in future.
But, for the time being, I have made sure that the file transfer is secure. It works as follows:

  1. The file is originally chunked into pieces and each piece is hashed.
  2. All the piece hashes are concatenated and hashed again to form one single hash called the 'root_hash'.
  3. The leecher obtains the 'root hash' from the leader.

So, before the file transfer begins, the leecher requests the seeder to send him the concatenated hashes of all pieces. This is done, so that the leecher can hash them and compare it with the 'root hash' it obtained from the leader.

After the confirmation, the file transfer is initiated.

On receiving every piece, the leecher hashes the piece content and verifies it with the appropriate section of the concatenated piece_hash it received from the seeder earlier.

If the hash of the piece is verified, it safely writes to the file.

@p3nt4
Copy link
Author

p3nt4 commented Sep 8, 2017

I would love to implement this tool with my coworkers but we are security enineers so I need to do my due diligences first.
It would be nice to implement some mutual authentication mechanisms.
The easiest I can think of would be to use a pre shared key: derivate an encryption key from a shared password and encrypt all data in transit with it.
A more ellaborate system with certificates would be awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants