SAFE Developer Meetup, Dec 9th 2016

WELCOME

www.SAFEdev.org

👋 Hello

Ben

Developer & Community

forum/ben

github/gnunicorn

twitter/gnunicornBen

Nick

Chief Operations Officer

Francis

Developer & Support

forum/nick_lambert

github/nicklambert

twitter/N1ckLambert

forum/frabrunelle

github/frabrunelle

twitter/frabrunelle

Outline

  • Hello and welcome
  • We'd like to get to know you!
  • (optionally) two short presentations
  • Special Guest: @Seneca
  • How do we want to continue this group?

the SAFE  Network

Overview

the SAFE network

A decentralized privacy-first open source data storage and communications network that provides a secure, efficient and no-cost infrastructure for app development.

Peer-to-peer Data Storage

Encrypted by Default

Built-in Data Retentation

Mathematical Deduplication

Self-Auth Registration

 

Infrastructure for

decentralised App

(aka truly anonymous)

the XOR-Namespace

and routing with it

Addressing in Peer-to-peer

UnifiedResourceLocation describe the (geo) location to find something - not applicable in p2p:

http://forum.safedev.org -> 104.131.162.82

instead UnifiedResourceIdentifier with content checksum:

$ echo "test" | sha1sum  
4e1243bd22c66e76c2ba9eddc1f91394e57f9f83

magnet:?xt=urn:sha1:4e1243bd22c66e76c2ba9eddc1f91394e57f9f83&dn

UnifiedResourceLocation describe the (geo) location to find something - not applicable in p2p:

http://forum.safedev.org -> 104.131.162.82

7818 67189 3419811011819418615822119324919148229127159131

01001110 00010010 01000011 10111101 00100010 11000110 01101110 01110110 11000010 10111010 10011110 11011101 11000001 11111001 00010011 10010100 11100101 01111111 10011111 10000011

Routing

with Kademlia Distributed Hash Tables

Closest distance between Node and Content:

  distance = xor(Hash, NodeID)

eXclusive OR of two binary numbers

         01111111
  xor    00101001
  ---------------
  =      01010110

     127

-      42

------------

=     85

XOR Distance is unique per Node and Content but also between any two Nodes!

📄

Kademlia Routing

📄

Consensus

In the XOR Namespace

Consesus without a 👑

How do you vote?

Bitcoin is basically majority voting on the global state (blockchain) following a predefined process (longest chain) on a reduced set of possible options (crypto puzzles).

Unanimous decisions (like Paxos, Raft) in which everyone to agrees on a new state.

Remember Routing?

📄

Routing Personas

Data Types

  • Authentication
  • Immutable data
  • Mutable data*
  • Data chains

Mutable Data

The new map-like Data Type

Key-Value-Store

pub struct MutableData {
    ...
    data: BTreeMap<Vec<u8>, Vec<u8>>,
    ...
    permissions: BTreeMap<User, BTreeSet<Permission>>,
    ...
}

Map:

  "keyA" -> "valueA"

  "keyB" -> "valueB"

e.g. Files Container:

  "meetups/ams.jpg" -> FILE

  "meetups/bln.jpg" -> FILE

Permissions

pub struct MutableData {
    ...
    data: BTreeMap<Vec<u8>, Vec<u8>>,
    ...
    permissions: BTreeMap<User, BTreeSet<Permission>>,
    ...
}
pub enum User {
    Anyone,
    Key(sign::PublicKey),
}
pub enum Permission {
    Allow(Action),
    Deny(Action),
}
pub enum Action {
    Insert,
    Update,
    Delete,
    ManagePermission,
}

Shared "Photos"

_photos

  • meetups/ams.png =>
  • meetups/bln.png =>

read-only

image

sharer

camera

+ insert

+ insert

+ update

+ delete

photo manager

Encrypted containers

pub struct Container {
    pub name: XorName,
    pub enc_info:
          Option<(secretbox::Key,
                  Option<secretbox::Nonce>)>
    ...
}

insert "meetup/nyc.jpg" => serialisedFile

Xdfm9fka8dndk2 => dmd98ajda8didn

Notes

  • We're replacing all internal SD with it
  • Including NFS
  • v1 with limit of 1MB and 100 entries

Apps

on the SAFE network

Public Names

"DNS" - domain lookup

with a "service" oriented approach

Browser

with a Javascript API to allow direct SAFE access

Interactive Web-Apps

Like a Markdown Editor

or comments on a blog

Decorum

SAFE emailing

SAFE Launcher

What's next?

for the SAFE network

Alpha

Vaults

Mobile

SAFEcoin

Thanks!

Questions?

gnunicornBen // Benjamin Kampmann

safenetwork.org

safedev.org

maidsafe.org

github.com/maidsafe

#1 SAFEdev Meetup

Friday 7pm @ Hackers & Founders Building

Welcome to SAFE Dev Amsterdam #1 - 2016-12-06

By Benjamin Kampmann

Welcome to SAFE Dev Amsterdam #1 - 2016-12-06

A technical introducing to The SAFE Network at Bitcoin Wednesday in Amsterdam on Dec 7th 2016

  • 1,443