pckr (picker) is
- a P2P
networkdiscovery framework - a
public_keyinfrastructure - a messaging service
- an end-to-end encrypted file transfer service
- a possible security hazard
This is a high-level view of how the network is created and how users are bootstrapped into it.
Instructions are provided elsewhere.
user1is created with apublic_key/private_keypairuser1can then expose an interface to the world (we which we call theirsurface) at anip:portcombination- the
surfacewill listen for incomingframes and react to them
- the
user1will be very lonely indeed until bootstrapped into anetworkuser1is encouraged to contact a friend (user2) out-of-band to exchangeip:portinfouser1can then stitchuser2into theiripcache- at this point either
user1oruser2can request the other'spublic_key - if
user1initiates thepublic_keyexchange,user1volunteers theirpublic_keyfreely- no cryptographic protocol is established beween the users at this point, so
user1'spublic_keyis transmitted in the clear
- no cryptographic protocol is established beween the users at this point, so
user2can accept this request for theirpublic_keyuser2can also storeuser1'spublic_keywhich was just transmitteduser2will encrypt theirpublic_keywith apassword, and encrypt thatpasswordwithuser1'spublic_key, and send it backuser1can decrypt thepasswordusing theirprivate_key, and then decryptuser2'spublic_keyusing thepassword- at this point
user1anduser2are sharingpublic_keys, and are aware of each other'sip:ports - both
user1anduser2will periodicallyseek_userto seek each other out, topingthe other andchallengetheir storedpublic_keys user1anduser2are also expected to transmitframes from users that are surfacing into thenetwork, and users that areseek_usering other users- more details on both follow
user1anduser2are also expected to transmitframes pertaining to the health of thenetwork- specifically,
frames are sent out to gather information about the health of thenetworktopology user1anduser2would do well to heed the advice of theseframes, and challenge or expel inconsistently recognized users in their reachablenetwork
- specifically,
- my first drafts of the client include a server, which coördinated
ip:portcombinations for certain users. very early drafts also included thepublic_keyof each user, in plain text, as a column, sitting on a Postgres database behind a REST API - the challenge was to make it a true P2P
network, with no coördinating server - since no coördinating server was desirable, every client has to ensure that they remain a part of the
network - for this reason, the
networkis hereby referred to as amurmuration - no such thing is true
- each client is responsible for tagging-along by informing the
networkof their whereabouts ("surfacing") or verifying theip:portand cryptographical links of their contacts ("seeking") - clients also have a role to play in ensuring the health of their
networktopology, by propagatingframeswhich aim to collect information about the consistency of thenetwork- such
networktopology checks might also then inform clients about inconsistently recognized users, which the client could then choose to expel from theiripcache, or challenge, as they wish - every client is also free to do nothing
- such
- it might seem a pain to bootstrap over the phone or WhatsApp or Telegram or what have you but you can create small
networks isolated from the outside world
- user information is thrown into a directory tree
- the client was written to allow unfettered access to users on the same account or physical machine as you
- no passwords exist. anyone that has access to your computer has access to your pckr "account"
- users are not guaranteed unique across a
networkof any size greater than 1public_keychallenges are used when needed to establish the identity of your contacts- it's entirely possible that your
ipcachewill become overrun with duplicate usernames of people purporting to be who they say they are. woe to you and them!public_keychallenges to the rescue. - seriously though this could be a problem
- remember to contact your contacts out of band as appropriate to verify their identities
- the health of the
networkis achieved by voluntary participation in two activitiesseek_userssurface_user
- clients are encouraged to
surface_useron startup- they need to tell all of the contacts they have in their
ipcachethat they are alive - they do this by encrypting their
ip:portusing their contacts'public_keys, and transmitting that information to each contact
- they need to tell all of the contacts they have in their
- clients are also encouraged to
pingandchallengeall users they have knowledge of- clients can
pingorchallengeany conact in theiripcache
- clients can
- they can also
seekcontacts that they have apublic_keyfor
user1can seek out any user in their reachablenetwork, if they know that user'spublic_keyuser1prepares apayloadfor destined foruser2user1encrypts apasswordusinguser2'spublic_key- they encrypt their own
ip:portcombination asjson, along with theirusername, using thepassword - they also generate a random
seek_token, which they encrypt using thepassword
- the
seek_tokenis stored locally - they send the
frameout to every contact they have in theiripcache - each contact can try to decrypt the
password - if they can decrypt it, they reply directly to
user1using theip:portcombination they get by decrypting it from theframe'spayload user1can process theseek_user_responseto storeuser2'sip:portin theiripcacheuser1can ensure thatuser2send back the correctseek_token
user2is free to storeuser1'sip:portcombination as welluser2is equally free to challengeuser1before doing so
user1can challengeuser2in 2 ways:- does
user2have theprivate_keythat matches thepublic_keythatuser1has stored for themuser1encrypts an arbitrary piece of data usinguser1'spublic_keyand sends it touser2user2responds by using theirprivate_keyto decrypt the data and send it backuser1can verify the data- if it matches, the challenge has succeeded
- does
user2haveuser1'spublic_keyuser1sends a piece of data touser2user2encrypts it using thepublic_keyofuser1user1decrypts it using theirprivate_key
- does
- by using both methods,
user1anduser2can verify a solid cryptographical link - either user can also ensure that the user presenting at a certain
ip:portis who they claim to be - this makes the exchange of
public_keyss as early as possible quite important for the health of thenetwork
- users can (and even must) store the
ip:portof their contacts in theiripcache - the contents of the
ipcacheare updated or adjusted in response to particularframesuser2can store theip:portofuser1that is included in aseek_userframeuser1can store theip:portofuser2that they might receive in aseek_user_responseframe
- users can also stich a contact into their
networkmanually- in fact, this is how they are bootstrapped into the
network
- in fact, this is how they are bootstrapped into the
- since everyone is so well connected and cryptographic protocols are established and verifiable between users, we might as well also send files to each other