Hardcoding 2 users into a page

It's easy enough to include two Keybase users' encryptors in the same page. You could include both their personal_keybase.js files, but the files are large. Alternatively, just trim the top few lines off of one, and execute it, too.

The relevant line to load a user looks something like this:

window._kb_pkb = window._pk_pkb || [];
window._kb_pkb.push(['chris',"-----BEGIN PGP PUB... "]);

This defines a user, so you can define multiple.

// this next line needs to be executed before any keys are added.
window._kb_pkb = window._pk_pkb || [];
window._kb_pkb.push(['chris',"-----BEGIN PGP PUB... "]);
window._kb_pkb.push(['max',  "-----BEGIN PGP PUB... "]);

Then, you can use whichever you like:

  keybase.people.max.encrypt_text('Hello max',   ...);
  keybase.people.chris.encrypt_text('Hello chris', ...);

Loading 0 users into a page is okay, too.

Loading a user directly from Keybase

metadata considerations...not doing a full check

Searching Keybase

Encrypting a file

Generating keys

...comes with a full copy of kbpgp...

Multi-user encryption

Recipes from community

Recipes we'd like to see

  • jQuery plugin
  • full interface with (a) search and select users, (b) cute little interface to drag+drop files or write, (c) support for upload destination and/or callback of some kind