Skip to content

Commit

Permalink
Improved clarity (and removed way to many unnecessary references to C…
Browse files Browse the repository at this point in the history
…loudflare's IPFS gateway).
  • Loading branch information
Zi1mo5zo committed Nov 22, 2018
1 parent 937097c commit ef36616
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# ipfs-wormhole

Get things from one computer to another, safely. Over IPFS (which is not even
required to receive files thanks to the [Cloudflare IPFS
gateway](https://cloudflare-ipfs.com)).
required to receive files thanks to IPFS gateways).

Inspired by [magic-wormhole](https://github.com/warner/magic-wormhole) and
[dat-cp](https://github.com/tom-james-watson/dat-cp). Initially published
Expand All @@ -17,8 +16,9 @@ On machine A:
`ipfs-wormhole.sh send <file or directory>`

Will encrypt and add the file (or the directory as a compressed tarball) to
IPFS, and output a tag. If xclip is installed, the command to retrieve it will
be copied to the clipboard.
IPFS, and output a `tag`. This `tag` contains everything the recipient needs to
retrieve, decrypt and save the file. If `xclip` is installed, this `tag` will be
copied to the clipboard.

## Receive a file or a directory (as a compressed tarball)

Expand All @@ -27,8 +27,7 @@ On machine B:
`ipfs-wormhole.sh receive <tag>`

Will retrieve the file over IPFS if IPFS is installed and running, or if it's
not, over HTTPS thanks to the [Cloudflare IPFS
gateway](https://cloudflare-ipfs.com), decrypt it and save it locally.
not, over HTTPS thanks to IPFS gateways, decrypt it and save it locally.

## Check dependencies

Expand All @@ -40,48 +39,50 @@ gateway](https://cloudflare-ipfs.com), decrypt it and save it locally.

## Parameters

The default password length and IPFS gateway can be overidden by setting the
environment variables IWPASSWORDLENGTH and IWIPFSGATEWAY, respectively.
The default password length (`40` alphanumeric) and IPFS gateway ([Cloudflare's
gateway](https://cloudflare-ipfs.com)) can be overridden by setting the
environment variables `IWPASSWORDLENGTH` and `IWIPFSGATEWAY`, respectively.

E.g.:

- `IWPASSWORDLENGTH=50 ipfs-wormhole.sh send FILE` will use a longer password to
encrypt FILE (default length is 40).
- `IWIPFSGATEWAY=https://gateway.ipfs.io/ipfs ipfs-wormhole.sh receive tag` will
use the official IPFS gateway (instead of Cloudflare's gateway) if `ipfs daemon` is not running.
encrypt FILE.
- `IWIPFSGATEWAY=https://gateway.ipfs.io/ipfs ipfs-wormhole.sh receive TAG` will
retrieve the encrypted file through the official IPFS gateway if the IPFS
daemon is not running.

# How it works

Your data is encrypted on the sender's machine, using `gpg` and its default
symmetric cipher (depending on your configuration), with a temporary random
password generated by `pwgen`.
symmetric cipher (which depends on your specific `gpg` configuration), with a
temporary random password generated by `pwgen`.

Once encrypted, your data is made available for others from your machine using
Once encrypted, your data is made available to others from your machine using
[IPFS](https://ipfs.io).

The temporary password (as well as the base64 encrypted filename, for that
The temporary password (as well as the base64 encrypted file name, for that
matter) is concatenated to the IPFS hash in a `tag`, which consequently has to
be transmitted over a secure channel to the recipient's machine (e.g. `ssh`).

On the recipient's machine, the encrypted data is retrieved:

- from IPFS if IPFS is runnning
- over HTTPS from the Cloudflare IPFS gateway if IPFS it not running (or not
installed).
- from IPFS if IPFS is running
- over HTTPS from an IPFS gateway if IPFS it not running (or not installed)

The encrypted data is subsequently decrypted on the recipient's machine with the
password (extracted from the tag), and saved with the proper file name (also
extracted from the tag).

Confidentiality is not an issue as long as you trust `gpg`, its default
symmetric cipher (it's up to you to change it), and `pwgen`.
symmetric cipher (it's up to you to change it in `gpg`'s configuration file),
and `pwgen`.

# FAQ

## Who owns my data once I use ipfs-wormhole?

TL;DR no one except the sender and the recipient. `ipfs-wormhole` is end-to-end
encrypted with `gpg`.
TL;DR No one. `ipfs-wormhole` is end-to-end encrypted with `gpg`. See above for
more details.

## Where does it store my data?

Expand Down

0 comments on commit ef36616

Please sign in to comment.