So the web and society are under attack, rather than being a tool for empowering people, improving
lives and protecting democracy, it's evolved into a system for surveillance, control, and
coercion.
I believe that we can fix some of these problems with a better foundation.
So surveillance, you can get most of the way there with end-to-end encryption.
Control tends to come in two kinds.
You've got holding a data hostage and holding your identity hostage.
You can solve those with host-independent data and use a controlled identity.
And then the rest of surveillance, there's a long tale of metadata, including things
like the social graph.
So these were the design goals we had building the pigus protocol.
So what it is, it's a global, end-to-end encrypted social file system.
There's fine-grained access, control to individual files or entire directories, everything
signed and content addressed.
You can automatically move hosts and preserve all your links that everything just works.
And there's a sandbox for running applications or websites in a fun way and, of course,
use a controlled identity.
The model we have is the server, is an adversary, a current adversary.
So everyone has a home server and all data is content addressed, all updates are signed,
and we layer on top of that into end-to-end encryption.
So that gives you your location independent addressing and so your host's mobility.
As far as the user's data actually goes, they have a tree of key pairs.
Each key pair can own any number of other key pairs.
And that ownership relationship is proved with a mutual signature, and that comes from
a single root key which is your identity key pair.
If we lay these out each key pair controls a writing subspace, we call it a mutual
space.
And each of those has a single circle tree associated with it.
Now what is the structure of these circle trees?
It's basically a thing called a champ, so this is a compressed hasharray mapped prefix
try.
You can think of it as a key value store.
It has some nice properties.
So it's independent of insertion order and like a beetry and it's balanced.
If you've had anything to do with AT Prodo, you might have heard of MST's.
MST is the sorted sister data structure of a champ, and it's used in a lot of places
in functional languages like Scarler for collections and maps.
The way we use it, the keys are all 32 random bytes, and the values are cryptary nodes
or encrypted metadata, which we'll see more about.
Each of those, each cryptary node can link to up to five encrypted blocks.
Each of those is up to one megabyte.
So you end up with this kind of granularity for every champ mapping corresponds to up to
five megabytes of data.
The idea is different mappings in the champ can't be linked by your server or anyone who
has access to all the data, so that's how we can hide the file size, at least the absolute
size, and then within a chunk we also pad to a multiple of 4k to further obscure the file
size.
In terms of other metadata, whether something is whether a particular chunk is a file or a
directory, the server can't tell, because the format is the same, and things like the
obviously things like the files and folder names or other metadata, like mind types, creation
date, the folder topology, is not visible, and also the social graph, so who or even how
many people have access to a particular file or blob, which brings us to access control.
So to access a particular cryptary node or chunk, you need a capability, so what's a capability?
It's pure information, people from Sparkly will say you either have it or you don't,
that's a good description, it's not identity based, and because it's pure information, it
can work in things like secret links, if you want, and you can revoke them by essentially
rotating the keys.
So in our setup, there are three different kinds of capabilities, there's a mirror cap,
a read cap, and a right cap.
So the mirror capabilities just can I retrieve the ciphertext for this thing at all, and that
has four components, there's first two of public keys, there's the owner public key and
the writer public key, the owner is basically used for routing to your server, and the
writer is the thing that controls the writing space that you're actually trying to get
the data from.
The map keys is just to look up key into the, into the champ, and the bat stands for block
access token, it's basically 32 bytes.
You can think of it as a baratoken for that particular chunk or block, and so with a, with
a mirror cap, you can then ask the server, give me this crypt, encrypted cryptary node, and
it'll give it to you if the bats write, and then if you have a symmetric read key in
addition, then you can decrypt it, and you can read it.
If you have an addition to that, a symmetric write key, then you can then modify that,
that file or folder as well.
The read keys are controlled with a structure called cryptary, so basically every file
or directory has two symmetric keys associated to it, but this diagram, the idea is if
you have one of these keys, you can follow the links in this picture by decrypting things
in the cryptary nodes.
So if you have the base key for a directory, then you can decrypt all the capabilities
in that directory and seal the children, and so on.
You might notice these, these back links from the parent keys.
That's essentially to give everything a well-defined path, so if I can give you a read
cap to a file, and that file still has a well-defined path in the system.
The write cryptary is a lot simpler, it's just one symmetric key for everything, and if
you have that, then you can decrypt the signing key pair for that appropriate thing, and
modify some stuff.
So we've talked about capabilities for individual chunks, but what about we said they're
the different chunks, so how do we get to read the rest of a file, say, if we're trying
to watch a movie or something?
So the owner and the writer are the same, for a given file, and the read key and the
right key are also the same, so things that change are obviously the keys in the champ,
the map keys, and the baratocans, the best.
So if you have the capability to the start of a file, to get to the next one, you just
hash the current map key with a think called the stream secret, which is that stored in
the encrypted metadata in the first chunks, so you decrypt it, get the stream secret, and
then hash it, and the same thing for the back, and then you've got the code related to
the next chunk, and you can continue doing on, going on like that, and so to seek forward,
you don't actually have to do any IO at all, you just do this hashing locally, get
the final capability, and then just ask for the data, so it's O of 1 in IO to seek
in an arbitrarily large file, so that brings us to the first demo, let's pray to the demo
and see if that will work on the internet here, and see that? Yeah, alright, where are we?
Over here, so this is just a bunch of videos, so this movie is about 120 megs, not enormous,
but it's not tiny either, yeah, so you can see, it's already buffed quite a lot, but
I'll skip ahead of that, there's no sound because there sounds off, but that doesn't matter,
and you can see you can see you can see you head pretty quickly, you can also seek backwards,
and that's relatively fast, if you're wondering how we do that, we don't do anything
clever there, we just keep the pointer to the start of the file, so you're always hashing
forward, because you can't invert a hash, cool, last time I did that demo, didn't work, so I'm
pleased about that, right, so yeah, so this gives us a file system, cool, but that's not
a web, a web has websites and web apps, so we need a way to do that, so a way for that is we
have a sandbox to run anything, run an application or view a website, and the idea is it's
locked down so that it can't communicate to the external world, and so you could then run
an app over private data, such that it can't steal it or infiltrate it in any way, and
it also can't read anything, it's not been granted access to, and it works in existing
browsers without any add-ons or extensions, and from the from the apps perspective, it's
got, it thinks it's got a simple rest there, it doesn't know anything about encryption
or any of that stuff, it thinks it's talking to a server, and that's happening locally with
the service worker, which we'll see more in a second, so what is an application, it's just
a folder of HTML, in PIGOS, because it's just a folder you can use the built-in access control,
you could keep it private, or you could share it with friends, or make it public, there are
some basic permissions for apps, so you can register for certain mind types, you can say I'm an
image editor, or I can play music, or whatever, and you can have there's a permission for
persisting data in kind of like an app-specific private folder in your space, so it's the
base of the same as Android, where apps can store stuff on your phone, makes up to the ends up in PIGOS,
and an app without any permissions is just a private website, this is how it works, technically,
so you have the outer context on the left, which is PIGOS.net, or it could be local host,
this all works on local host as well, and that's where you log in, that's where your keys are,
that's the kind of trusted context, and when you run an app, it loads a random sub-domain,
whether it's PIGOS.net or local host doesn't matter, and that sub-domain all it does,
the service serves up the same code for all sub-domains, and that code just immediately loads
a little service worker, and then tries to load itself in another sub-domain, in this or in
another I-frame, and that I-frame is where the app itself ends up, so all the requests the app
makes get intercepted by the service worker, and the service worker translates them to post messages,
which are sent back to the outer context, where they can be interpreted, and have whatever
permissions applied, and then the responses are sent back, and yes, so it's done with this CSP,
to lock it down, but also co-op and co-ep to try and make sure that it's a different operating
system process than the outer PIGOS context to protect against side channels. So what kind of things
can an app do? There's a word processor, spreadsheets, image editors, all kind of obvious things,
and we haven't written all these, it's like existing web apps that we've just previously ported.
Tilly wicking notebooks, marked on editor, and you don't have to rely on us to write apps,
anyone can write an app, you can launch an app from a folder or show you that later.
You can have a media player, one of the APIs we expose to apps is the ability to send a message
to your friends or to particular friends, so using that you can build stuff like multiplayer games
or chat, and you can do things like doom. So, second demo.
All right, so let's see, so I'm just going to show you, so this is a word doc at DocX.
There you go, so that's, this thing at the top is kind of like a trusted, this little bit like the
URL bar, so that's not controlled by the app, but below that's the app rendering itself.
There's an ebook reader, if you want to do some linear algebra, so there's a block-based
no editor or viewer, so this is standard block-based things, you can have in-line images or
late-tech or diagrams or stuff, and that was, so that was just a viewer for it, if I go edit,
then you can see I get these things for adding and editing new things.
So, yeah, you can give, when you open an app, you can give it read-only access to stuff,
let's try and change something, halfway through that, and then it seems to work,
if you open it again, there we go. All right, so that's saved.
There's a PDF viewer, lots of PDFs, probably the most sandboxed PDF viewer in the world.
Whoops, I didn't want to go back in there, some spreadsheets, so this is an Excel spreadsheet,
there we go, there's some stuff, well that's what we've got. So this is a text editor,
this is basically code mirror, so if you like your text code into an encrypted,
there we go, there's a go file, can do markdown as well, so that's the markdown renderer,
or if you go to edit, then that's code mirror.
And so even just just raw HTML, so this is just a trivial little website,
so you can see here, it just has an image referencing that in the same directory,
and if I view that, then I get, this is sandboxed off, this little website thing,
and yeah, in this case we do actually show the path up here in the sort of trusted URL bar.
Oh, and you can have a full-fetched wiki, so, yeah, so that's marked down, but it can link to
sub-documents, in line images, you can link to any file, and so this is a note,
and it will open that in the appropriate app that you would have you have registered.
And there's a calendar, basically calendar, the model there is that every event is a standard
ikel file, in Pigos, each calendar is a folder, so you get the native access control that way,
and you can share it with people that that way, and one last thing,
so there's a search, so this is searching in a file name, so this is just searching metadata,
but this is not pre-index, this is just doing it live, and you can see it's relatively quick,
I can try and do a full-text search, so this is searching my space at the moment, which is 10 giga
think, but you can see it's fast, and we thought we're going to have to add an index to that,
but it's so far been fast enough to not have one, we might still do one one day,
and yes, so you can see all the apps are personally installed in this account here,
oh it's one more, so here are some example apps, the actual source code in the apps,
so this is, this is doom, basically it just has an assets folder that that will just have an index
HTML, and there's a manifest, it's just JSON file, and from that we can just directly run it
this way in the sandbox, and then yeah, that runs, not multiplayer yet, unfortunately not doom,
one day, awesome, all right, so back to the slides,
right, yeah, so one thing I haven't talked about yet is the more the social side of it,
so I talked about sharing, but we also have kind of a social media protocol, I guess, more of a format,
but our belief is that most social media is actually bad for society, for two main reasons,
because it allows micro-targeted political profiling, which can be used to swing elections and
subvert democracy, and because they're designed to be addictive, but if you compare it to something
like normal in-person conversations, I think these are good for society, these are how we reach
consensus, they're mostly mutually consentful, and so that's how we we've tried to model
those social media on in-person conversations, or meetings, and so it's like over the housing
papers that's entering encrypted, a social post is just a file, and you choose the audience,
so you can trip your friends or your followers or have some subsets, and if the original post
wants to allow sort of increasing the audience, then that can be allowed like resharing,
or you can just restrict the audience to the original audience, but yeah, so without privacy,
there can be no democracy, thank you everyone, go try it out, self-host, sign up, write some apps,
how do you expect questions? All right, we do have a few minutes for questions, we'll go ahead
in the past room, really impressive demo, well in presentation and everything, one of the things
you're very focused on kind of the, and then a new cryptid file case, if you wanted to do some sort
of published subscribe or otherwise messaging system, what type of mechanism, or is it basically
appalling mechanism on the encrypted data? It's basically polling, yeah, so the way the sharing and
the social stuff will work is when you, when you're friends, someone, it's okay, so I haven't
really talked to the details of a friending, you can send someone an encrypted follow requests,
and that gives, that basically you share with them a capability to a particular file in your space,
and that is your broadcast mechanism to that person, so you can just append stuff to that in your space,
and then they can come and read it whenever they like, and then follow the caps elsewhere,
so yeah, that's basically how about that? Over here, hi, thank you very much for your presentation
and for the efforts that you put into something that feels very right. I wanted to ask you,
what do you think that the audience here can do for peer-guys, like what do you think it's necessary
next to step, especially regarding the targets that you have here, what can we do?
I mean, try it out, use it, give us feedback, we're also, we're a non-profit, so if you want to support
us, you can donate or get a paid account on our server, if you don't want to self-host,
yeah, all of the above. Yeah, but also specifically targeting developers,
are there works that are left, as you think, that can be like lifted up some,
so you're targeting developers? Like, let's say like, would it be like, would you recommend
like the developers to look at like new apps to integrate in your platform? Oh, yeah, yeah,
so yeah, we'd love to have more apps, and if you want it to, we have there's a
centralized install thing to make it easier for people to find me, you don't have to do that,
but yeah, there's a web, is it on there? No, it's not. Well, there's a link on peer-guys that
are, which goes to a book, book.pigas.org, that has the app API, so the developers to figure out
what's going on. Most of it's pretty simple, there isn't any SDK, it's that simple, it's just
posting or getting HTTP to a couple of inputs. Thank you, Alien. In your opinion, which is the best way
a user can manage his private keys and also how the revocation method works. So, what's the
second part? How the revocation of permission works? Oh, the revocation. Yeah, so the private keys
are, I've got to slide somewhere about log in, let me see. Yeah, so basically when you log in,
you've got your username and your password, and we put those through with a salt, through scripts,
and that gives you two things, you get a log in key pair and a symmetric key. The log in key pair is
then used to auth with the home server, so the home server is stores you're encrypted, you're
encrypted identity there, and you can back it up if you want, and that is then decrypted with the
symmetric key to get your three things, so you're identity key pair, the social key pair, which is
what's used for follow requests, and the capability to your route directory. And yeah, so in terms
of revocations, so it's handled automatically, but if we go back to crypt-tree,
right, so if someone has access to one of these keys, then you have to rotate the entire
subgraph that's reachable from that. So revocation, read revocation is not too expensive,
right revocation is a bit more expensive, but yes, if you have a big directory, I need
trying to revoke access, that can be expensive. If you don't, if your thread model doesn't necessarily
need like a full key rotation, then there's sort of an intermediary we have, which is secret links,
and you can just basically delete the secret link, and then that link will not resolve any
more, even though the keys underlying are the same, depends on your thread model, but yeah.
All right, thank you everywhere, it's going to give them another hour of pause.
Thank you, Ian, appreciate it. Where are you going to start changing over fiscal?