Skip to content

Latest commit

 

History

History

web

ipfs-senc web - viewer for ipfs-senc shares

WARNING: NOT AUDITED! USE AT OWN RISK. DONT USE FOR ANYTHING SERIOUS.

First, see ipfs-senc

This is a tool to view ipfs-senc shared files on the web.

  • Encrypt files with ipfs-senc share
  • Links carry decryption keys in the #anchor (never sent to browser)
  • Decrypts right in the browser
  • Works out of any ipfs gateway

Examples

Anatomy of the URL

A URL like https://ipfs.io/ipns/ipfs-senc.net/#zGekfyfuYnk9FPsMnJLPQeJ9s9M3AcE4pdNq2ujrKu5WR:/ipfs/QmQgMRb5FZBtX5KBDWGRcc5Vkq5FMvndpEh6YzhMzjCZVo is broken down into:

(gateway-url)(webapp-path)#(key):(ciphertext-path)

For example

https://ipfs.io                             - ipfs gateway to use
  /ipns/ipfs-senc.net                       - tag for the latest webapp release
  #                                         - anchor tag: dont send the rest to servers (keys!)
    zGekfyfuYnk9FPsMnJLPQeJ9s9M3AcE4pdNq2ujrKu5WR         - symmetric encryption key (read cap)
    :                                                     - separator
    /ipfs/QmQgMRb5FZBtX5KBDWGRcc5Vkq5FMvndpEh6YzhMzjCZVo  - ipfs path to ciphertext

Usage

Step 1. Encrypt and share the files with ipfs-senc

# pick a folder to share (here, it is test-senc)
> mkdir test-senc
> # add files.
> ipfs-senc share senc-demo-full
skipping top level dir
Shared as:  /ipfs/QmQgMRb5FZBtX5KBDWGRcc5Vkq5FMvndpEh6YzhMzjCZVo
Key:  zGekfyfuYnk9FPsMnJLPQeJ9s9M3AcE4pdNq2ujrKu5WR
Ciphertext on local gateway:  https://gateway.ipfs.io /ipfs/QmQgMRb5FZBtX5KBDWGRcc5Vkq5FMvndpEh6YzhMzjCZVo
Ciphertext on global gateway:  http://localhost:8080 /ipfs/QmQgMRb5FZBtX5KBDWGRcc5Vkq5FMvndpEh6YzhMzjCZVo

Get, Decrypt, and Unbundle with:
    ipfs-senc --key zGekfyfuYnk9FPsMnJLPQeJ9s9M3AcE4pdNq2ujrKu5WR download /ipfs/QmQgMRb5FZBtX5KBDWGRcc5Vkq5FMvndpEh6YzhMzjCZVo dstPath

View on the web: https://ipfs.io/ipns/ipfs-senc.net/#zGekfyfuYnk9FPsMnJLPQeJ9s9M3AcE4pdNq2ujrKu5WR:/ipfs/QmQgMRb5FZBtX5KBDWGRcc5Vkq5FMvndpEh6YzhMzjCZVo

This yielded:

  • key: zGekfyfuYnk9FPsMnJLPQeJ9s9M3AcE4pdNq2ujrKu5WR
  • (ciphertext) path: /ipfs/QmQgMRb5FZBtX5KBDWGRcc5Vkq5FMvndpEh6YzhMzjCZVo
  • web slug (combination): #zGekfyfuYnk9FPsMnJLPQeJ9s9M3AcE4pdNq2ujrKu5WR:/ipfs/QmQgMRb5FZBtX5KBDWGRcc5Vkq5FMvndpEh6YzhMzjCZVo

2. View the files using the key and path