GithubHelp home page GithubHelp logo

overcom's Introduction

Overcom

P2P JSON passing using DHT that maps public key and app ID to physical address (IP+port).

Applications

  • The library lets the caller create a node. An application running on a user's device will usually have one node.
  • The app and node in it are independent and unaware of any other stuff going on in the device.
  • The node carries the public key of the user which is shared across different apps,

Application specific private key, or "secondary key"

The secondary key passed into the node is not the private key of the public key passed into it. Rather it is a secondary key. once-removed from it. This secondary key can produce tokens that prove that the secondary key was produced using the original private key with full knowledge of the app and expiration, and the token is within the expiration limit.

When a user which owns a private key produces a secondary key, they essentially say "I grant the carrier of this token permission to act as me within the app ID for this period of time". This makes app ID more like a protocol ID than a real app.

Note that this authentication cannot be revoked, as so in theory a malicious app can act on your behalf for the allotted time, and you won't be able to stop it.

Example

Alice publickey is 000

Bob publickey is 001

Eve publickey is 111

Alice server bound { address: '::', family: 'IPv6', port: 43769 }

Bob server bound { address: '::', family: 'IPv6', port: 46559 }

Eve server bound { address: '::', family: 'IPv6', port: 37429 }

Bob getting socket 000

Bob current physical addresses { '000': { ip: 'localhost', port: 43769 } }

Bob creating verified socket { ip: 'localhost', port: 43769 }

Bob setting up socket localhost 43769

Alice handling new socket

Alice sending own credentials

Alice waiting for credentials

Bob handling new socket

Bob sending own credentials

Bob waiting for credentials

Bob verified signature

Bob registering socket 000

sent message

Eve getting socket 001

Eve current physical addresses { '000': { ip: 'localhost', port: 43769 } }

Eve getting socket 000

Eve current physical addresses { '000': { ip: 'localhost', port: 43769 } }

Eve creating verified socket { ip: 'localhost', port: 43769 }

Eve setting up socket localhost 43769

Alice verified signature

Alice registering socket 001

alice got message [ { publicKey: '001', message: { type: 'bla', payload: 'hello Alice' } } ]

Alice handling new socket

Alice sending own credentials

Alice waiting for credentials

Eve handling new socket

Eve sending own credentials

Eve waiting for credentials

Eve verified signature

Eve registering socket 000

Alice verified signature

Alice registering socket 111

Alice got search peer request 001

Alice getting socket 001

Bob got search peer request 001

Bob peer wants my physical address

Bob creating verified socket { ip: '::', port: 37429 }

Bob setting up socket :: 37429

Eve handling new socket

Eve sending own credentials

Eve waiting for credentials

Bob handling new socket

Bob sending own credentials

Bob waiting for credentials

Bob verified signature

Bob registering socket 111

Eve verified signature

Eve registering socket 001

Eve getting socket 001

sent message

bob got message [ { publicKey: '111', message: { type: 'bla', payload: 'hello Bob I got your IP from Alice' } } ]

overcom's People

Contributors

uriva avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.