p2p seed/starter project using koa2, rebel-router
- test driven javascript development
- isomorphic functions
- gundb serverless immutable transactions
- use of pgp cryptographic functions
- webpack deployment
- es7 async/await flow control (or at least promise based)
- heavy use of promise aware partial application (anticipating aggressive memoize caching)
git clone https://github.com/colealbon/royale.git
cd royale;
npm install;
(modify config/options.js if needed)
npm test;
npm start;
navigate to localhost:3000 (or settings from config/options.js)
Install node/koa/webpackInstall gundbmake a deck of cardsinstall rebel routerAlice and Bob exchange keys- Mental Poker
- Alice and Bob agree on a certain "deck" of cards. In practice, this means they agree on a set of numbers or other data such that each element of the set represents a card.
- Alice picks an encryption key A and uses this to encrypt each card of the deck.
- Alice shuffles the cards.
- Alice passes the encrypted and shuffled deck to Bob. With the encryption in place, Bob cannot know which card is which.
- Bob shuffles the deck.
- Bob passes the double encrypted and shuffled deck back to Alice.
- Alice decrypts each card using her key A. This still leaves Bob's encryption in place though so she cannot know which card is which.
- Alice picks one encryption key for each card (A1, A2, etc.) and encrypts them individually.
- Alice passes the deck to Bob.
- Bob decrypts each card using his key B. This still leaves Alice's individual encryption in place though so he cannot know which card is which.
- Bob picks one encryption key for each card (B1, B2, etc.) and encrypts them individually.
- Bob passes the deck back to Alice.
- Alice publishes the deck for everyone playing (in this case only Alice and Bob, see below on expansion though).