Skip to content

Instantly share code, notes, and snippets.

@PeeHaa
Created May 14, 2012 22:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PeeHaa/2697783 to your computer and use it in GitHub Desktop.
Save PeeHaa/2697783 to your computer and use it in GitHub Desktop.
DarkerNetFilesharing Protocol

DarkerNetFilesharing Protocol

Intro

This document describes how the DarkerNetFilesharing protocol should be implemented.

This document is a draft and anything (including implementation details) are subject to change.

What is it?

DarkernetFilesharing will make it easy to share information between two or more peers.
It will be build with privacy as a cornerstone and the goal is to circumvent censorship.
In order to do this it uses a ring of trust around the user, meaning only people the user
grants access to will be be able to share information.

Information will be broken into multiple smaller parts so that it can be downloaded / uploaded
to / from multiple peers when they are available in the ring of trust of the user.

Ports

We need to find a standard port range over which the protocol works. Although it should be
flexible to use any port defined by the user.

Ring of trust

Any client will get a unique identifier which is only visible to people in the ring of trust.
In order to be able to be added to the ring of trust a client may send a request based on the id
of the other client.

When the other client receives the request it has the option to accept or deny the request to be
added to the ring of trust.

This way only these two clients will know about each other.

Unique identifier

In order to have a really unique identifier (except for edge cases) we will use the ip address
of the client.

Because only people the client allows in their ring of trust will be able to see the unique
identifier (and their ip address) it would be a relatively safe way of identifying clients.

As long as the ring of trust isn't broken the privacy of clients would be safe.

Todo

  • What happens if the ring of trust is broken?

Tranfers

Transfers can be initiated by searching for a hash in the ring of trust. If one or more peers
in the ring of trust has the file (which matches the hash) available the download will be
started.

The download will be split in multiple parts to be able to spread the download over multiple
peers (when available). The best number of bytes per part should be investigated, but for now
it will be 500KB

After the successful transfer of a part the uploading client sends a character string which
indicates the completion of the part and the checksum of the part ending with control
characters.

Todo

  • Come up with confirmation character string

Checksums

The checksums of the parts will be a combination of both the md5 and the sha1 hash.

Todo

  • Find out the overhead by different hashing methods.

Encryption

Find out what encryption to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment